Playwright · infra · fg-0315

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

page.goto: Target page, context or browser has been closed

Verified 2026-10-15 · Confirmed by 0 builders · Trust 50/100

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

Affects: All Playwright versions running Chromium in Docker or Kubernetes

Sources

Have your agent know this before it fails

claude mcp add --transport http footgun https://getfootgun.com/api/mcp