[BUG] Failed to launch chromium because executable doesn't exist
See original GitHub issueEdit from the Playwright team š£
npx playwright install
Will fix it and install your browsers as expected.
I am attempting to install Playwright but cannot get past the following error when trying to run a basic test:
Failed to launch chromium because executable doesn't exist at /Users/danawoodman/Library/Caches/ms-playwright/chromium-799411/chrome-mac/Chromium.app/Contents/MacOS/Chromium
Try re-installing playwright with "npm install playwright"
Note: use DEBUG=pw:api environment variable and rerun to capture Playwright logs.
at Chromium._launchProcess (node_modules/playwright/lib/server/browserType.js:123:19)
at async Chromium._innerLaunch (node_modules/playwright/lib/server/browserType.js:66:75)
at async ProgressController.run (node_modules/playwright/lib/server/progress.js:74:28)
at async Chromium.launch (node_modules/playwright/lib/server/browserType.js:54:25)
at async BrowserServerLauncherImpl.launchServer (node_modules/playwright/lib/browserServerImpl.js:32:25)
at async PlaywrightRunner.getTests (node_modules/jest-playwright-preset/lib/PlaywrightRunner.js:56:56)
at async PlaywrightRunner.runTests (node_modules/jest-playwright-preset/lib/PlaywrightRunner.js:87:30)
at async TestScheduler.scheduleTests (node_modules/@jest/core/build/TestScheduler.js:321:13)
at async runJest (node_modules/@jest/core/build/runJest.js:372:19)
The file ~/Library/Caches/ms-playwright/chromium-799411/chrome-mac/Chromium.app/Contents/MacOS/Chromium
does not exist but this folder does ~/Library/Caches/ms-playwright/chromium-799411/chrome-mac/Chromium.app/Contents/Frameworks/Chromium\ Framework.framework
. Not sure why it is looking in the wrong location?
I have ran yarn add playwright
and the package appears to install successfully. Iāve also tried to manually run node node_modules/playwright/install.js
which gives me:
Removing unused browser at /Users/danawoodman/Library/Caches/ms-playwright/chromium-799411
Downloading chromium v799411 - 118.1 Mb [====================] 100% 0.0s
Iāve also attempted to remove node_modules
, yarn.lock
and ~/Library/Caches/ms-playwright
to reset things to a clean state but nothing is working. Iām at a losss for what to do and Googling/searching issues doesnāt get me anything useful.
I donāt think there is anything particularly unique with my setup.
Is there a way to better troubleshoot why I canāt get Playwright to work?
Issue Analytics
- State:
- Created 3 years ago
- Comments:45 (8 by maintainers)
Top GitHub Comments
I am getting this issue now while using the pw docker image. https://hub.docker.com/_/microsoft-playwright. Running
npm install playwright
as part of the execution fix the issue.Thanks! I agree with you in principle. This issue was caused by a change in Nodejs: https://github.com/nodejs/node/issues/33050