Skip to content
Latchkey

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.

playwright
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 install

Diagnose 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.

Terminal
# 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-failure

Common 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.

Terminal
npm ci
npx playwright install --with-deps
npx playwright test

Or use the official Playwright image

.github/workflows/ci.yml
# in CI
container: mcr.microsoft.com/playwright:v1.49.0-jammy

Make 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-deps after dependency install in CI.
  • Cache ~/.cache/ms-playwright keyed on the Playwright version.
  • Prefer the official Playwright Docker image for a matched toolchain.

Frequently asked questions

What causes Playwright "Executable doesn't exist"?
There are 2 common causes: browsers never downloaded and version drift between package and cache. npm ci installs @playwright/test but not the browser binaries.
How do I fix Playwright "Executable doesn't exist"?
There are 2 fixes depending on which cause you have: install the browsers (with os deps) and or use the official playwright image. Work through them in order, since the first is the most common.
What does Playwright "Executable doesn't exist" actually mean?
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.
How do I stop Playwright "Executable doesn't exist" happening again?
Run npx playwright install --with-deps after dependency install in CI. The prevention section lists 3 changes that keep it from recurring.
Can Latchkey fix this automatically?
Yes. Latchkey runs your GitHub Actions on managed runners that detect this failure, apply the fix, and retry the job automatically - self-healing is on by default.

Related guides

References

This is a setup failure, not a bug in your code. Latchkey detects, repairs, and retries it for you. Start free → 30-day trial · No credit card