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 crashed with error: JavaScript heap out of memory #21280

Closed
tit opened this issue Apr 30, 2022 · 3 comments
Closed

Cypress crashed with error: JavaScript heap out of memory #21280

tit opened this issue Apr 30, 2022 · 3 comments
Labels
type: duplicate This issue or pull request already exists

Comments

@tit
Copy link

tit commented Apr 30, 2022

Current behavior

I have more than 800 tests running inside Docker/Jenkins.
Docker: cypress/included:9.6.0
A full run of the tests takes approximately 16 hours.
About 90% of the tests fail with an error.

16:46:29    C542557
16:47:37      ✓ last passed test (66055ms)
16:47:37  
16:47:37  
16:47:37    1 passing (1m)
16:47:37  
16:47:37  [mochawesome] Report JSON saved to /home/ubuntu/workspace/results/mochawesome_results/mochawesome_788.json
16:47:37  
16:47:42  
16:47:42  <--- Last few GCs --->
16:47:42  
16:47:42  [96:0x4dc001dc000] 57881350 ms: Mark-sweep 1963.1 (2067.1) -> 1962.4 (2065.1) MB, 1545.7 / 0.1 ms  (average mu = 0.934, current mu = 0.129) allocation failure scavenge might not succeed
16:47:42  [96:0x4dc001dc000] 57883793 ms: Mark-sweep 1970.1 (2065.1) -> 1969.9 (2081.1) MB, 2413.7 / 0.1 ms  (average mu = 0.843, current mu = 0.012) allocation failure scavenge might not succeed
16:47:42  
16:47:42  
16:47:42  <--- JS stacktrace --->
16:47:42  
16:47:42  [96:0430/134741.526166:ERROR:node_bindings.cc(143)] Fatal error in V8: Reached heap limit Allocation failed - JavaScript heap out of memory
16:47:42  [278:0100/000000.936143:ERROR:connection.cc(66)] X connection error received.
16:47:42  [278:0100/000000.936182:ERROR:connection.cc(66)] X connection error received.
16:47:42  jake aborted.
16:47:42  Error: The Test Runner unexpectedly exited via a exit event with signal SIGSEGV
16:47:42  
16:47:42  Please search Cypress documentation for possible solutions:
16:47:42  
16:47:42  https://on.cypress.io/
16:47:42  
16:47:42  Check if there is a GitHub issue describing this crash:
16:47:42  
16:47:42  https://github.com/cypress-io/cypress/issues
16:47:42  
16:47:42  Consider opening a new issue.
16:47:42  
16:47:42  ----------
16:47:42  
16:47:42  Platform: linux-x64 (Debian - 11.3)
16:47:42  Cypress Version: 9.6.0
16:47:42      at /home/ubuntu/workspace/node_modules/cypress/lib/errors.js:265:17
16:47:42      at tryCatcher (/home/ubuntu/workspace/node_modules/bluebird/js/release/util.js:16:23)
16:47:42      at Promise._settlePromiseFromHandler (/home/ubuntu/workspace/node_modules/bluebird/js/release/promise.js:547:31)
16:47:42      at Promise._settlePromise (/home/ubuntu/workspace/node_modules/bluebird/js/release/promise.js:604:18)
16:47:42      at Promise._settlePromise0 (/home/ubuntu/workspace/node_modules/bluebird/js/release/promise.js:649:10)
16:47:42      at Promise._settlePromises (/home/ubuntu/workspace/node_modules/bluebird/js/release/promise.js:729:18)
16:47:42      at Promise._fulfill (/home/ubuntu/workspace/node_modules/bluebird/js/release/promise.js:673:18)
16:47:42      at Promise._resolveCallback (/home/ubuntu/workspace/node_modules/bluebird/js/release/promise.js:466:57)
16:47:42      at Promise._settlePromiseFromHandler (/home/ubuntu/workspace/node_modules/bluebird/js/release/promise.js:559:17)
16:47:42      at Promise._settlePromise (/home/ubuntu/workspace/node_modules/bluebird/js/release/promise.js:604:18)
16:47:42      at Promise._settlePromise0 (/home/ubuntu/workspace/node_modules/bluebird/js/release/promise.js:649:10)
16:47:42      at Promise._settlePromises (/home/ubuntu/workspace/node_modules/bluebird/js/release/promise.js:729:18)
16:47:42      at Promise._fulfill (/home/ubuntu/workspace/node_modules/bluebird/js/release/promise.js:673:18)
16:47:42      at Promise._resolveCallback (/home/ubuntu/workspace/node_modules/bluebird/js/release/promise.js:466:57)
16:47:42      at Promise._settlePromiseFromHandler (/home/ubuntu/workspace/node_modules/bluebird/js/release/promise.js:559:17)
16:47:42      at Promise._settlePromise (/home/ubuntu/workspace/node_modules/bluebird/js/release/promise.js:604:18)

Tests are run via the Cypress Module API inside the Jake.
I tried running tests with a flag for node: node --max-old-space-size=8192 /usr/local/bin/npx jake cypress:run:ci.
It didn't help.

Desired behavior

Tests should not crashed

Test code to reproduce

I can't provide a working repository with tests...

Cypress Version

9.6.0

Other

No response

@davidmunechika
Copy link
Contributor

davidmunechika commented May 2, 2022

Duplicate of: #21124, #20846, #17853

@davidmunechika davidmunechika added the type: duplicate This issue or pull request already exists label May 2, 2022
@mjhenkes
Copy link
Member

mjhenkes commented May 2, 2022

@tit Thanks for reporting this, It looks like this is a duplicate of #17853, Please follow along with that thread for any resolutions.

@mjhenkes mjhenkes closed this as completed May 2, 2022
@insistedMarin
Copy link

I get the same problem at version 11.2.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

4 participants