question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ubuntu: Cypress crashes when I try opening a project

See original GitHub issue
  • Operating System: Ubuntu 16.04
  • Cypress Version: 1.0.2
  • Browser Version:

Is this a Feature or Bug?

Bug

Current behavior:

Crashing when

Desired behavior:

Not crashing when opening a project

How to reproduce:

  1. Open Cypress (Either through the terminal or through by clicking on the Cypress icon)
  2. Try open a project
  3. Cypress crashes

Test code:


Additional Info (images, stack traces, etc)

Video: https://youtu.be/zOC2JBffJsE

Stack trace:

dennis.thisner@d64071:~/Downloads/Cypress$ ./Cypress 
{ Error: watch /home/dennis.thisner/projects/src/cumul8.com/web-platform/package.json ENOSPC
    at exports._errnoException (util.js:1026:11)
    at FSWatcher.start (fs.js:1439:19)
    at Object.fs.watch (fs.js:1466:11)
    at createFsWatchInstance (/home/dennis.thisner/Downloads/Cypress/resources/app/packages/server/node_modules/chokidar/lib/nodefs-handler.js:37:15)
    at setFsWatchListener (/home/dennis.thisner/Downloads/Cypress/resources/app/packages/server/node_modules/chokidar/lib/nodefs-handler.js:80:15)
    at FSWatcher.NodeFsHandler._watchWithNodeFs (/home/dennis.thisner/Downloads/Cypress/resources/app/packages/server/node_modules/chokidar/lib/nodefs-handler.js:228:14)
    at FSWatcher.NodeFsHandler._handleFile (/home/dennis.thisner/Downloads/Cypress/resources/app/packages/server/node_modules/chokidar/lib/nodefs-handler.js:255:21)
    at FSWatcher.<anonymous> (/home/dennis.thisner/Downloads/Cypress/resources/app/packages/server/node_modules/chokidar/lib/nodefs-handler.js:473:21)
    at /home/dennis.thisner/Downloads/Cypress/resources/app/packages/server/node_modules/graceful-fs/polyfills.js:287:18
    at FSReqWrap.oncomplete (fs.js:123:15)

  code: 'ENOSPC',
  errno: 'ENOSPC',
  syscall: 'watch /home/dennis.thisner/projects/src/cumul8.com/web-platform/package.json',
  filename: '/home/dennis.thisner/projects/src/cumul8.com/web-platform/package.json' }
Error: watch /home/dennis.thisner/projects/src/cumul8.com/web-platform/package.json ENOSPC
    at exports._errnoException (util.js:1026:11)
    at FSWatcher.start (fs.js:1439:19)
    at Object.fs.watch (fs.js:1466:11)
    at createFsWatchInstance (/home/dennis.thisner/Downloads/Cypress/resources/app/packages/server/node_modules/chokidar/lib/nodefs-handler.js:37:15)
    at setFsWatchListener (/home/dennis.thisner/Downloads/Cypress/resources/app/packages/server/node_modules/chokidar/lib/nodefs-handler.js:80:15)
    at FSWatcher.NodeFsHandler._watchWithNodeFs (/home/dennis.thisner/Downloads/Cypress/resources/app/packages/server/node_modules/chokidar/lib/nodefs-handler.js:228:14)
    at FSWatcher.NodeFsHandler._handleFile (/home/dennis.thisner/Downloads/Cypress/resources/app/packages/server/node_modules/chokidar/lib/nodefs-handler.js:255:21)
    at FSWatcher.<anonymous> (/home/dennis.thisner/Downloads/Cypress/resources/app/packages/server/node_modules/chokidar/lib/nodefs-handler.js:473:21)
    at /home/dennis.thisner/Downloads/Cypress/resources/app/packages/server/node_modules/graceful-fs/polyfills.js:287:18
    at FSReqWrap.oncomplete (fs.js:123:15)

