skip to content

Your Playwright suite suddenly fails with "Executable doesn't exist at .../chromium-1244/..." after a dependency update. What happened?

level: seniorimportance: must knowfreq 53%

answer

  1. The package moved, the revision moved
  2. Builds sit in revision-stamped folders
  3. Fresh clone, empty engine cache
  4. The error names its own fix
  5. Check --list before blaming tests

basics

~20 s

The Playwright package moved to a version that expects a newer engine revision, and nobody re-ran the download. Engine builds live in revision-stamped folders, so the runtime looked for a build that was never installed.

solid answer

~40 s

Playwright pins an engine revision per release and stores builds in revision-stamped folders such as `chromium-1244`. Upgrading `@playwright/test` changes the revision the runtime expects, so the old build on disk no longer satisfies it and you get `Executable doesn't exist at ...` — with a box in the message naming `npx playwright install` as the fix. A fresh clone shows the same symptom for the same reason: `node_modules` is populated but the engine cache is not. Two other causes look identical: `PLAYWRIGHT_BROWSERS_PATH` set for the install but not the run, and Playwright's housekeeping removing a build no installation still references. Diagnose with `npx playwright install --list`, fix with `npx playwright install`, add `--force` if a build is present but suspect.

code

bash · 4 lines
bash
npx playwright --version
npx playwright install --list
npx playwright install
npx playwright install --force chromium

go deeper

for a junior

Recognise this error as a missing engine build rather than a broken test, and run the install command that the message itself prints before changing any code.

for a middle

Explain why the upgrade caused it: the release pins an engine revision, builds live in revision-stamped folders, and the newly expected folder was never downloaded.

for a senior

Separate the identical-looking causes — a version bump, a path mismatch, housekeeping removal — and reach for --list as evidence before reinstalling blindly.

for a principal

Make the class of failure impossible: bind the engine install to dependency installation, pin the version in the lockfile, and treat engine upgrades as a scheduled, reviewable event.

## What the message is really saying `Executable doesn't exist at ...` is thrown when Playwright resolves the path where the engine build for *this* Playwright version should be and finds nothing there. The message includes the path it looked at and an ASCII box that says Playwright was just installed or updated and names the command to fix it. The revision in the path — `chromium-1244` and friends — is the clue: engine builds are stored in **revision-stamped folders**, and the revision comes from the `browsers.json` manifest inside the installed `playwright-core` package. So the sentence to say in an interview is: the package version moved, the expected revision moved with it, and nobody re-ran the install. ## The usual causes, in order of likelihood 1. **A dependency bump.** Someone upgraded `@playwright/test`. The new version expects a newer engine revision, the old build is still on disk under its old folder name, and the download step never ran. A fresh clone of the hotel-booking repo is the same story: `node_modules` is populated, the engine cache is empty. 2. **A path mismatch.** `PLAYWRIGHT_BROWSERS_PATH` is set for one half of the work and not the other, so the install wrote to one directory and the run looks in another. The build exists; the runtime is looking somewhere else. 3. **Housekeeping removed it.** Playwright deletes builds that no installation still references, so downgrading, or removing the checkout that pinned an old version, can take a build with it. 4. **A partial or corrupted download.** Rarer, and it usually shows as a build that exists but will not start rather than one that is absent. ## Fixing it - Run `npx playwright install` — the error text names this command, and on a version bump it is the whole fix. Add an engine name to narrow it. - Run `npx playwright install --list` first when you want evidence: it prints the builds present across every Playwright installation on the machine, so you can see whether the expected revision is genuinely missing or merely in another directory. - Use `--force` when a build is present but suspect; it reinstalls rather than skipping what looks already installed. - If `PLAYWRIGHT_BROWSERS_PATH` is in play, set it identically for the install and the run, and prefer an absolute path so both halves agree. ## Stopping it from recurring The durable fix is to stop treating the engine download as a thing humans remember. Tie it to the dependency install so that whatever refreshes `node_modules` also refreshes the engines, and keep the Playwright version pinned in the lockfile so the expected revision only moves when someone deliberately moves it. Two habits do most of the work: - **Upgrade Playwright as one act**: change the version, run the install, commit both. - **Make the first failure legible**: this error is loud and self-describing, so resist wrapping the run in a script that swallows the message — the box in the output already contains the answer. ## What it is not It is not a flaky test, a bad locator, or an application problem in the booking flow. It fires before any page is opened, it fires identically for every test, and it names a filesystem path. Treat any suite-wide, instantaneous, path-naming failure as an environment problem and check the engine cache before reading a single test.

  • The same error appears but --list shows the expected revision present. What now?
    Suspect a location mismatch. `PLAYWRIGHT_BROWSERS_PATH` read at install time and at run time must agree, so a variable exported in one shell and not the other sends the runtime to the default cache while the build sits elsewhere. Set it identically for both halves, using an absolute path.
  • How do you stop this recurring on every upgrade?
    Stop relying on memory. Tie the engine install to whatever refreshes dependencies so both move together, and keep the Playwright version pinned in the lockfile so the expected revision only changes when someone deliberately changes it. Upgrading then becomes one act: bump, install, commit.
  • How can you tell this apart from a flaky test?
    It fires before any page opens, hits every test identically and instantly, and names a filesystem path. Flakiness is partial, timing-dependent and test-specific. Any suite-wide, instantaneous, path-naming failure is an environment problem and the engine cache is the first thing to check.

saying these in an interview costs you the question

  • Blames flaky tests for a suite-wide instant failure
  • Reinstalls node modules and expects engines to follow
  • Ignores the fix printed inside the error message
  • Assumes the engine cache upgrades itself
  • Pins the package but never re-runs the install