[BUG] browserType.launch: Chromium distribution 'chrome' is not found (circleci)
See original GitHub issueContext:
- Playwright Version: 1.16.3
- Operating System: Linux
- Node.js version: v16.13.0
- Browser: Chromium
- Extra: @playwright/test, CircleCi - run playwright with docker-compose
Code Snippet
I’m using the following dockerfile for the playwright:
FROM mcr.microsoft.com/playwright:focal
WORKDIR /usr/e2e
COPY package.json yarn.lock ./
RUN yarn install
RUN apt-get update && apt-get install -y wget
RUN npx playwright install chrome // why this command doesn't help?
COPY . ./
RUN yarn build
Playwright config:
const config = {
use: {
baseURL: process.env.REACT_APP_URL || 'http://localhost:3000',
viewport: viewport,
ignoreHTTPSErrors: true,
},
globalSetup: require.resolve('./playwright/global.ts'),
projects: [
{
name: 'Chrome Stable',
use: {
browserName: 'chromium',
channel: 'chrome',
},
},
{
name: 'Desktop Safari',
use: {
browserName: 'webkit',
},
},
{
name: 'Desktop Firefox',
use: {
browserName: 'firefox',
},
},
],
retries: 2,
}
Describe the bug
I’m not sure is it a playwright problem or circleci but anyway…
When i start playwright locally - everything is good, tests are completed successfully. When I run tests in the docker-compose in circleci with caching option docker_layer_caching: true
- get the error (without this option tests finish successfully):
browserType.launch: Chromium distribution 'chrome' is not found at /opt/google/chrome/chrome
Run "npx playwright install chrome"
Everything worked in the previous months, but this error began to appear a few weeks ago. Safari and firefox work well.
Tried suggestions from https://github.com/microsoft/playwright/issues/9858 - it didn’t help.
Any ideas? Maybe someone has faced such a problem?
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Issue with the browser circleci/browser-tools@1.1.3
Hey we seem to get an error when using the circleci/browser-tools@1.1.3 orb with our custom docker container, we get error code 127 so...
Read more >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 >How to use installed version of chrome in Playwright?
I want to use chrome instead of chromium.
Read more >Troubleshooting | Cypress Documentation
Cypress attempts to automatically find installed Chrome versions for you. However, probing for browsers across different environments can be error-prone.
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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You are using channels. Channels need to be installed manually using
npx playwright install chrome
FYI Having this issue with mcr.microsoft.com/playwright:v1.21.0-focal