{ Error: watch /home/dennis.thisner/projects/src/cumul8.com/web-platform/cypress/support/commands.js ENOSPC
    at exports._errnoException (util.js:1026:11)
    at FSWatcher.start (fs.js:1439:19)
    at Object.fs.watch (fs.js:1466:11)
    at createFsWatchInstance (/home/dennis.thisner/Downloads/Cypress/resources/app/packages/server/node_modules/chokidar/lib/nodefs-handler.js:37:15)
    at setFsWatchListener (/home/dennis.thisner/Downloads/Cypress/resources/app/packages/server/node_modules/chokidar/lib/nodefs-handler.js:80:15)
    at FSWatcher.NodeFsHandler._watchWithNodeFs (/home/dennis.thisner/Downloads/Cypress/resources/app/packages/server/node_modules/chokidar/lib/nodefs-handler.js:228:14)
    at FSWatcher.NodeFsHandler._handleFile (/home/dennis.thisner/Downloads/Cypress/resources/app/packages/server/node_modules/chokidar/lib/nodefs-handler.js:255:21)
    at FSWatcher.<anonymous> (/home/dennis.thisner/Downloads/Cypress/resources/app/packages/server/node_modules/chokidar/lib/nodefs-handler.js:473:21)
    at /home/dennis.thisner/Downloads/Cypress/resources/app/packages/server/node_modules/graceful-fs/polyfills.js:287:18
    at FSReqWrap.oncomplete (fs.js:123:15)

  code: 'ENOSPC',
  errno: 'ENOSPC',
  syscall: 'watch /home/dennis.thisner/projects/src/cumul8.com/web-platform/cypress/support/commands.js',
  filename: '/home/dennis.thisner/projects/src/cumul8.com/web-platform/cypress/support/commands.js' }
Error: watch /home/dennis.thisner/projects/src/cumul8.com/web-platform/cypress/support/commands.js ENOSPC
    at exports._errnoException (util.js:1026:11)
    at FSWatcher.start (fs.js:1439:19)
    at Object.fs.watch (fs.js:1466:11)
    at createFsWatchInstance (/home/dennis.thisner/Downloads/Cypress/resources/app/packages/server/node_modules/chokidar/lib/nodefs-handler.js:37:15)
    at setFsWatchListener (/home/dennis.thisner/Downloads/Cypress/resources/app/packages/server/node_modules/chokidar/lib/nodefs-handler.js:80:15)
    at FSWatcher.NodeFsHandler._watchWithNodeFs (/home/dennis.thisner/Downloads/Cypress/resources/app/packages/server/node_modules/chokidar/lib/nodefs-handler.js:228:14)
    at FSWatcher.NodeFsHandler._handleFile (/home/dennis.thisner/Downloads/Cypress/resources/app/packages/server/node_modules/chokidar/lib/nodefs-handler.js:255:21)
    at FSWatcher.<anonymous> (/home/dennis.thisner/Downloads/Cypress/resources/app/packages/server/node_modules/chokidar/lib/nodefs-handler.js:473:21)
    at /home/dennis.thisner/Downloads/Cypress/resources/app/packages/server/node_modules/graceful-fs/polyfills.js:287:18
    at FSReqWrap.oncomplete (fs.js:123:15)

