cypress
cypress copied to clipboard
Chromium render crash with error: "Expected DataContext to already have been set via setCtx."
Current behavior
During the execution of my E2E tests, after I restart the test suite multiple times, cypress crashes with the following:
<--- Last few GCs --->
[93310:0x148028000] 401676 ms: Scavenge 1026.8 (1336.4) -> 1020.4 (1336.4) MB, 1.7 / 0.0 ms (average mu = 0.991, current mu = 0.989) allocation failure;
[93310:0x148028000] 402104 ms: Scavenge 1027.3 (1336.4) -> 1020.7 (1336.4) MB, 2.0 / 0.0 ms (average mu = 0.991, current mu = 0.989) allocation failure;
[93310:0x148028000] 402283 ms: Scavenge 1027.9 (1336.4) -> 1021.3 (1336.4) MB, 2.0 / 0.0 ms (average mu = 0.991, current mu = 0.989) allocation failure;
<--- JS stacktrace --->
[93310:1117/160842.827359:ERROR:v8_initializer.cc(730)] V8 process OOM (Oilpan: Reserving memory.).
We detected that the Chromium Renderer process just crashed.
This is the equivalent to seeing the 'sad face' when Chrome dies.
This can happen for a number of different reasons:
- You wrote an endless loop and you must fix your own code
- You are running Docker (there is an easy fix for this: see link below)
- You are running lots of tests on a memory intense application
- You are running in a memory starved VM environment
- There are problems with your GPU / GPU drivers
- There are browser bugs in Chromium
You can learn more including how to fix Docker here:
https://on.cypress.io/renderer-process-crashed
Error:
Expected DataContext to already have been set via setCtx. If this is a
testing context, make sure you are calling "setCtx" in a before hook,
otherwise check the application flow.
at c (<embedded>:2514:115729)
at Object.u (<embedded>:2744:208093)
at Object.<anonymous> (<embedded>:2750:53610)
at Object.tryCatcher (/Users/cc-user/Library/Caches/Cypress/11.1.0/Cypress.app/Contents/Resources/app/node_modules/bluebird/js/release/util.js:16:23)
at Object.execute (/Users/cc-user/Library/Caches/Cypress/11.1.0/Cypress.app/Contents/Resources/app/node_modules/bluebird/js/release/method.js:15:34)
at C.close (<embedded>:2802:337415)
at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
The Test Runner unexpectedly exited via a exit event with signal SIGABRT
Please search Cypress documentation for possible solutions:
https://on.cypress.io
Check if there is a GitHub issue describing this crash:
https://github.com/cypress-io/cypress/issues
Consider opening a new issue.
----------
Platform: darwin-arm64 (21.5.0)
Cypress Version: 11.1.0
Desired behavior
No response
Test code to reproduce
This isn't linked to a specific test case, it happens after I retry a (longer) test case multiple times in a row
Cypress Version
11.1.0
Node version
v14.19.1
Operating System
macOS 12.4
Debug Logs
No response
Other
Issue happens in headed mode, rarely in headless mode during pipeline executions. Browsers that I tried this with are:
- Electron
- Chrome
I have the same problem, but with a different error.
**The Test Runner unexpectedly exited via a exit event with signal SIGABRT
Please search Cypress documentation for possible solutions:
https://on.cypress.io
Check if there is a GitHub issue describing this crash:
https://github.com/cypress-io/cypress/issues
Consider opening a new issue.
Platform: darwin-x64 (20.5.0) Cypress Version: 10.3.1**
@vergjor, This seems like a duplicate of #23391. I think that the CTX error is a byproduct of the chrome rendering crashing.
Closing as a duplicate.
@Luandersonalmeida, This is likely a separate issue, Could you log a new ticket with steps to reproduce?