If "We detected that the Chromium Renderer process just crashed." still output report

See original GitHub issue

Current behavior:

If cypress crashes due to “We detected that the Chromium Renderer process just crashed.”, it does not produce a mocha report:

Checkout Test
 ✓ Can load the site (5958ms)
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
- There is a memory leak in Cypress (unlikely but possible)
- 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
 (Results)
 ┌──────────────────────────────────────┐
 │ Tests: 0 │
 │ Passing: 0 │
 │ Failing: 1 │
 │ Pending: 0 │
 │ Skipped: 0 │
 │ Screenshots: 0 │
 │ Video: true │
 │ Duration: 0 seconds │
 │ Spec Ran: checkout/basic.spec.js │
 └──────────────────────────────────────┘
 (Video)
 - Started processing: Compressing to 32 CRF
 - Finished processing: frontend/tmp/cypress/videos/checkout/basic.spec.js.mp4 (6 seconds)

^^ (Note no mocha report is generted)

Desired behavior:

The mocha report is also outputted/saved, this is so that (for us) the mocha-awesome report can be generated and uploaded via our CI.

Steps to reproduce: (app code and test code)

Make the chrome renderer crash.

Versions

Latest cypress, we are running on CI/CD (AWS CodeBuild) - all other tests are fine, it’s this one that randomly crashes. (Thats another issue).

If this is an issue with the reporter - please let me know and I’ll raise an issue there.

Thanks 😃

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:11
  • Comments:22

github_iconTop GitHub Comments

29reactions
JoniVRcommented, Feb 26, 2020

Here’s our workaround for Cypress 4.0.2 (we use Gitlab CI):

  1. We changed our run command to use chrome instead of electron
"e2e-headless": "ng e2e --headless --browser chrome",

(might be a different command for you because we use angular, just append --browser chrome)

  1. Then inside the cypress/plugins/index.js file we added the following to enable the --disable-dev-shm-usage chrome flag:
module.exports = (on, config) => {
  // `on` is used to hook into various events Cypress emits
  // `config` is the resolved Cypress config

  on('before:browser:launch', (browser = {}, launchOptions) => {
    // `args` is an array of all the arguments that will
    // be passed to browsers when it launches

    if (browser.family === 'chromium' && browser.name !== 'electron') {
      // see: https://github.com/cypress-io/cypress/issues/3633
      launchOptions.args.push('--disable-dev-shm-usage');

      // whatever you return here becomes the launchOptions
      return launchOptions;
    }
  });
};
  1. In our ci conflig, we changed the image to:
image: cypress/browsers:node12.13.0-chrome80-ff73

So we could use chrome 80 (not sure if chrome 80 is necessary but doesn’t hurt)

After that our CI passed without issues, hope this helps any other poor souls running into this 😃

9reactions
JoniVRcommented, Feb 26, 2020

We are running into the same issue on Gitlab CI

Technology Version
Cypress 4.0.2
Electron Electron 78 (headless)
Read more comments on GitHub >

github_iconTop Results From Across the Web

The Chromium Renderer process just crashed - 'sad face ...
Hi, I am running m cypress script in headless mode on a remote ubuntu 18.03 machine. The strange thing is that it works...
Read more >
Chromium Renderer process just crashed on Jenkins
If "We detected that the Chromium Renderer process just crashed." still output report #3602 · "Out of memory. size=47701480 - We detected that ......
Read more >
cypress-io/cypress - Gitter
We detected that the Chromium Renderer process just crashed. This is the equivalent to seeing the 'sad face' when Chrome dies. This can...
Read more >
Fixing Cypress errors part 1: chromium out of memory crashes
I have applied solution 2, 3 and 4 but it does not work for me. Still show: "We detected that the Chromium Renderer...
Read more >
1107403 - GPU process crashes with high chance if you ...
And that is totally unrelated. Chrome doesnt seem to totally crash, just all tabs and windows become white for a second and then...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found