Skip to content

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

@danawoodman

Description

@danawoodman

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions