Cypress 10.3.1: System limit for number of file watchers reached
See original GitHub issueCurrent behavior
Hello, Iβm trying to run Cypress in GitLab CI using the cypress/base:16
image.
I run my tests with the following command:
cypress run --headless --component --config watchForFileChanges=false
Additionally I have disabled file watching in vite.config.js
, however Iβm getting the following error on every run:
(Run Starting)
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Cypress: 10.3.1 β
β Browser: Electron 100 (headless) β
β Node Version: v16.14.2 (/usr/local/bin/node) β
β Specs: 21 found (app-banner.cy.js, todo.cy.js, actions.cy.js, aliasing.cy.js, asserti β
β ons.cy.js, connectors.cy.js, cookies.cy.js, cypress_api.cy.js, files.cy.js, lo β
β cal_storage.cy.js, location.cy.js, misc.cy.js, navigation.cy.js, network_reque β
β sts.cy.js, querying.cy....) β
β Searched: **/*.cy.{js,jsx,ts,tsx} β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Running: app-banner.cy.js (1 of 21)
Your configFile threw an error from: cypress.config.js
We stopped running your tests because your config file crashed.
Error: ENOSPC: System limit for number of file watchers reached, watch '/builds/technical-design/ripe-app-webcomponents/cache/Cypress/10.3.1/Cypress/resources/app/packages/data-context/src/codegen/index.js'
at FSWatcher.<computed> (node:internal/fs/watchers:244:19)
at Object.watch (node:fs:2251:34)
at createFsWatchInstance (file:///builds/technical-design/ripe-app-webcomponents/node_modules/vite/dist/node/chunks/dep-71eb12cb.js:47466:17)
at setFsWatchListener (file:///builds/technical-design/ripe-app-webcomponents/node_modules/vite/dist/node/chunks/dep-71eb12cb.js:47513:15)
at NodeFsHandler$1._watchWithNodeFs (file:///builds/technical-design/ripe-app-webcomponents/node_modules/vite/dist/node/chunks/dep-71eb12cb.js:47668:14)
at NodeFsHandler$1._handleFile (file:///builds/technical-design/ripe-app-webcomponents/node_modules/vite/dist/node/chunks/dep-71eb12cb.js:47732:23)
at NodeFsHandler$1._addToNodeFs (file:///builds/technical-design/ripe-app-webcomponents/node_modules/vite/dist/node/chunks/dep-71eb12cb.js:47974:21)
This is similar to #22054 and #17173 for example
Desired behavior
Not throw an error and disable file watching
Test code to reproduce
I might get around to this later
Cypress Version
10.3.1
Other
No response
Issue Analytics
- State:
- Created a year ago
- Comments:11 (7 by maintainers)
Top Results From Across the Web
Cypress crashing on Linux > System limit for number of file ...
Hi, daily user of Cypress here. Just found this corner case where Cypress.js is crashing. Steps to reproduce Not exactly sure but overallΒ ......
Read more >React Native Error: ENOSPC: System limit for number of file ...
Each file watch takes up 540 bytes (32-bit) or ~1kB (64-bit), so assuming that all 524,288 watches are consumed, that results in an...
Read more >Changelog - Cypress Documentation
10.3.1. Released 7/19/2022. Bugfixes: Fixed an issue where file watchers were not completely closed prior to the Cypress App quitting, causing crashes onΒ ......
Read more >Error: ENOSPC: System limit for number of file watchers reached
The pipeline has steps when it runs UI tests using Cypress. Recently we upgraded Cypress from 7.3.0 to 7.7.0 and new issue about...
Read more >node:internal/fs/watchers:252 throw error; - You.com | The AI ...
I am totally new in React/nodjs world, but I am struggling with it for couple of days. I have installed node-v13.50.0-x64 Then I...
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
Thanks for the tip, but as explained above, I already found a workaround
However my understanding is that file watching should be disabled if I pass
--config watchForFileChanges=false
so this shouldnβt be happening at all.Is it possible that this option is not being picked up by Cypress?
Oh yeah thatβs right π€¦π» . Sorry about that!
Definitely possible. Iβll give https://github.com/TommasoAmici/cypress-repro-23061 a clone and do some debugging to see whatβs going on.