Cypress tests failing because Chrome Renderer is crashing in CI (using drone)
We were able to fix this by disabling Chrome's usage of /dev/shm
completely, by adding this to our plugins/index.js
-file.
From Cypress version 4 syntax:
on('before:browser:launch', (browser, launchOptions) => { if (browser.name === 'chrome') { launchOptions.args.push('--disable-dev-shm-usage') } return launchOptions})
Until Cypress version 3 syntax:
on('before:browser:launch', (browser = {}, args) => { if (browser.name === 'chrome') { args.push('--disable-dev-shm-usage') } return args})
Source: https://github.com/cypress-io/cypress/issues/350#issuecomment-574072211
If your CI environment is running the Cypress Test Runner and a browser within a docker image, you can specify the --ipc=host
argument to use the host system’s IPC namespace.
Check specific details for your CI environment to find out how to include this argument when running your image.
This is a known issue tracked on the Cypress Github Issues as ticket #350:https://github.com/cypress-io/cypress/issues/350
Unfortunately setting the --ipc=host
argument from Drone is not currently supported.