Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: EACCES: permission denied, scandir #1535

Closed
alexgorbatchev opened this issue Apr 5, 2023 · 6 comments
Closed

Error: EACCES: permission denied, scandir #1535

alexgorbatchev opened this issue Apr 5, 2023 · 6 comments

Comments

@alexgorbatchev
Copy link

Describe the bug

I have a few docker volume mounts in the workspace, preview.js fails to start because it can't traverse into those folders:

500 in endpoint /previews/start:
[Error: EACCES: permission denied, scandir '...'] {
  errno: -13,
  code: 'EACCES',
  syscall: 'scandir',
  path: '...
}

Reproduction

  1. chown a folder to another user
  2. attempt to review

Preview.js CLI version

not sure where it is, just installed it via VSCode

Framework

react 18

System Info

n/a

Used Package Manager

pnpm

CLI logs (useful for crashes)

No response

Browser logs (useful for rendering errors)

No response

Repo link (if available)

No response

Anything else?

No response

@alexgorbatchev
Copy link
Author

Another thing I want to point out, it's trying to scan folders OUTSIDE of the workspace it found:

i have a web folder which is a root folder for the node.js project in my work space, I see:

✨ Created Preview.js workspace for: /home/b/web

EACCES error is for /home/a/folder.

@alexgorbatchev
Copy link
Author

and one more thing, the folder it's trying to scan is in .gitignore

@fwouts fwouts added bug Something isn't working vscode and removed pending triage cli labels Apr 6, 2023
@fwouts
Copy link
Owner

fwouts commented Apr 6, 2023

Thanks @alexgorbatchev, will investigate!

@fwouts
Copy link
Owner

fwouts commented Apr 6, 2023

This appears to be a bug in https://github.com/sindresorhus/globby (see https://github.com/fwouts/globby-eaccess-bug for repro), but the good news is I think I know how to fix it. Let's hope they accept my PR once it's ready :)

Edit: PR is now up for review at sindresorhus/globby#246

@alexgorbatchev
Copy link
Author

@fwouts excellent find! 👏

@fwouts fwouts added the blocked label Apr 7, 2023
fwouts added a commit that referenced this issue Apr 11, 2023
@fwouts fwouts added fix merged and removed blocked labels Apr 11, 2023
@fwouts
Copy link
Owner

fwouts commented Apr 19, 2023

Hey @alexgorbatchev, this should now be fixed in v1.21. Let me know if that works for you!

@fwouts fwouts closed this as completed Apr 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants