[BUG] Failed to launch chromium because executable doesn't exist

See original GitHub issue

Edit 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:closed
  • Created 3 years ago
  • Comments:45 (8 by maintainers)

github_iconTop GitHub Comments

4reactions
pjcalvocommented, Feb 24, 2021

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.

3reactions
arjunattamcommented, Oct 1, 2020

Thanks! I agree with you in principle. This issue was caused by a change in Nodejs: https://github.com/nodejs/node/issues/33050

Read more comments on GitHub >

github_iconTop Results From Across the Web

Playwright: “Failed to launch Browsers” — how to solve?
“Error: Failed to launch chromium because executable doesn't exist”. This post explains how to solve the above issue in the CI.
Read more >
Failed to launch chromium because executable doesn't exist
Hi, I'm trying to use Playwright in a Netlify function but I get this error on deploy (works great locally with netlify dev...
Read more >
Can't launch Chromium as executable doesn't exists if ...
The chromium executable should be in your Docker image under /usr/bin/chromium-browser. You need to use playwright's browserType.launch to ...
Read more >
[Ultimate PDF] Failed to launch Chromium! [0819/001522.180 ...
After investigating, it seems that the cause is that the Chromium revision being downloaded is old. I used Server Action "UseBrowser"(Module:UltimatePDF) and ...
Read more >
4 - Playwright Setup & First Script - Launch Chromium, Firefox ...
In this video, I have explained how to setup Playwright with Browser binaries and we will write our first script to launch the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found