Browser end-to-end test failures — Executable doesn't exist / Timeout exceeded
Log signatures
Executable doesn't exist at /ms-playwright/chromium browserType.launch: Timeout 30000ms exceeded browser exited unexpectedly CypressError
What’s happening
E2E failures split into environment and test problems. Environment: "Executable doesn't exist" / "browserType.launch" errors mean the browser binary isn't installed in CI — for Playwright the classic miss is running npm ci but never npx playwright install --with-deps; "browser exited unexpectedly" is usually missing system libraries (headless Chrome needs a long list) or sandbox/SHM issues in containers. Test problems: "Timeout ...ms exceeded" on a locator(...) means the element never reached the expected state — either the app actually broke, the selector drifted from the DOM, or the test is racing the app (asserting before a network response settles).
Fix playbook
- 1Environment first: if the browser didn't launch, nothing else in the log matters. Add npx playwright install --with-deps (or the Cypress image) to CI and rerun.
- 2For locator timeouts, get artifacts before theorizing: Playwright traces (--trace on), screenshots and videos on failure. The trace shows the DOM at timeout — the answer is usually visible.
- 3Distinguish "element never appeared" (app or selector issue) from "element appeared then detached" (re-render race). The trace timeline tells you which.
- 4Fix races with web-first assertions that auto-wait (await expect(locator).toBeVisible()), never waitForTimeout(3000) — fixed sleeps are why the suite is flaky and slow.
- 5Selector drift: prefer role/test-id selectors (getByRole, data-testid) over CSS paths coupled to layout.
Prevention
- Run E2E against deterministic backends (seeded data, mocked third parties). Most "flaky E2E" is actually nondeterministic test data, not the browser.
Triage every red build, not just this one.
This page is one of 31 failure classes the open-source patchrail CLI matches from a raw log — locally, with secrets redacted first. If a log stumps it, open an issue; if it saves you a debugging morning, a star helps other maintainers find it.
pipx install patchrail