Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] channel: 'chrome' in a config is not working, ERROR: Playwright does not support chromium on ubuntu18.04 #20533

Closed
xblurx opened this issue Jan 31, 2023 · 4 comments
Assignees
Labels

Comments

@xblurx
Copy link

xblurx commented Jan 31, 2023

Context:

  • Playwright Version: 1.29.0
  • Operating System: ubuntu 18.04
  • Node.js version: 14:alpine
  • Browser: Chromium
  • Extra:
    OS: Linux 4.18 Ubuntu 18.04.5 LTS (Bionic Beaver)
    Memory: 34.65 GB / 62.89 GB
    Container: Yes
    Binaries:
    Node: 14.17.2 - /usr/bin/node
    Yarn: 1.22.11 - /usr/bin/yarn
    npm: 6.14.13 - /usr/bin/npm
    Languages:
    Bash: 4.4.20 - /bin/bash
    npmPackages:
    playwright-testing-library: 2.7.2 => 2.7.2
    all of this ^ is from docker image mcr.microsoft.com/playwright:1.13.0-bionic (I know it's very old, and maybe I should't be using it if I'm installing the browsers via npx install playwright anyway, but that's what we have in a repository.

Code Snippet

the config:

const config: PlaywrightTestConfig = {
    testDir: './src/__tests__/e2e',
    testMatch: /.*.ts/,
    timeout: 30 * 1000,
    expect: {
        timeout: 5000,
    },
    fullyParallel: true,
    forbidOnly: !!process.env.CI,
    retries: process.env.CI ? 2 : 0,
    workers: process.env.CI ? 1 : undefined,
    use: {
        browserName: 'chromium',
        actionTimeout: 0,
        trace: 'on-first-retry',
        channel: 'chrome',
    },

    /* Configure projects for major browsers */
    projects: [
        {
            name: 'chromium',
            use: {
                channel: 'chrome',
                ...devices['Desktop Chrome'],
            },
        },
    ],

};

Describe the bug
Hi, although I set channel: chrome in the config which was suggested in #19548 wherever possible, the ci fails when executing npx install playwright which should install the required browsers.
ci output:
Failed to install browsers
Error: ERROR: Playwright does not support chromium on ubuntu18.04

@mxschmitt
Copy link
Member

First of all, I'd strongly recommend upgrading to Ubuntu focal or yammy, your Docker image which you are using should always match to the Playwright version you are using, otherwise browsers and dependencies have to be downloaded again.

If we look at this Ubuntu 18 bionic scenario, I just tried it out and Firefox & Chromium was working for after installing browser and deps (npx playwright install --with-deps).

If you use channel: 'chrome' inside your config, this means that you are using the Google Chrome Stable channel, so you need to install it manually with npx playwright install chrome. I tried this is as well and it was working for me.

@xblurx
Copy link
Author

xblurx commented Feb 1, 2023

so instead of npx install playwright should I use the first command npx playwright install --with-deps or use this npx playwright install chrome?

@mxschmitt
Copy link
Member

npx playwright install chrome --with-deps should be enough.

@xblurx
Copy link
Author

xblurx commented Feb 1, 2023

thanks a lot, have a great day

@xblurx xblurx closed this as completed Feb 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants