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
- revert(#12877): chore: print error if install-deps is used != ubuntu Reason: turns out Debian Buster requires just one source list to install `ttf-ubuntu-font-family` font. All other dependencies ar... — committed to aslushnikov/playwright by aslushnikov 2 years ago
- revert(#12877): chore: print error if install-deps is used != ubuntu (#13536) Reason: turns out Debian Buster requires just one source list to install `ttf-ubuntu-font-family` font. All other dep... — committed to microsoft/playwright by aslushnikov 2 years ago
- cherry-pick(#13536): revert: chore: print error if install-deps is used != ubuntu Reason: turns out Debian Buster requires just one source list to install `ttf-ubuntu-font-family` font. All other de... — committed to aslushnikov/playwright by aslushnikov 2 years ago
- cherry-pick(#13536): revert: chore: print error if install-deps is used != ubuntu (#13539) Reason: turns out Debian Buster requires just one source list to install `ttf-ubuntu-font-family` font. ... — committed to microsoft/playwright by aslushnikov 2 years ago
- Update dependency @playwright/test to v1.28.1 (#860) [](https://renovatebot.com) This PR contains the following updates: | Package | C... — committed to ttbud/ttbud by renovate[bot] 2 years ago
- fix base image (https://github.com/microsoft/playwright/issues/13530) — committed to jwoglom/remarkable-substack by jwoglom 10 months ago
So this is a debian with an extra sourceList:
This one adds the missing
ttf-ubuntu-font-familyfont. 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 useFROM python:3.10-bullseyeeverything works fine again.Update: Adding
echo "deb http://ftp.us.debian.org/debian buster main non-free" >> /etc/apt/sources.list.d/fonts.listto 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!!
This image
ubuntu:latestis 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
as a work-around.
Thanks for the heads-up!