Playwright · infra · fg-0315

Chromium crashes mid-test in Docker with 'Target page, context or browser has been closed'

If you see page.goto: Target page, context or browser has been closed, the cause and the fix for Playwright are below, last verified 2026-10-15.

Verified Oct 2026trust 50/100
Symptom
page.goto: Target page, context or browser has been closedPage crashedCrashes appear on heavy pages or with several workers, never on a laptop
Cause
Docker gives containers a 64 MB /dev/shm by default, and Chromium uses shared memory for rendering. Without --ipc=host it runs out and the renderer dies.
Fix
Run the container with --ipc=host and --init, or raise shm size on platforms that do not allow host IPC.
Apply
docker run --rm --init --ipc=host mcr.microsoft.com/playwright:v1.64.0-noble npx playwright test # compose: ipc: host or shm_size: 2gb
Affected
All Playwright versions running Chromium in Docker or Kubernetes
Sources

Last verified 2026-10-15 · Confirmed by 0 builders

Related traps

Have your agent know this before it fails

$ /plugin marketplace add getfootgun/footgun
$ /plugin install footgun@footgun