Playwright "Executable doesn't exist" - Run npx playwright install
Playwright tried to launch a browser whose binary is not on disk. Installing the npm package does not download browsers - you must run npx playwright install (or use the official image).
What this error means
Tests fail before running with "browserType.launch: Executable doesn't exist at .../chromium-XXXX/chrome-linux/chrome." The message even prints the install command; every test errors identically because no browser is present.
browserType.launch: Executable doesn't exist at
/home/runner/.cache/ms-playwright/chromium-1140/chrome-linux/chrome
Looks like Playwright Test or Playwright was just installed or updated.
Please run the following command to download new browsers:
npx playwright installDiagnose it: browser, server, or timing?
End-to-end failures in CI are dominated by three causes that have nothing to do with the test: the browser binary is missing, the application under test is not listening yet, or the test raced the page. Establish which before reading the assertion.
# 1. are the browsers actually installed in THIS job?
npx playwright install --with-deps chromium
npx playwright --version
# 2. is the app up before the tests start?
npx wait-on http://localhost:3000 --timeout 60000
# 3. capture evidence for the failure you cannot reproduce
npx playwright test --trace on --video retain-on-failureCommon causes
Browsers never downloaded
npm ci installs @playwright/test but not the browser binaries. Without an explicit playwright install step, the executable is missing.
Version drift between package and cache
After a Playwright upgrade, the new version expects a newer browser build than what is cached, so the path it looks for does not exist.
How to fix it
Install the browsers (with OS deps)
Run the install step after npm ci; --with-deps also installs the Linux system libraries the browsers need.
npm ci
npx playwright install --with-deps
npx playwright testOr use the official Playwright image
# in CI
container: mcr.microsoft.com/playwright:v1.49.0-jammyMake the browser cache safe
- Key the browser cache to the exact test-runner version. A cache restored from a different version gives you a binary that does not match the client and fails in a way that reads like a missing install.
- Install browsers after dependencies, not before; a dependency install can replace the package that owns the browser path.
- Prefer the vendor container image when the runner allows it. It removes the whole class of missing-system-library failures.
How to prevent it
- Run
npx playwright install --with-depsafter dependency install in CI. - Cache
~/.cache/ms-playwrightkeyed on the Playwright version. - Prefer the official Playwright Docker image for a matched toolchain.