{"action":"created","issue":{"url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/issues/493","repository_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver","labels_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/issues/493/labels{/name}","comments_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/issues/493/comments","events_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/issues/493/events","html_url":"https://github.com/sourcegraph/javascript-typescript-langserver/issues/493","id":344396493,"node_id":"MDU6SXNzdWUzNDQzOTY0OTM=","number":493,"title":"Eaccess error on unreadable file","user":{"login":"pockata","id":543561,"node_id":"MDQ6VXNlcjU0MzU2MQ==","avatar_url":"https://avatars2.githubusercontent.com/u/543561?v=4","gravatar_id":"","url":"https://api.github.com/users/pockata","html_url":"https://github.com/pockata","followers_url":"https://api.github.com/users/pockata/followers","following_url":"https://api.github.com/users/pockata/following{/other_user}","gists_url":"https://api.github.com/users/pockata/gists{/gist_id}","starred_url":"https://api.github.com/users/pockata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pockata/subscriptions","organizations_url":"https://api.github.com/users/pockata/orgs","repos_url":"https://api.github.com/users/pockata/repos","events_url":"https://api.github.com/users/pockata/events{/privacy}","received_events_url":"https://api.github.com/users/pockata/received_events","type":"User","site_admin":false},"labels":[{"id":570077806,"node_id":"MDU6TGFiZWw1NzAwNzc4MDY=","url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/labels/needs%20more%20info","name":"needs more info","color":"0c797d","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-07-25T11:02:50Z","updated_at":"2018-08-02T19:02:24Z","closed_at":null,"author_association":"NONE","body":"### Current behavior:\r\n\r\nWhen running the typescript server in a project where one or more files/folders are unreadable (eg. owned by a different user) the language server throws and error and stops working.\r\n\r\nHere is the log:\r\n\r\n```\r\nERROR Handle textDocumentDidOpen: { Error: EACCES: permission denied, scandir '/home/user/Projects/Project/unreadable-dir'\r\n  errno: -13,\r\n  code: 'EACCES',\r\n  syscall: 'scandir',\r\n  path: '/home/user/Projects/Project/unreadable-dir' }\r\nERROR Handler for textDocument/completion failed: { Error: EACCES: permission denied, scandir '/home/user/Projects/Project/unreadable-dir'\r\n  errno: -13,\r\n  code: 'EACCES',\r\n  syscall: 'scandir',\r\n  path: '/home/user/Projects/Project/unreadable-dir' } \r\nMessage: { jsonrpc: '2.0',\r\n  method: 'textDocument/completion',\r\n  params: \r\n   { position: { character: 1, line: 17 },\r\n     textDocument: { uri: 'file:///home/user/Projects/Project/unreadable-dir/unreadable-file.js' } },\r\n  id: 22 }\r\nERROR Handler for textDocument/completion failed: { Error: EACCES: permission denied, scandir '/home/user/Projects/Project/unreadable-dir'\r\n  errno: -13,\r\n  code: 'EACCES',\r\n  syscall: 'scandir',\r\n  path: '/home/user/Projects/Project/unreadable-dir' } \r\nMessage: { jsonrpc: '2.0',\r\n  method: 'textDocument/completion',\r\n  params: \r\n   { position: { character: 2, line: 17 },\r\n     textDocument: { uri: 'file:///home/user/Projects/Project/unreadable-dir/unreadable-file.js' } },\r\n  id: 25 }\r\nERROR Handler for textDocument/completion failed: { Error: EACCES: permission denied, scandir '/home/user/Projects/Project/unreadable-dir'\r\n  errno: -13,\r\n  code: 'EACCES',\r\n  syscall: 'scandir',\r\n  path: '/home/user/Projects/Project/unreadable-dir' } \r\nMessage: { jsonrpc: '2.0',\r\n  method: 'textDocument/completion',\r\n  params: \r\n   { position: { character: 3, line: 17 },\r\n     textDocument: { uri: 'file:///home/user/Projects/Project/unreadable-dir/unreadable-file.js' } },\r\n  id: 26 }\r\nERROR Handler for textDocument/rename failed: { Error: EACCES: permission denied, scandir '/home/user/Projects/Project/unreadable-dir'\r\n  errno: -13,\r\n  code: 'EACCES',\r\n  syscall: 'scandir',\r\n  path: '/home/user/Projects/Project/unreadable-dir' } \r\nMessage: { jsonrpc: '2.0',\r\n  method: 'textDocument/rename',\r\n  params: \r\n   { newName: 'fse',\r\n     position: { character: 0, line: 17 },\r\n     textDocument: { uri: 'file:///home/user/Projects/Project/unreadable-dir/unreadable-file.js' } },\r\n  id: 29 }\r\nERROR Handle textDocumentDidSave: { Error: EACCES: permission denied, scandir '/home/user/Projects/Project/unreadable-dir'\r\n  errno: -13,\r\n  code: 'EACCES',\r\n  syscall: 'scandir',\r\n  path: '/home/user/Projects/Project/unreadable-dir' }\r\nERROR Handle textDocumentDidSave: { Error: EACCES: permission denied, scandir '/home/user/Projects/Project/unreadable-dir'\r\n  errno: -13,\r\n  code: 'EACCES',\r\n  syscall: 'scandir',\r\n  path: '/home/user/Projects/Project/unreadable-dir' }\r\nERROR Handle textDocumentDidSave: { Error: EACCES: permission denied, scandir '/home/user/Projects/Project/unreadable-dir'\r\n  errno: -13,\r\n  code: 'EACCES',\r\n  syscall: 'scandir',\r\n  path: '/home/user/Projects/Project/unreadable-dir' }\r\n\r\n```\r\n### Expected behavior:\r\nResume normal operation and possibly print a warning.\r\n\r\n### Steps to reproduce:\r\n```\r\n1. Open an existing typescript project\r\n2. Create a file and a folder\r\n    `mkdir -p unreadable-dir && touch unreadable-dir/unreadable-file.js`\r\n3. Change ownership\r\n    `sudo chown root:root -R unreadable-dir && sudo chmod -R 0700 unreadable-dir`\r\n```\r\n\r\n### Additional info:\r\nOS: Antergos Linux\r\nEditor: Neovim v0.3.1\r\nLanguage client: github.com/autozimu/LanguageClient-neovim\r\nTypescript langserver version: v2.9.4\r\nCommand: javascript-typescript-stdio --logfile /tmp/langclient.txt"},"comment":{"url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/issues/comments/410033894","html_url":"https://github.com/sourcegraph/javascript-typescript-langserver/issues/493#issuecomment-410033894","issue_url":"https://api.github.com/repos/sourcegraph/javascript-typescript-langserver/issues/493","id":410033894,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMDAzMzg5NA==","user":{"login":"pockata","id":543561,"node_id":"MDQ6VXNlcjU0MzU2MQ==","avatar_url":"https://avatars2.githubusercontent.com/u/543561?v=4","gravatar_id":"","url":"https://api.github.com/users/pockata","html_url":"https://github.com/pockata","followers_url":"https://api.github.com/users/pockata/followers","following_url":"https://api.github.com/users/pockata/following{/other_user}","gists_url":"https://api.github.com/users/pockata/gists{/gist_id}","starred_url":"https://api.github.com/users/pockata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pockata/subscriptions","organizations_url":"https://api.github.com/users/pockata/orgs","repos_url":"https://api.github.com/users/pockata/repos","events_url":"https://api.github.com/users/pockata/events{/privacy}","received_events_url":"https://api.github.com/users/pockata/received_events","type":"User","site_admin":false},"created_at":"2018-08-02T19:02:24Z","updated_at":"2018-08-02T19:02:24Z","author_association":"NONE","body":"It's a new project we inherited. The setup is \"interesting\". When running a dev environment, a ton of docker containers run and create a bunch of folders which are unreadable to the current user. These folders contain anything from access logs to mysql data dirs and more.\r\nChanging the permissions, messes up everything, so we're stuck with this for the time being because sorting this out will take some time."}}
{"actor":{"display_login":"pockata"}}