Skip to content

date: 2026-06-11 tags: [pest-browser, playwright, web-env, dead-end, ci] status: archived graduated_to:

pest-browser tests can't run locally in the root web container — verify on CI (WRONG — superseded)

Superseded 2026-06-12 by [[2026-06-12-pest-browser-works-in-web-container]]: the root cause below is incorrect. Playwright adds --no-sandbox by default (chromiumSandbox defaults to false), so no knob is needed and root is not a blocker. The hang was an incompletely provisioned container (partial vendor/, missing node_modules/browser/assets) — fixed in the SessionStart hook. Browser tests run fine in the web container; do not treat them as CI-only.

Symptom — trying to reproduce a failing browser test locally: after npx playwright install --with-deps chromium, the run hung (a Playwright server started but Chromium never launched); a retry was killed with zero output.

Root cause (as misdiagnosed at the time) — Chromium refuses to launch as root without --no-sandbox, pest-plugin-browser exposes no launch-args knob to pass it, and the sandbox kills the in-process amphp HTTP server pest-browser binds. So local browser repro is a dead end in this container — even after installing Playwright.

Fix — see the superseding learning.

Guard — (composer ci:check still excludes --group=browser — a green local gate never implies the browser tests ran; run composer test:browser for those.)