Cypress v3.3.0 crashes with ENOSPC in AWS CodeBuild
See original GitHub issueCurrent behavior:
[AWS CodeBuild Plugin] > cross-env NODE_ENV=test cypress run
[AWS CodeBuild Plugin]
[AWS CodeBuild Plugin] { Error: watch /codebuild/output/src525851951/src/project/cypress/plugins/index.js ENOSPC
[AWS CodeBuild Plugin] at _errnoException (util.js:1024:11)
[AWS CodeBuild Plugin] at FSWatcher.start (fs.js:1386:19)
[AWS CodeBuild Plugin] at Object.fs.watch (fs.js:1412:11)
[AWS CodeBuild Plugin] at createFsWatchInstance (/root/.cache/Cypress/3.3.0/Cypress/resources/app/packages/server/node_modules/chokidar/lib/nodefs-handler.js:37:15)
[AWS CodeBuild Plugin] at setFsWatchListener (/root/.cache/Cypress/3.3.0/Cypress/resources/app/packages/server/node_modules/chokidar/lib/nodefs-handler.js:80:15)
[AWS CodeBuild Plugin] at FSWatcher.NodeFsHandler._watchWithNodeFs (/root/.cache/Cypress/3.3.0/Cypress/resources/app/packages/server/node_modules/chokidar/lib/nodefs-handler.js:228:14)
[AWS CodeBuild Plugin] at FSWatcher.NodeFsHandler._handleFile (/root/.cache/Cypress/3.3.0/Cypress/resources/app/packages/server/node_modules/chokidar/lib/nodefs-handler.js:255:21)
[AWS CodeBuild Plugin] at FSWatcher.<anonymous> (/root/.cache/Cypress/3.3.0/Cypress/resources/app/packages/server/node_modules/chokidar/lib/nodefs-handler.js:473:21)
[AWS CodeBuild Plugin] at /root/.cache/Cypress/3.3.0/Cypress/resources/app/packages/server/node_modules/graceful-fs/polyfills.js:285:20
[AWS CodeBuild Plugin] at FSReqWrap.oncomplete (fs.js:153:5)
[AWS CodeBuild Plugin]
[AWS CodeBuild Plugin] code: 'ENOSPC',
[AWS CodeBuild Plugin] errno: 'ENOSPC',
[AWS CodeBuild Plugin] syscall: 'watch /codebuild/output/src525851951/src/project/cypress/plugins/index.js',
[AWS CodeBuild Plugin] filename: '/codebuild/output/src525851951/src/project/cypress/plugins/index.js' }
[AWS CodeBuild Plugin] Error: watch /codebuild/output/src525851951/src/project/cypress/plugins/index.js ENOSPC
[AWS CodeBuild Plugin] at _errnoException (util.js:1024:11)
[AWS CodeBuild Plugin] at FSWatcher.start (fs.js:1386:19)
[AWS CodeBuild Plugin] at Object.fs.watch (fs.js:1412:11)
[AWS CodeBuild Plugin] at createFsWatchInstance (/root/.cache/Cypress/3.3.0/Cypress/resources/app/packages/server/node_modules/chokidar/lib/nodefs-handler.js:37:15)
[AWS CodeBuild Plugin] at setFsWatchListener (/root/.cache/Cypress/3.3.0/Cypress/resources/app/packages/server/node_modules/chokidar/lib/nodefs-handler.js:80:15)
[AWS CodeBuild Plugin] at FSWatcher.NodeFsHandler._watchWithNodeFs (/root/.cache/Cypress/3.3.0/Cypress/resources/app/packages/server/node_modules/chokidar/lib/nodefs-handler.js:228:14)
[AWS CodeBuild Plugin] at FSWatcher.NodeFsHandler._handleFile (/root/.cache/Cypress/3.3.0/Cypress/resources/app/packages/server/node_modules/chokidar/lib/nodefs-handler.js:255:21)
[AWS CodeBuild Plugin] at FSWatcher.<anonymous> (/root/.cache/Cypress/3.3.0/Cypress/resources/app/packages/server/node_modules/chokidar/lib/nodefs-handler.js:473:21)
[AWS CodeBuild Plugin] at /root/.cache/Cypress/3.3.0/Cypress/resources/app/packages/server/node_modules/graceful-fs/polyfills.js:285:20
[AWS CodeBuild Plugin] at FSReqWrap.oncomplete (fs.js:153:5)
[AWS CodeBuild Plugin]
[AWS CodeBuild Plugin] { Error: watch /codebuild/output/src525851951/src/project/env/parse.js ENOSPC
[AWS CodeBuild Plugin] at _errnoException (util.js:1024:11)
[AWS CodeBuild Plugin] at FSWatcher.start (fs.js:1386:19)
[AWS CodeBuild Plugin] at Object.fs.watch (fs.js:1412:11)
[AWS CodeBuild Plugin] at createFsWatchInstance (/root/.cache/Cypress/3.3.0/Cypress/resources/app/packages/server/node_modules/chokidar/lib/nodefs-handler.js:37:15)
[AWS CodeBuild Plugin] at setFsWatchListener (/root/.cache/Cypress/3.3.0/Cypress/resources/app/packages/server/node_modules/chokidar/lib/nodefs-handler.js:80:15)
[AWS CodeBuild Plugin] at FSWatcher.NodeFsHandler._watchWithNodeFs (/root/.cache/Cypress/3.3.0/Cypress/resources/app/packages/server/node_modules/chokidar/lib/nodefs-handler.js:228:14)
[AWS CodeBuild Plugin] at FSWatcher.NodeFsHandler._handleFile (/root/.cache/Cypress/3.3.0/Cypress/resources/app/packages/server/node_modules/chokidar/lib/nodefs-handler.js:255:21)
[AWS CodeBuild Plugin] at FSWatcher.<anonymous> (/root/.cache/Cypress/3.3.0/Cypress/resources/app/packages/server/node_modules/chokidar/lib/nodefs-handler.js:473:21)
[AWS CodeBuild Plugin] at /root/.cache/Cypress/3.3.0/Cypress/resources/app/packages/server/node_modules/graceful-fs/polyfills.js:285:20
[AWS CodeBuild Plugin] at FSReqWrap.oncomplete (fs.js:153:5)
[AWS CodeBuild Plugin]
[AWS CodeBuild Plugin] code: 'ENOSPC',
[AWS CodeBuild Plugin] errno: 'ENOSPC',
[AWS CodeBuild Plugin] syscall: 'watch /codebuild/output/src525851951/src/project/env/parse.js',
[AWS CodeBuild Plugin] filename: '/codebuild/output/src525851951/src/project/env/parse.js' }
[AWS CodeBuild Plugin] Error: watch /codebuild/output/src525851951/src/project/env/parse.js ENOSPC
[AWS CodeBuild Plugin] at _errnoException (util.js:1024:11)
[AWS CodeBuild Plugin] at FSWatcher.start (fs.js:1386:19)
[AWS CodeBuild Plugin] at Object.fs.watch (fs.js:1412:11)
[AWS CodeBuild Plugin] at createFsWatchInstance (/root/.cache/Cypress/3.3.0/Cypress/resources/app/packages/server/node_modules/chokidar/lib/nodefs-handler.js:37:15)
[AWS CodeBuild Plugin] at setFsWatchListener (/root/.cache/Cypress/3.3.0/Cypress/resources/app/packages/server/node_modules/chokidar/lib/nodefs-handler.js:80:15)
[AWS CodeBuild Plugin] at FSWatcher.NodeFsHandler._watchWithNodeFs (/root/.cache/Cypress/3.3.0/Cypress/resources/app/packages/server/node_modules/chokidar/lib/nodefs-handler.js:228:14)
[AWS CodeBuild Plugin] at FSWatcher.NodeFsHandler._handleFile (/root/.cache/Cypress/3.3.0/Cypress/resources/app/packages/server/node_modules/chokidar/lib/nodefs-handler.js:255:21)
[AWS CodeBuild Plugin] at FSWatcher.<anonymous> (/root/.cache/Cypress/3.3.0/Cypress/resources/app/packages/server/node_modules/chokidar/lib/nodefs-handler.js:473:21)
[AWS CodeBuild Plugin] at /root/.cache/Cypress/3.3.0/Cypress/resources/app/packages/server/node_modules/graceful-fs/polyfills.js:285:20
[AWS CodeBuild Plugin] at FSReqWrap.oncomplete (fs.js:153:5)
[AWS CodeBuild Plugin]
Desired behavior:
Cypress should run normally.
With version 3.2.0 same configuration this does not happens
Steps to reproduce: (app code and test code)
Use AWS Codebuild with NodeJS image, install Cypress 3.3.0 in it and try to run tests, it will fail
Versions
AWS Codebuild, Node 10.15.1, Yarn 1.13.0, Cypress 3.3.0
Issue Analytics
- State:
- Created 4 years ago
- Comments:20 (5 by maintainers)
Top Results From Across the Web
Troubleshooting AWS CodeBuild
Issue: When you try to run a build project, the build fails with this error. Possible cause: Your source repository has a self-signed...
Read more >Changelog - Cypress Documentation
When a chromium based browser tab or process crashes, Cypress will no longer hang indefinitely but will fail the current test and move...
Read more >Cypress AWS codebuild error: spec must be a string or ...
My problem is the environments that I use during the cypress command are getting as empty. - echo $CY_GROUP_SPEC - CY_GROUP=$(echo $ ...
Read more >cypress: Versions - Openbase
Changelog: https://docs.cypress.io/guides/references/changelog#10-3-1 ... We now collect environment variables for AWS CodeBuild when recording to the ...
Read more >All the AWS CodeBuild You Can Stomach in 45 Minutes
GitHub project: https://github.com/krimple/ptw-2020- codebuild -sample (slides are in the presentation-slides.pdf file).OK, let's face it.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Fo those who are struggling with this issue on AWS Codebuild, enabling privileged mode on the build allows to modify sysctl parameters, including
fs.inotify.max_user_watches
:I think the best solution here is to not register the file watchers when using
cypress run
what do you think @jennifer-shehane ?