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

Cypress crashing when opening project by UNC path #8741

Open
ezhikov opened this issue Oct 2, 2020 · 7 comments
Open

Cypress crashing when opening project by UNC path #8741

ezhikov opened this issue Oct 2, 2020 · 7 comments

Comments

@ezhikov
Copy link

@ezhikov ezhikov commented Oct 2, 2020

Current behavior

Trying to run Cypress.exe open project by UNC path. It creates cypress folder, and then just exits.

Not sure where to look for logs.

Desired behavior

Cypress should work.

Test code to reproduce

Download cypress binary for windows. Run Cypress.exe. Open project by UNC path.

Versions

  • Windows 10 pro 2004
  • Cypress Version 5.3.0
@ezhikov
Copy link
Author

@ezhikov ezhikov commented Oct 2, 2020

I tried to map UNC path to as network disk, but with same result

@jennifer-shehane
Copy link
Member

@jennifer-shehane jennifer-shehane commented Oct 15, 2020

Could you run Cypress in debug mode mode and print the entire set of logs here?

@ezhikov
Copy link
Author

@ezhikov ezhikov commented Oct 15, 2020

Not sure how to do it when I'm running downloaded .exe

@kosst
Copy link

@kosst kosst commented Oct 29, 2020

I have the same problem and it looks like chokidar doesn't handle the path right. If I start cypress.exe through cmd and choose a path of my repo in my WSL2 network drive (\\wsl$), cypress crashes and I get the following error message:

Error: EISDIR: illegal operation on a directory, watch '/'
    at FSWatcher.start (internal/fs/watchers.js:169:26)
    at Object.watch (fs.js:1343:11)
    at createFsWatchInstance (C:\Users\kosst\cypress\resources\app\packages\server\node_modules\chokidar\lib\nodefs-handler.js:116:15)
    at setFsWatchListener (C:\Users\kosst\cypress\resources\app\packages\server\node_modules\chokidar\lib\nodefs-handler.js:163:15)
    at NodeFsHandler._watchWithNodeFs (C:\Users\kosst\cypress\resources\app\packages\server\node_modules\chokidar\lib\nodefs-handler.js:325:14)
    at NodeFsHandler._handleDir (C:\Users\kosst\cypress\resources\app\packages\server\node_modules\chokidar\lib\nodefs-handler.js:551:19)
    at NodeFsHandler._addToNodeFs (C:\Users\kosst\cypress\resources\app\packages\server\node_modules\chokidar\lib\nodefs-handler.js:600:27)
    at C:\Users\kosst\cypress\resources\app\packages\server\node_modules\chokidar\index.js:435:21
    at Function.all (<anonymous>:null:null)

Maybe it's related to this issue:

paulmillr/chokidar#948

@ezhikov
Copy link
Author

@ezhikov ezhikov commented Oct 30, 2020

CMD can't use UNC paths, so this should be the problem.

@kosst
Copy link

@kosst kosst commented Oct 30, 2020

As a workaround I can start cypress.exe in CMD with setting the environment variable CHOKIDAR_USEPOLLING, e.g.:

set CHOKIDAR_USEPOLLING=true && c:\users\kosst\cypress\cypress.exe

In my case the problem is associated with file watching in chokidar.

@intelmatt
Copy link

@intelmatt intelmatt commented Aug 6, 2021

Behavior is a bit different now when starting Cypress from a UNC path (Aug 2021):

npx cypress open
'\\server\path'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported.  Defaulting to Windows directory.

So, it starts up in c:\windows and then errors out with permission issues. Can work around it by creating a drive letter mapping, but strongly prefer not to do that for obvious reasons.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants