-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[Feature] install-deps
should be more friendly to users of other Linux distros
#11122
Comments
@Luc45 fair enough. Would you like to submit PR to have a more friendly message with the list of packages for non-ubuntu distros? You'd need to enhance this function:
|
Thanks for pointing me to the function. I will try, even though JavaScript is a language that I only use on a per-need basis for basic FE. My main languages are PHP and Go. I will poke at it through the end of this week and post and update here if I am able to progress. PS: By just quickly glancing at the function, it can be pretty simple - a matter of printing the missing dependencies array. |
Yeah I eye-balled it as well and looks very doable. |
I wanted to do something more sophisticated, checking if This covers the "happy path". I haven't changed the "unhappy path", since it already displays the missing dependencies, and the third conditional, the missing libraries, is quite O.S agnostic, so there was no change needed there. However, trying to install these packages does not solve the issue in Arch Linux: It seems these packages exist with slightly different names in Arch. I can still run the tests with Chromium, though - this affects only my hability to install the other Playwright browsers. Do you want me to open a PR with the tweaked message above? |
@aslushnikov jfyi, the dependencies list is generated automatically: `If you are using a Linux distribution other than Ubuntu, please install the dependencies manually:`,
``,
`${[...missingPackages].join(', ')}`, |
@Luc45 oh, I thought that's a hardcoded list that you suggested there.. My bad! Still, i wouldn't make the message more scary for general ubuntu users. |
Agreed. I tried to differentiate Ubuntu user from non-Ubuntu users, but that's a bit tricky with Node out of the box. What I did instead, was checking if
|
I'm also using Arch I am unable to run playwright at the moment because I have no clue what deps I should manually install. At least a list would be great... |
I finally managed to get playwright to run Chromium, Firefox and Webkit on Arch by installing these packages: aur/enchant1.6 As mentioned in this comment #2621 (comment) |
wow,hi,guys,how to install these lib,my ssytem is centos8,can you help me? |
To other people that may run into this issue. You can run Example output:
|
I get the same output on Manjaro (Arch Linux). By doing a diff, the only extension that isn't on my end is It seems a lot of people in this post wants support for Arch, specifically, which is also my exact same need... |
This should be fixed in 1.21 for everybody; the patches are already landed on @playwright/test@next - so please give it a try! |
It now errors out with "Error: Unsupported Linux distribution, only Ubuntu is supported!" full stop and --dry-run no longer works, either, therefore we aren't able to at least see the underlying apt-get. Not sure how that constitutes as "fixed". This is worse! v 1.20.2: bash-4.2# /.playwright/node/linux/playwright.sh install-deps chromium --dry-run
sh -c "apt-get update&& apt-get install -y --no-install-recommends fonts-liberation libasound2 libatk-bridge2.0-0 libatk1.0-0 libatspi2.0-0 libcairo2 libcups2 libdbus-1-3 libdrm2 libegl1 libgbm1 libglib2.0-0 libgtk-3-0 libnspr4 libnss3 libpango-1.0-0 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxdamage1 libxext6 libxfixes3 libxrandr2 libxshmfence1 xvfb fonts-noto-color-emoji ttf-unifont libfontconfig libfreetype6 xfonts-cyrillic xfonts-scalable fonts-ipafont-gothic fonts-wqy-zenhei fonts-tlwg-loma-otf ttf-ubuntu-font-family"
bash-4.2# v 1.21 bash-4.2# /.playwright/node/linux/playwright.sh install-deps chromium --dry-run
Failed to install browser dependencies
Error: Unsupported Linux distribution, only Ubuntu is supported!
bash-4.2# % |
I haven't tried it myself, yet. However, at a minimum, we should be grateful that they are looking at it at all. If you think something is behaving weird, please open another issue @rhyek , and if I might give you a personal tip, remember that you are using this tool for free, and that the developers are doing their best. It's open-source, so you are free (and encouraged) to contribute to solutions and with code yourself, too. |
@rhyek We're sorry - this is fixed and will be released in a patch release 1.21.1 shortly. |
@rhyek You're completely right. I don't think this is considered a fix. But again @Luc45 is right. We can't ask for too much. I spent like an hour googling every dependency so that I can get its Arch community/aur package, which turned out to be a pain in the ass, so I just gave up and used docker, I think you should consider going with that since it's the only solution for now. |
@WinterCore yes, that is what I'm currently trying to do, but that has its own issues unrelated to this project. In my case I am trying to build a container image with awslinux as transitive base to run on AWS Lambda. @aslushnikov thanks! |
1.21.1 is live - please try it out! |
Doesn't seem to be on PyPI yet |
@aslushnikov Any timelines on when it would be released on PyPI? |
@alapanme we can't guarantee any eta, but probably around a week. |
I went ahead and re-tested on EndeavourOS \ Arch Linux with the latest production install. Arch Linux Repository Dependencies installed:
Both Firefox and Chrome ran all 25 Tests Headed and Headless Successfully. The Webkit run failed because of missing dependencies:
It looks like someone testing on Fedora 36 also had Webkit fail. So I will wait to see how that progresses. |
Still relevant issue. I just started with the official installation guide and got
OS: Manjaro Linux, it uses AUR, in my case through The bootstrapped I just installed #11122 (comment) and it will probably help, but issue now is that the |
On my machine i also had to
|
For Arch Linux users, I installed also:
|
So on Arch Linux there are also the official packages for:
Why not test\use these regularly updated packages? If there is a problem with the older libraries then this could introduce many issues. Is there an official Playwright list which says which packages they expect us to use? |
So to get webkit working on Manjaro I add to do the following:
|
It also adds the dependencies for working with
|
whoever is stuck on lts 22.04.1 and playwright reporting unsupported OS, do this:
|
I'm using Manjaro too and did this, though through pamac rather than yay. I'm still getting errors:
This seems to only affect webkit. Chromium and Firefox are working fine. |
Thank you, this helped a lot. In my case (on Linux Mint 22) I also wanted to test on Webkit browsers, so I also had to install |
Related ref: #8100 (comment) |
Hey everybody! There's now an experimental support for all linux distributions using our browser container image Please give it a try and let us know what you think here: #26482 |
Browser inside docker = only headless mode 😢 (at least without a VNC) |
I found it today. |
I installed all of these dependencies through conda, because I have no access to sudo on my machine. However, playwright isn't detecting any of these files. Has anyone else tried to make this work with conda? |
Currently, only Ubuntu 18.04 and 20.04 are officially supported by Playwright.
Out of the box on Manjaro, playwright is able to be installed and run a tests both in headless and headed mode:
Code under test:
It works.
However, when I try to execute the same test with more browsers after specifying
chromium
,firefox
andwebkit
onplaywright.config.js
, playwright prompts me to install dependencies:When running
npx playwright install-deps
, I get:The error is clear, it tries to install some package with
apt-get
, which does not exist in Arch Linux. However, it doesn't tell me which one, so that I can install it on my own.To get around this, I was trying to figure out what I needed to install on my own. The closest I could get was to this list: https://github.com/microsoft/playwright/blob/d34f9972abf3e412c9a73ee7b524e529a89136f8/packages/playwright-core/src/utils/nativeDeps.ts
But surely I don't need all of that, as the Chromium works out of the box both headless and headed, so there must be some package missing in my environment that I need to install.
My request is that
install-deps
be specific about what dependencies are missing, so that users of other distros of Linux can have a chance to manually install the dependencies themselves.The text was updated successfully, but these errors were encountered: