apollo-tooling icon indicating copy to clipboard operation
apollo-tooling copied to clipboard

VSCode extension shouldn't fail on scanning directories

Open Tymek opened this issue 4 years ago • 4 comments

Intended outcome:

Apollo VSCode extension doesn't scan directories excluded in apollo.config.js and loads without an error.

Actual outcome:

[Trace - 11:38:38 AM] Sending request 'initialize - (0)'.
[Trace - 11:38:39 AM] Received response 'initialize - (0)' in 489ms. Request failed: Request initialize failed with message: EACCES: permission denied, scandir '/srv/momentum/data/postgres' (-32603).
[Error - 11:38:39 AM] Server initialization failed.
  Message: Request initialize failed with message: EACCES: permission denied, scandir '/srv/momentum/data/postgres'
  Code: -32603 

Screenshot from 2021-05-03 11-40-12

How to reproduce the issue:

In root directory of a project create a file or directory owned by different user (root for example). Add it to client.excludes and make sure that client.includes and service.localSchemaFile doesn't use it.

Versions

v1.18.9

Related to:

https://github.com/apollographql/apollo-tooling/issues/1715

Tymek avatar May 03 '21 10:05 Tymek

I narrowed the problem down to packages/apollo-language-server/src/workspace.ts#L117

PR welcome? I would try to substitute glob package with fast-glob, since it looks like this was the intent behind fg variable.

Tymek avatar May 03 '21 11:05 Tymek

Any updates on this? Can't use the extension either because of this problem.

image

arochadaniel avatar Jul 01 '21 20:07 arochadaniel

Same problem here. Has anyone found the fix?

adarshaacharya avatar Jul 09 '21 11:07 adarshaacharya

I am seeing this issue as well, also due to a sub-directory that is not accessible by my default user.

superami-code avatar Mar 17 '23 13:03 superami-code