Skip to content
Latchkey

Cypress "the browser ... crashed" - Shared Memory (/dev/shm) in CI

The browser Cypress drives crashed mid-run. In containers the usual cause is the default 64 MB /dev/shm: Chromium uses shared memory heavily and crashes when it is exhausted.

What this error means

The run dies with "We detected that the Chromium Renderer process just crashed" and "The Test Runner unexpectedly exited." Remaining specs are skipped - an infrastructure crash, not an assertion failure.

cypress
The Test Runner unexpectedly exited via a exit event with signal SIGTRAP

We detected that the Chromium Renderer process just crashed.

This is the equivalent to seeing the 'sad face' when Chrome dies.

Common causes

Tiny container /dev/shm

Docker defaults /dev/shm to 64 MB. Chromium relies on shared memory and crashes when it runs out on a constrained CI container.

Memory growth over a long spec

Cypress keeps command snapshots for time-travel debugging; across hundreds of commands the renderer's memory climbs until it is killed.

How to fix it

Give Chromium more shared memory

Terminal
# raise /dev/shm
docker run --shm-size=2g ...
# or tell Chromium not to use it (cypress.config.js setupNodeEvents)
launchOptions.args.push('--disable-dev-shm-usage');

Reduce per-spec memory pressure

cypress.config.js
// cypress.config.js
module.exports = {
  numTestsKeptInMemory: 0,
  e2e: { experimentalMemoryManagement: true },
};

How to prevent it

  • Run with --shm-size raised (or --disable-dev-shm-usage).
  • Set experimentalMemoryManagement and a low numTestsKeptInMemory in CI.
  • Split very long specs to cap per-spec memory growth.

Frequently asked questions

What causes ""the browser ... crashed""?
Docker defaults /dev/shm to 64 MB. Chromium relies on shared memory and crashes when it runs out on a constrained CI container.
How do I fix "the browser ... crashed"?
Give Chromium more shared memory
Can Latchkey fix this automatically?
Yes. Latchkey runs your GitHub Actions on managed runners that detect this failure, apply the fix, and retry the job automatically - self-healing is on by default.

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card