playwright: [REGRESSION]: Pull request #12877 prevents the library from being used on any linux distro that is not Ubuntu

Context:

  • GOOD Playwright Version: < 1.21.0 (1.20.2, etc)
  • BAD Playwright Version: 1.21.0
  • Operating System: Linux
  • Extra: while we are using Docker images based on buster slim, this is applicable to any Linux distro that isn’t ubuntu based (debian, possibly arch too)

Code Snippet

Run npx playwright install-deps chrome in a non-ubuntu environment (debian for instance)

Describe the bug

https://github.com/microsoft/playwright/pull/12877 was merged in order to “solve” issues related to users of Debian that couldn’t install the required dependencies due to missing packages (usually fonts which can be solved by including the debian non-free source list), however this prevents any users of a Linux distro that is not ubuntu based from using the library.

I believe the PR should be reverted or changed to emit an actual warning instead of a hard error, or a way to ignore the check should be added, as artificially limiting the library just for Ubuntu/Linux Mint users doesn’t sound right.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 5
  • Comments: 22 (3 by maintainers)

Commits related to this issue

Most upvoted comments

So this is a debian with an extra sourceList:

echo "deb http://ftp.us.debian.org/debian buster main non-free" >> /etc/apt/sources.list.d/fonts.list

This one adds the missing ttf-ubuntu-font-family font. Besides this font, all other dependencies are installable for both Chromium & Firefox; both browsers also seem to be functioning well.

Encountering this issue building from the official node:18 image, which I would think is an image in widespread use.

The problem for me is that in my Dockerfile I use FROM python:3.10. Unfortunately, the image changed from Debian Bullseye to Bookworm. If I just use FROM python:3.10-bullseye everything works fine again.

Update: Adding echo "deb http://ftp.us.debian.org/debian buster main non-free" >> /etc/apt/sources.list.d/fonts.list to my Dockerfile as suggested by @aslushnikov fixed this for me.

It installs ~350MB of extra packages (that I don’t need) but it solves the immediate problem. I tried different combinations but this is the only one that worked

this seems to just have started happening again mainly around “E: Package ‘xfonts-cyrillic’ has no installation candidate”

@david-engelmann please file a new issue with details to help us reproduce & debug.

🤦 totally forgot ubuntu released 22 recently… Thanks!!

Still receiving this in 1.21.0:

image: ubuntu:latest

$ npx playwright install-deps
npm WARN exec The following package was not found and will be installed: playwright
Installing Ubuntu dependencies...
Hit:1 http://security.ubuntu.com/ubuntu jammy-security InRelease
Hit:2 http://archive.ubuntu.com/ubuntu jammy InRelease
Hit:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
Package ttf-ubuntu-font-family is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
Package ttf-unifont is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  fonts-unifont
E: Package 'ttf-unifont' has no installation candidate
E: Package 'ttf-ubuntu-font-family' has no installation candidate
E: Unable to locate package libenchant1c2a
E: Unable to locate package libicu66
E: Unable to locate package libvpx6
E: Unable to locate package libwebp6
Failed to install browser dependencies

This image ubuntu:latest is probably pointing to Ubuntu 22.04 which Playwright’s team might not have test it yet as it was released a few days ago.

@vladfrangu revert has landed; we’ll publish a 1.21.1 with the revert by the end of the week. For now, you can use

npx playwright@1.20 install-deps chrome chromium

as a work-around.

Thanks for the heads-up!