{ Error: watch /home/dennis.thisner/projects/src/cumul8.com/web-platform/cypress/support/index.js ENOSPC
    at exports._errnoException (util.js:1026:11)
    at FSWatcher.start (fs.js:1439:19)
    at Object.fs.watch (fs.js:1466:11)
    at createFsWatchInstance (/home/dennis.thisner/Downloads/Cypress/resources/app/packages/server/node_modules/chokidar/lib/nodefs-handler.js:37:15)
    at setFsWatchListener (/home/dennis.thisner/Downloads/Cypress/resources/app/packages/server/node_modules/chokidar/lib/nodefs-handler.js:80:15)
    at FSWatcher.NodeFsHandler._watchWithNodeFs (/home/dennis.thisner/Downloads/Cypress/resources/app/packages/server/node_modules/chokidar/lib/nodefs-handler.js:228:14)
    at FSWatcher.NodeFsHandler._handleFile (/home/dennis.thisner/Downloads/Cypress/resources/app/packages/server/node_modules/chokidar/lib/nodefs-handler.js:255:21)
    at FSWatcher.<anonymous> (/home/dennis.thisner/Downloads/Cypress/resources/app/packages/server/node_modules/chokidar/lib/nodefs-handler.js:473:21)
    at /home/dennis.thisner/Downloads/Cypress/resources/app/packages/server/node_modules/graceful-fs/polyfills.js:287:18
    at FSReqWrap.oncomplete (fs.js:123:15)

  code: 'ENOSPC',
  errno: 'ENOSPC',
  syscall: 'watch /home/dennis.thisner/projects/src/cumul8.com/web-platform/cypress/support/index.js',
  filename: '/home/dennis.thisner/projects/src/cumul8.com/web-platform/cypress/support/index.js' }
Error: watch /home/dennis.thisner/projects/src/cumul8.com/web-platform/cypress/support/index.js ENOSPC
    at exports._errnoException (util.js:1026:11)
    at FSWatcher.start (fs.js:1439:19)
    at Object.fs.watch (fs.js:1466:11)
    at createFsWatchInstance (/home/dennis.thisner/Downloads/Cypress/resources/app/packages/server/node_modules/chokidar/lib/nodefs-handler.js:37:15)
    at setFsWatchListener (/home/dennis.thisner/Downloads/Cypress/resources/app/packages/server/node_modules/chokidar/lib/nodefs-handler.js:80:15)
    at FSWatcher.NodeFsHandler._watchWithNodeFs (/home/dennis.thisner/Downloads/Cypress/resources/app/packages/server/node_modules/chokidar/lib/nodefs-handler.js:228:14)
    at FSWatcher.NodeFsHandler._handleFile (/home/dennis.thisner/Downloads/Cypress/resources/app/packages/server/node_modules/chokidar/lib/nodefs-handler.js:255:21)
    at FSWatcher.<anonymous> (/home/dennis.thisner/Downloads/Cypress/resources/app/packages/server/node_modules/chokidar/lib/nodefs-handler.js:473:21)
    at /home/dennis.thisner/Downloads/Cypress/resources/app/packages/server/node_modules/graceful-fs/polyfills.js:287:18
    at FSReqWrap.oncomplete (fs.js:123:15)
```
`

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

29reactions
jhartmacommented, Nov 27, 2017

just for the record

echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

should also fix it

5reactions
aaronmfparrcommented, Oct 7, 2018

Using an Ubuntu 16.04 chroot on chomeos (with crouton) I ran into this problem also. Problem was inadequate number of user watches.

Solution was to increase them as follows: sudo sysctl fs.inotify.max_user_watches=1048576

Similar to the other recommendations above, but simpler and now you understand the problem. ENOSPC can also refer to inadequate number of user watches on the file system.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting | Cypress Documentation
Open Cypress via cypress open · Go to Developer Tools -> View App Data · This will take you to the directory in...
Read more >
Cannot run Cypress on Ubuntu 18.04 - Stack Overflow
This issue has been addressed here: Cypress verify command failing #6184. I tried the suggested work around and my problems went away.
Read more >
How To Fix Cypress Crashing Issue In Windows - YouTube
In this video, we will discuss how to fix the cypress crashing issue.New Selenium Batch Starting ...
Read more >
Using Graphical User Interfaces like Cypress' in WSL2
Hi Nick, thanks for the article. I'm trying to run cypress inside wsl 2, but the command yarn run cy:open always display an...
Read more >
cypress-io/cypress - Gitter
Hi all, I try to run Cypress (first time), i'm working on WSL Ubuntu. ... And then my GPU process crashes for 6...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found