AI how-to notes · 2026-09-17 · last run 2026-09-17 · 한국어 원문
Playwright "Executable doesn't exist" — reproducing and fixing a missing browser executable on Windows
The short version
Playwright looks for a numbered browser folder matching the installed version, such as chromium_headless_shell-1243. Without it, it stops with Executable doesn't exist. Running npx playwright install chromium clears that, but Playwright MCP ships a different Playwright version and looked for a different number (chromium-1244). So the MCP side needed its own run of npx @playwright/mcp install-browser chrome-for-testing, the command its error message pointed at.
2026-09-28 addition: the Windows errors, downloads, and successful output in the main record are from 2026-09-17. Check again with public files near the end provides a new replacement for the private launch.js and a separate Linux validation scope. It is not a Windows rerun.
Symptoms
Call chromium.launch() from a script and it ends like this:
browserType.launch: Executable doesn't exist at C:\Users\User\AppData\Local\Temp\longtail_C2\browsers18\chromium_headless_shell-1243\chrome-headless-shell-win64\chrome-headless-shell.exe
╔════════════════════════════════════════════════════════════╗
║ Looks like Playwright was just installed or updated. ║
║ Please run the following command to download new browsers: ║
║ ║
║ npx playwright install ║
║ ║
║ <3 Playwright Team ║
╚════════════════════════════════════════════════════════════╝Call browser_navigate in Playwright MCP (--browser chromium) and the tool result comes back as an error.
### Error
Error: Browser "chrome-for-testing" is not installed; expected executable at C:\Users\User\AppData\Local\Temp\longtail_C2\browsers18\chromium-1244\chrome-win64\chrome.exe. Run `npx @playwright/mcp install-browser chrome-for-testing` to installBoth were staged on purpose. We reproduced them by pointing PLAYWRIGHT_BROWSERS_PATH at an empty temp folder (browsers18). For the personal browser cache (%LOCALAPPDATA%\ms-playwright), we compared only the child folder names before and after, and they matched (we never opened the contents).
What we tested on
| Item | Value |
|---|---|
| OS | Windows 11 Home (10.0.26200) |
| Shell | Git Bash (commands and logs) |
| Node.js | v24.19.0 |
playwright (installed locally in a temp folder) | Version 1.63.0 (npm view playwright version = 1.63.0) |
| Playwright MCP | @playwright/mcp@latest; the server reported version 1.64.0-alpha-2026-09-14 |
| Browsers folder | PLAYWRIGHT_BROWSERS_PATH=C:\Users\User\AppData\Local\Temp\longtail_C2\browsers18 (empty at the start) |
Why this happens — every version looks for a different folder
npm install playwright finished in 2 seconds (added 2 packages), and browsers18 was still empty afterwards. Installing the package and installing browsers are separate things. You can see what would go where, without installing, via --dry-run.
PLAYWRIGHT_BROWSERS_PATH='C:/Users/User/AppData/Local/Temp/longtail_C2/browsers18' npx playwright install --dry-run chromiumChrome for Testing 153.0.8010.12 (playwright chromium v1243)
Install location: C:\Users\User\AppData\Local\Temp\longtail_C2\browsers18\chromium-1243
...
Chrome Headless Shell 153.0.8010.12 (playwright chromium-headless-shell v1243)
Install location: C:\Users\User\AppData\Local\Temp\longtail_C2\browsers18\chromium_headless_shell-1243Run the same --dry-run without the environment variable and the install location changes to C:\Users\User\AppData\Local\ms-playwright\chromium-1243. That folder on this machine had chromium-1234 and chromium_headless_shell-1234, but no 1243 folders. Without the environment variable, 1.63.0 would likewise not have found a 1243 folder (we did not actually run it). The 1234 folders downloaded some time ago do not match the number 1.63.0 wants.
The script (1.63.0, headless) looked for chromium_headless_shell-1243; the MCP server (1.64.0 alpha, --headless --browser chromium) looked for chromium-1244\chrome-win64\chrome.exe. One folder needed browsers for two versions.
Fix 1 — for the script: npx playwright install chromium
export PLAYWRIGHT_BROWSERS_PATH='C:/Users/User/AppData/Local/Temp/longtail_C2/browsers18'
npx playwright install --no-progress chromiumChrome for Testing 153.0.8010.12 (playwright chromium v1243) downloaded to C:\Users\User\AppData\Local\Temp\longtail_C2\browsers18\chromium-1243
FFmpeg (playwright ffmpeg v1011) downloaded to C:\Users\User\AppData\Local\Temp\longtail_C2\browsers18\ffmpeg-1011
Chrome Headless Shell 153.0.8010.12 (playwright chromium-headless-shell v1243) downloaded to C:\Users\User\AppData\Local\Temp\longtail_C2\browsers18\chromium_headless_shell-1243
Winldd (playwright winldd v1007) downloaded to C:\Users\User\AppData\Local\Temp\longtail_C2\browsers18\winldd-1007Naming just chromium pulled down four things. Including the follow-up folder listing and size checks it took 30 seconds, and the sizes after install were as follows (du -sh).
| Folder | Size |
|---|---|
chromium-1243 | 433M |
chromium_headless_shell-1243 | 271M |
ffmpeg-1011 | 3.4M |
winldd-1007 | 260K |
| Total | 707M (du -sb 739,893,941 bytes) |
npx playwright install --help lists --only-shell (headless shell only) and --no-shell (skip the headless shell). If you only ever run headless, those look like a way to download less, but we did not try them.
Re-running the private launch.js worked immediately in the original test. This is the 2026-09-17 output; a public replacement file and runnable commands are provided near the end.
PLAYWRIGHT_BROWSERS_PATH= C:\Users\User\AppData\Local\Temp\longtail_C2\browsers18
browser version: 153.0.8010.12
title: longtail C2 18
OK 0.5sFix 2 — for MCP: the command in the error message
Even after 1243 was downloaded, MCP still reported the same missing chromium-1244. We ran the command from the error message, under the same environment variable.
export PLAYWRIGHT_BROWSERS_PATH='C:/Users/User/AppData/Local/Temp/longtail_C2/browsers18'
npx -y @playwright/mcp@latest install-browser --no-progress chrome-for-testingChrome for Testing 154.0.8037.0 (playwright chromium v1244) downloaded to C:\Users\User\AppData\Local\Temp\longtail_C2\browsers18\chromium-1244
Chrome Headless Shell 154.0.8037.0 (playwright chromium-headless-shell v1244) downloaded to C:\Users\User\AppData\Local\Temp\longtail_C2\browsers18\chromium_headless_shell-1244Including the verification commands it took 27 seconds and added 435M for chromium-1244 and 273M for chromium_headless_shell-1244, bringing the whole folder to 1.4G. Stderr carried a box warning to install project dependencies first: WARNING: It looks like you are running 'npx playwright install' without first installing your project's dependencies. The combined exit code including the verification commands was 0; we did not separately record the exit code of the install command alone. Typing install-browser --help produced the same help output as npx playwright install --help.
After that, MCP's browser_navigate succeeded (Page Title: longtail C2 test page, 3.5 seconds from when the checking client launched the server). The 1243 folders already downloaded were not removed, and the script ran again at OK 0.3s.
Results
| Order | What ran | Result |
|---|---|---|
| 1 | script node launch.js (empty folder) | exit code 1, Executable doesn't exist … chromium_headless_shell-1243 … |
| 2 | MCP browser_navigate (empty folder) | isError=true, Browser "chrome-for-testing" is not installed … chromium-1244 … |
| 3 | npx playwright install --no-progress chromium | 30s including verification, 707M, batch exit code 0 |
| 4 | script re-run | succeeded, browser version: 153.0.8010.12 |
| 5 | MCP re-run | still the missing chromium-1244 error |
| 6 | npx -y @playwright/mcp@latest install-browser --no-progress chrome-for-testing | 27s including verification, folder total 1.4G, batch exit code 0 |
| 7 | MCP re-run / script re-run | both succeeded |
| 8 | rm -rf on the 1.5G temp folder longtail_C2 | exit code 0, folder confirmed gone |
| - | child folder names under %LOCALAPPDATA%\ms-playwright | identical before the experiment, after both installs, and after deleting the temp folder (contents never opened) |
What didn't work
- Steps 1, 2, and 5 are failures we created on purpose.
- Our first two attempts at reproducing the MCP path were our own mistakes. While writing the config file we mishandled the backslashes in the Windows path: once that produced a JSON parse error (
Bad escaped character in JSON). The other time the value came out mangled asC:UsersUser…, and the server read it as a path relative to the working folder (…\longtail_C2\mcp18\UsersUser…) before erroring. Only after writing the path with forward slashes (C:/Users/...) did it reproduce in the folder we intended. If an environment variable value looks off, start from theexpected executable atpath in the error message.
What the 2026-09-17 test did not check
- Downloading into the default location (
%LOCALAPPDATA%\ms-playwright) with no environment variable. We avoided that to leave the personal cache alone. - What
--only-shell,--no-shell, and--with-depsactually do. - Which browser MCP picks with its default, without
--browser chromium— that is covered in Setting up Playwright MCP on Windows. We did not check the error text on a machine with no Chrome installed. - What the error looks like under the
@playwright/testrunner (npx playwright test). - Downloads from behind a corporate proxy or firewall, and macOS or Linux.
- The download time and size of the first
npx -y @playwright/mcp@latestrun.
Check again with public files — added 2026-09-28
Save playwright-launch.cjs, playwright-test.html, and mcp-smoke.mjs under those exact names in a separate empty folder. playwright-launch.cjs launches the browser, loads the sibling HTML with page.setContent(), checks its title, and closes the browser. This is a new example you can run without the private launch.js. You need Node.js and npm.
npm init -y
npm install --save-exact playwright@1.63.0 @modelcontextprotocol/sdk@1.30.1 @playwright/mcp@0.0.82In PowerShell, set a browser location as follows. Start in a fresh example folder with no prior browser download, and continue installation and execution in this same terminal.
$env:PLAYWRIGHT_BROWSERS_PATH = Join-Path $PWD 'browsers-check'For Git Bash or Linux Bash, use this line instead:
export PLAYWRIGHT_BROWSERS_PATH="$PWD/browsers-check"Run the script first to check the missing-browser condition in that location:
node playwright-launch.cjsInstall the browser for the script, then run the same check again:
npx playwright install chromium
node playwright-launch.cjsThe recovery criteria are title: DADDYNOTE browser check, OK, and exit code 0. These are success criteria, separate from the new validation scope reported below.
To check MCP too, save navigate.json with this content. This opens a blank page to test browser launch without needing a local HTTP server.
{"url":"about:blank"}node mcp-smoke.mjs --call browser_navigate --args-file navigate.json -- node node_modules/@playwright/mcp/cli.js --headless --isolated --browser chromiumIf the tool result says its browser is missing, run the MCP package's installer and repeat the same call. The client forwards PLAYWRIGHT_BROWSERS_PATH to the server.
node node_modules/@playwright/mcp/cli.js install-browser chrome-for-testing
node mcp-smoke.mjs --call browser_navigate --args-file navigate.json -- node node_modules/@playwright/mcp/cli.js --headless --isolated --browser chromiumAn event: "result" with isError: true is not recovery; the public client also exits with code 1 in that case. The public-client section in Setting up Playwright MCP includes a complete example for opening the HTML over local HTTP.
The new files were checked on 2026-09-28 using Linux, Node.js 24.19.0, playwright 1.63.0, SDK 1.30.1, and @playwright/mcp 0.0.82. With its browser missing, the new playwright-launch.cjs reported Executable doesn't exist and exited 1. The MCP server connected and listed 25 tools. Browser downloads failed with ZIP errors, so successful recovery through the default install path is not part of this new validation. Separately, passing an existing Chromium executable path as the optional argument to playwright-launch.cjs produced title: DADDYNOTE browser check, OK, and exit code 0 on Linux Chromium 153.0.8010.0. That executable came from @sparticuz/chromium 153.0.0; this does not verify default-install recovery. Actual MCP navigation using the same browser failed at the server's internal Unix socket with listen EPERM; the client propagated isError: true and exit code 1. PowerShell and Windows execution were not retested. We rechecked the version-specific installation and environment-variable guidance in the official browser docs, and the options in the MCP README, that day.