cypress run occasionally crashes with node OOM errors
See original GitHub issueCurrent behavior:
<--- Last few GCs --->
[902:0x14d4055f4000] 1414367 ms: Mark-sweep 2050.4 (2142.6) -> 2050.4 (2142.6) MB, 2327.2 / 0.0 ms allocation failure GC in old space requested
[902:0x14d4055f4000] 1416781 ms: Mark-sweep 2050.4 (2142.6) -> 2050.4 (2141.6) MB, 2414.3 / 0.0 ms last resort
[902:0x14d4055f4000] 1418947 ms: Mark-sweep 2050.4 (2141.6) -> 2050.4 (2141.6) MB, 2165.5 / 0.0 ms last resort
<--- JS stacktrace --->
==== JS stack trace =========================================
Security context: 0x2fbf9512d681 <JSObject>
2: stringSlice(aka stringSlice) [buffer.js:556] [bytecode=0x193b5ab7ca49 offset=96](this=0x10df42502311 <undefined>,buf=0x334eb421b249 <Uint8Array map = 0x2c7df00ceb21>,encoding=0x2fbf9513e8a9 <String[4]: utf8>,start=0,end=404259)
4: toString [buffer.js:629] [bytecode=0x193b5ab7c681 offset=151](this=0x334eb421b249 <Uint8Array map = 0x2c7df00ceb21>,encoding=0x2fbf9513e8a9 <String[4]: utf8...
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
1: node::Abort() [/root/.cache/Cypress/3.0.1/Cypress/libnode.so]
2: 0x7faa08f32887 [/root/.cache/Cypress/3.0.1/Cypress/libnode.so]
3: 0x7faa08aa1a57 [/root/.cache/Cypress/3.0.1/Cypress/libnode.so]
4: 0x7faa08aa19d5 [/root/.cache/Cypress/3.0.1/Cypress/libnode.so]
5: v8::internal::Factory::NewRawTwoByteString(int, v8::internal::PretenureFlag) [/root/.cache/Cypress/3.0.1/Cypress/libnode.so]
6: v8::internal::Factory::NewStringFromUtf8(v8::internal::Vector<char const>, v8::internal::PretenureFlag) [/root/.cache/Cypress/3.0.1/Cypress/libnode.so]
7: v8::String::NewFromUtf8(v8::Isolate*, char const*, v8::NewStringType, int) [/root/.cache/Cypress/3.0.1/Cypress/libnode.so]
8: node::StringBytes::Encode(v8::Isolate*, char const*, unsigned long, node::encoding, v8::Local<v8::Value>*) [/root/.cache/Cypress/3.0.1/Cypress/libnode.so]
9: 0x7faa08f4e5d8 [/root/.cache/Cypress/3.0.1/Cypress/libnode.so]
10: 0x7faa08a71550 [/root/.cache/Cypress/3.0.1/Cypress/libnode.so]
11: 0x7faa088dfd98 [/root/.cache/Cypress/3.0.1/Cypress/libnode.so]
12: 0x7faa088df30e [/root/.cache/Cypress/3.0.1/Cypress/libnode.so]
13: 0x67697b843fd
Desired behavior:
No crash
Steps to reproduce:
circleci 2.0 config chrome67-ff65 docker img cypress-typescript-preprocessor 100 spec files
Versions
Cypress 3.0.1 Running chrome67-ff65 docker image on CircleCI 2.0 Ubuntu 16.04
Issue Analytics
- State:
- Created 5 years ago
- Comments:15 (5 by maintainers)
Top Results From Across the Web
Fixing Cypress errors part 1: chromium out of memory crashes
Error: Out of memory, chromium renderer crashed · Solution 1: Use --ipc=host Docker flag · Solution 2: Use --disable-dev-shm-usage Cypress flag.
Read more >Cypress Test Failing With "Out Of Memory" Error In ... - ADocLib
cypress-gh-action-small-example, Runs tests and records them on Cypress Dashboard. cypress run occasionally crashes with node OOM errors #1955 (2141.6) -> ...
Read more >Introduction to Cypress - Cypress Documentation
In Cypress there is no built in error recovery from a failed command. A command and its assertions all eventually pass, or if...
Read more >Resolving Out-of-Memory Issues - Gatsby
Occasionally larger Gatsby sites, or moderately-sized sites with unusual characteristics, run into out-of memory errors during gatsby build…
Read more >JavaScript Heap Out Of Memory Error | Felix Gerschau
By default, Node.js has memory limits that prevent the program from consuming too much memory and crashing the whole system. The results differ ......
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
I’ve run now into the same issue - Cypress 3.1.0, Mac OS X 10.13.6, Electron 59 The issue occurs while running a suite which contains of two tests. In the second test on the same request it fails with
<— Last few GCs —>
<— JS stacktrace —>
==== JS stack trace =========================================
Memory statements from CYPRESS_MEMORY=1 did not show a significant increase and as well no direct shortage of memory
The third info was taken after the last request was send - and directly after that the GC statement showed up.
After setting
video:false
in the configuration there was no change to the behavior. Same for the configuration optionnumTestsKeptInMemory
a reduction from the default value to e.g. did not provided a different result.We’re not running typescript - plain javascript tests.
Since you’re using typescript too, it might be the same issue as https://github.com/cypress-io/cypress/issues/2316