playwright: [BUG] Host system is missing dependencies to run browsers.

Context:

  • Playwright Version: 1.0.0
  • Operating System: Linux 5.15 Linux Mint 20.3
  • Node.js version: 14.17.6 (npm: 6.14.15)
  • Browser: Chrome, Chromium, Firefox
  • Extra: Bash: 5.0.17 - @playwright/test: ^1.27.0

image

Code Snippet

I’m trying to run a “homepage has Playwright in title and get started link linking to the intro page” Playwright test:

import { test, expect } from '@playwright/test';

test('homepage has Playwright in title and get started link linking to the intro page', async ({ page }) => {
  await page.goto('https://playwright.dev/');

  // Expect a title "to contain" a substring.
  await expect(page).toHaveTitle(/Playwright/);

  // create a locator
  const getStarted = page.locator('text=Get Started');

  // Expect an attribute "to be strictly equal" to the value.
  await expect(getStarted).toHaveAttribute('href', '/docs/intro');

  // Click the get started link.
  await getStarted.click();

  // Expects the URL to contain intro.
  await expect(page).toHaveURL(/.*intro/);
});

Describe the bug

I found similar issues from (unsupported) Arch Linux users with this problem (https://github.com/microsoft/playwright/issues/5901), but I’m using Linux Mint, which uses Ubuntu (and it’s Debian package system) … and Ubuntu is supposed to be supported.

The system gives me the following error:

“browserType.launch: ╔══════════════════════════════════════════════════════╗ ║ Host system is missing dependencies to run browsers. ║ ║ Missing libraries: ║”

image

When executing the command to install the dependencies npx playwright install-deps, it tells me that they are all installed in their latest version

image image

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 3
  • Comments: 16 (1 by maintainers)

Commits related to this issue

Most upvoted comments

Playwright does not support Mint - only Ubuntu and Debian are supported. If you manage to make it work, we’ll accept the patch that makes it work on Mint. We won’t certify it for Mint, but others still can find it useful.

npx playwright install-deps fix my problem.

I finally got it to work by disabling the following import in “playwright.config.ts”:

import { devices } from '@playwright/test';

And changing the way browsers are configured, to not use “devices”, for example:

{
       name: 'Google Chrome',
       use: {
         channel: 'chrome',
       },
     },

Instead of:

{
       name: 'chrome',
       use: {
         ...devices['DesktopChrome'],
       },
     },

npx playwright install-deps fix my problem.

npx playwright install --with-deps worked for me 👍

Still occurs on ubuntu latest from github actions

@machineghost Similar problem. I’m on manjaro linux. A playwright has recently been added to the project. Safari not working

When I tried using:

  projects: [
    {
      name: 'firefox',
      use: {
        channel: 'webkit',
      },
    },
  ]

it didn’t work; I got:

Error: browserType.launch: Unsupported chromium channel “webkit”

It looks like the webkit value was aimed at running Safari, which isn’t available on Linux.

Also, can anyone explain why this doesn’t just work “out of the box” on Linux Mint? It’s one of the most popular Linux distros out there, and it uses Ubuntu’s repositories so … if Playwright works for Ubuntu … it should work for Mint.

I’m having the same issue on Elementary, but I guess there must be some difference. Hopefully some effort goes into fixing this, but I guess it’s a lot of different platforms for the team to keep eyes on.

EDIT: Same error with a channel: 'browserName',:

Error: browserType.launch: Unsupported chromium channel “browserName”

(I also tried channel: 'firefox',; same issue.)

I believe @alejo-malaver meant to replace channel with browserName, i.e:

{
    name: 'firefox',
    use: { browserName: 'firefox' },
}

This worked for me 🙂

P.S. I do have the package libicu70 installed, and it has files like /usr/lib/x86_64-linux-gnu/libicuio.so.70 … is there any way to make Playwright just use the newer file, instead of the old 66 version?

This is the case for me too on Elementary OS 7. I tried creating symlinks to the new libraries using the filenames Playwright is expecting, but predictably this doesn’t work - it’s looking for versioned symbol names within the libraries.

You could try sourcing those lib files from an Ubuntu install though (quickest way is probably spinning up a docker image) - YMMV!

Hi all, can someone please guide me how can I run install-deps command for java application… I am trying to use playwright to capture screenshots. I have imported java dependency like below - image

Things are working on my local system which is mac. I am containerising my application, facing below issue there -

image

I finally got it to work by disabling the following import in “playwright.config.ts”:

import { devices } from '@playwright/test';

And changing the way browsers are configured, to not use “devices”, for example:

{
       name: 'Google Chrome',
       use: {
         channel: 'chrome',
       },
     },

Instead of:

{
       name: 'chrome',
       use: {
         ...devices['DesktopChrome'],
       },
     },

Can you please specify the channel for firefox and webkit ?

Use ‘firefox’ and ‘webkit’ respectly in the field “channel”. If it doesn’t work, change the “channel” field to “browserName”…

npx playwright install-deps fix my problem.

I was having this error when running playwright in a GitHub Actions workflow, and this fixed the problem for me.