[BUG] Error: browserType.launch: Failed to launch chromium because executable doesn't exist at /home/jenkins/.cache/ms-playwright/chromium-844399/chrome-linux/chrome

See original GitHub issue

Context:

  • Playwright Version: [1.8]
  • Operating System: [Unix / jenkins]
  • Node.js version: [10.14]
  • Browser: Chromium]

We are attempting to install playwright thru yarn but it fails intermittently with this error. Our project is monorepo and uses “yarn”

any idea how to resolve this issue?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:7
  • Comments:18 (4 by maintainers)

github_iconTop GitHub Comments

8reactions
kocou-yTkocommented, Aug 27, 2021

i found that working too https://playwright.dev/docs/browsers#managing-browser-binaries-1

fixed with two env vars in our github actions and changed command order (npx playwright install after yarn install)

env:
  PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 # Skip downloading during yarn install
  PLAYWRIGHT_BROWSERS_PATH: 0 # Places binaries to node_modules/@playwright/test

jobs:
  e2e:
    runs-on: ubuntu-latest

    steps:
      - name: Install dependencies
        run: |
            npx playwright install-deps

      - name: Setup
        run: |
            yarn install
            npx playwright install
7reactions
yury-scommented, Mar 10, 2021

How can I force download the Chromium Binary only?

You can use playwright command line interface to install the browser:

npx playwright install chromium

It passes intermittently so I doubt it’s SKIPPING the browser download. It does not install with yarn command, and behaves flaky.

I’m not familiar with Jenkins, does it merely run the same script as you do locally or does it get a copy of files created by running the installation scripts elsewhere? Like I said if the browser hasn’t been downloaded the install step should fail.

@tanvee38 this sounds like a different bug, it’d be better to discuss it separately. Also it’d be helpful if you could share your Dockerfile.

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 >
Ask Question - Stack Overflow
PlayWright Azure Pipeline Error: browsertype.launch: executable doesn't exist at /home/vsts/.cache/ms-playwright/chromium-965416/chrome-linux/ ...
Read more >
Troubleshooting - Puppeteer
If you get an error that looks like this when trying to launch Chromium: (node:15505) UnhandledPromiseRejectionWarning: Error: Failed to launch the browser ...
Read more >
playwright not working - Questions / Help - Fly.io
It's working locally, but with fly.io I get an error. ... app[1a284686] nrt [info] browserType.launch: Executable doesn't exist at ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

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