When running e2e tests using UI on Cypress, after several seconds of running normally, the explorer suddenly comes white and shows next message on terminal:
<--- JS stacktrace --->
[72464:0716/101731.973912: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
Just for information, I’m testing for a UI hosted in Docker, and it works propperly whithout using Cypress UI.
I don’t know how to upgrade memory assigned to process or solve this (apart from spare the test in smaller parts).
I tried to spare the tests and worked perfect.
And limit the resources used with Cypress configuration modification:
setupNodeEvents(on, config) {
on("before:browser:launch", (browser, launchOptions) => {
if (["chrome", "electron", "chromium", "edge"].includes(browser.name)) {
if (browser.isHeadless) {
launchOptions.args.push("--no-sandbox");
launchOptions.args.push("--disable-gl-drawing-for-tests");
launchOptions.args.push("--disable-gpu");
}
launchOptions.args.push("--js-flags=--max-old-space-size=3500");
}
return launchOptions;
});
}