-
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]: support Arch linux #8100
Comments
Not a big deal because I can just run in docker, but it would be nice! |
This comment was marked as outdated.
This comment was marked as outdated.
Why can't playwright work on all OS? Why only support ubuntu? |
2.28 switches to playwright-python from pyppeteer, but that is not being pulled into the repos at this time: microsoft/playwright-python#1704 microsoft/playwright#8100 git-svn-id: file:///srv/repos/svn-community/svn@1458393 9fca08f4-af9d-4005-b8df-a31f2cc04f65
2.28 switches to playwright-python from pyppeteer, but that is not being pulled into the repos at this time: microsoft/playwright-python#1704 microsoft/playwright#8100 git-svn-id: file:///srv/repos/svn-community/svn@1458393 9fca08f4-af9d-4005-b8df-a31f2cc04f65
I installed $ mkdir ~/.chroot
$ export CHROOT=$HOME/.chroot
$ mkarchroot $CHROOT/root base-devel
$ arch-nspawn $CHROOT/root pacman -Syu
$ git clone 'https://aur.archlinux.org/playwright.git'
$ cd playwright
$ makechrootpkg -c -r $CHROOT
$ ls -la
Permissions Size User Date Modified Name
drwxr-xr-x - us-er 19 May 19:53 .git
.rw-r--r-- 534 us-er 19 May 19:53 .SRCINFO
.rw-r--r-- 940 us-er 19 May 19:53 PKGBUILD
.rw-r--r-- 1.6M us-er 19 May 19:59 playwright-1.33.0-1-any.pkg.tar.zst
.rw-r--r-- 24 us-er 19 May 19:59 playwright-1.33.0-1-x86_64-package.log
.rw-r--r-- 7.8k us-er 19 May 19:53 playwright-1.33.0.tar.gz
$ sudo cp playwright-1.33.0-1-any.pkg.tar.zst $CHROOT/root/home/
$ arch-nspawn $CHROOT/root pacman -U /home/playwright-1.33.0-1-any.pkg.tar.zst
$ arch-nspawn $CHROOT/root playwright install chromium
BEWARE: your OS is not officially supported by Playwright; downloading fallback build.
Downloading Chromium 113.0.5672.53 (playwright build v1060) from https://playwright.azureedge.net/builds/chromium/1060/chromium-linux.zip
144.6 Mb [====================] 100% 0.0s
Chromium 113.0.5672.53 (playwright build v1060) downloaded to /root/.cache/ms-playwright/chromium-1060
BEWARE: your OS is not officially supported by Playwright; downloading fallback build.
Downloading FFMPEG playwright build v1008 from https://playwright.azureedge.net/builds/ffmpeg/1008/ffmpeg-linux.zip
2.6 Mb [====================] 100% 0.0s
FFMPEG playwright build v1008 downloaded to /root/.cache/ms-playwright/ffmpeg-1008
$ arch-nspawn $CHROOT/root playwright cr https://duck.com
╔══════════════════════════════════════════════════════╗
║ Host system is missing dependencies to run browsers. ║
║ Missing libraries: ║
║ libnss3.so ║
║ libnssutil3.so ║
║ libsmime3.so ║
║ libnspr4.so ║
║ libatk-1.0.so.0 ║
║ libatk-bridge-2.0.so.0 ║
║ libcups.so.2 ║
║ libdrm.so.2 ║
║ libdbus-1.so.3 ║
║ libxcb.so.1 ║
║ libxkbcommon.so.0 ║
║ libatspi.so.0 ║
║ libX11.so.6 ║
║ libXcomposite.so.1 ║
║ libXdamage.so.1 ║
║ libXext.so.6 ║
║ libXfixes.so.3 ║
║ libXrandr.so.2 ║
║ libgbm.so.1 ║
║ libpango-1.0.so.0 ║
║ libcairo.so.2 ║
║ libasound.so.2 ║
╚══════════════════════════════════════════════════════╝
at Object.<anonymous> (/usr/lib/node_modules/playwright/cli.js:17:18) {
name: 'Error'
} Next I installed $ arch-nspawn $CHROOT/root pacman -S pkgfile
$ arch-nspawn $CHROOT/root pkgfile -u
:: Updating 3 repos...
download complete: core [ 1043.4 KiB 999K/s 2 remaining]
download complete: extra [ 10.4 MiB 1155K/s 1 remaining]
download complete: community [ 28.7 MiB 1394K/s 0 remaining]
:: download complete in 21.12s < 40.2 MiB 1947K/s 3 files >
:: waiting for 1 process to finish repacking repos...
$ arch-nspawn $CHROOT/root pkgfile libsmime3.so
core/nss
$ arch-nspawn $CHROOT/root pkgfile libnss3.so
core/nss
...
...
$ arch-nspawn $CHROOT/root pkgfile libcairo.so.2
extra/cairo
$ arch-nspawn $CHROOT/root pkgfile libasound.so.2
extra/alsa-lib So, the packages required for chromium are:
Installing them into chroot ... $ arch-nspawn $CHROOT/root pacman -S --needed core/nss core/nspr extra/at-spi2-core extra/libcups extra/libdrm core/dbus extra/libxcb extra/libxkbcommon extra/at-spi2-core extra/libx11 extra/libxcomposite extra/libxdamage extra/libxext extra/libxfixes extra/libxrandr extra/mesa extra/pango extra/cairo extra/alsa-lib
$ arch-nspawn $CHROOT/root pacman -S extra/xorg-server-xvfb # (optional - for headless mode?) And voilà! $ arch-nspawn $CHROOT/root playwright pdf https://duck.com /home/duck.pdf
Navigating to https://duck.com
Saving as pdf into /home/duck.pdf
$ arch-nspawn $CHROOT/root ls /home
duck.pdf playwright-1.33.0-1-any.pkg.tar.zst |
As for Firefox: $ arch-nspawn $CHROOT/root playwright screenshot -b ff https://duck.com /home/duck-ff.png
╔══════════════════════════════════════════════════════╗
║ Host system is missing dependencies to run browsers. ║
║ Missing libraries: ║
║ libgtk-3.so.0 ║
║ libgdk-3.so.0 ║
║ libgdk_pixbuf-2.0.so.0 ║
║ libdbus-glib-1.so.2 ║
║ libXcursor.so.1 ║
╚══════════════════════════════════════════════════════╝
at Object.<anonymous> (/usr/lib/node_modules/playwright/cli.js:17:18) {
name: 'Error'
} Additionally required packages are: extra/gtk3
extra/gdk-pixbuf2
extra/dbus-glib
extra/libxcursor Installing and executing: $ arch-nspawn $CHROOT/root pacman -S extra/gtk3 extra/gdk-pixbuf2 extra/dbus-glib extra/libxcursor
$ arch-nspawn $CHROOT/root playwright screenshot -b ff https://duck.com /home/duck-ff.png
Navigating to https://duck.com
Capturing screenshot into /home/duck-ff.png |
And as for WebKit: arch-nspawn $CHROOT/root playwright screenshot -b wk https://duck.com /home/duck-ff.png
╔══════════════════════════════════════════════════════╗
║ Host system is missing dependencies to run browsers. ║
║ Missing libraries: ║
║ libsoup-2.4.so.1 ║
║ libgstreamer-1.0.so.0 ║
║ libicudata.so.66 ║
║ libicui18n.so.66 ║
║ libicuuc.so.66 ║
║ libxslt.so.1 ║
║ libwoff2dec.so.1.0.2 ║
║ libopus.so.0 ║
║ libharfbuzz-icu.so.0 ║
║ libgstallocators-1.0.so.0 ║
║ libgstapp-1.0.so.0 ║
║ libgstbase-1.0.so.0 ║
║ libgstpbutils-1.0.so.0 ║
║ libgstaudio-1.0.so.0 ║
║ libgsttag-1.0.so.0 ║
║ libgstvideo-1.0.so.0 ║
║ libgstgl-1.0.so.0 ║
║ libgstcodecparsers-1.0.so.0 ║
║ libgstfft-1.0.so.0 ║
║ libopenjp2.so.7 ║
║ libwebpdemux.so.2 ║
║ libwebp.so.6 ║
║ libenchant-2.so.2 ║
║ libhyphen.so.0 ║
║ libflite.so.1 ║
║ libflite_usenglish.so.1 ║
║ libflite_cmu_grapheme_lang.so.1 ║
║ libflite_cmu_grapheme_lex.so.1 ║
║ libflite_cmu_indic_lang.so.1 ║
║ libflite_cmu_indic_lex.so.1 ║
║ libflite_cmulex.so.1 ║
║ libflite_cmu_time_awb.so.1 ║
║ libflite_cmu_us_awb.so.1 ║
║ libflite_cmu_us_kal16.so.1 ║
║ libflite_cmu_us_kal.so.1 ║
║ libflite_cmu_us_rms.so.1 ║
║ libflite_cmu_us_slt.so.1 ║
║ libpcre.so.3 ║
║ libffi.so.7 ║
║ libevdev.so.2 ║
║ libgudev-1.0.so.0 ║
║ libx264.so ║
╚══════════════════════════════════════════════════════╝
at Object.<anonymous> (/usr/lib/node_modules/playwright/cli.js:17:18) {
name: 'Error'
} Additionally required packages are: extra/libsoup
extra/gstreamer
extra/libxslt
extra/woff2
extra/opus
extra/harfbuzz-icu
extra/gst-plugins-base-libs
extra/gst-plugins-bad-libs
extra/openjpeg2
extra/libwebp
extra/enchant
extra/hyphen
chaotic-aur/flite1
chaotic-aur/libffi7
extra/libevdev
extra/x264 Installing and executing: $ arch-nspawn $CHROOT/root pacman-key --recv-key FBA220DFC880C036 --keyserver keyserver.ubuntu.com
gpg: Warning: using insecure memory!
gpg: key FBA220DFC880C036: "Nico Jensch (Chaotic-AUR) <[email protected]>" not changed
gpg: Total number processed: 1
gpg: unchanged: 1
$ arch-nspawn $CHROOT/root pacman-key --lsign-key FBA220DFC880C036
gpg: Warning: using insecure memory!
-> Locally signed 1 keys.
==> Updating trust database...
gpg: Warning: using insecure memory!
gpg: next trustdb check due at 2023-06-15
$ arch-nspawn $CHROOT/root pacman -U --noconfirm 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-keyring.pkg.tar.zst' \
'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-mirrorlist.pkg.tar.zst'
$ sudo printf '\n[chaotic-aur]\nInclude = /etc/pacman.d/chaotic-mirrorlist\n' >> $CHROOT/root/etc/pacman.conf
$ $CHROOT/root pacman -Syu --noconfirm
$ arch-nspawn $CHROOT/root pacman -S --needed extra/libsoup extra/gstreamer extra/libxslt extra/woff2 extra/opus extra/harfbuzz-icu extra/gst-plugins-base-libs extra/gst-plugins-bad-libs extra/openjpeg2 extra/libwebp extra/enchant extra/hyphen chaotic-aur/flite1 chaotic-aur/libffi7 extra/libevdev extra/x264
$ arch-nspawn $CHROOT/root playwright screenshot -b wk https://duck.com /home/duck-wk.png
╔══════════════════════════════════════════════════════╗
║ Host system is missing dependencies to run browsers. ║
║ Missing libraries: ║
║ libicudata.so.66 ║
║ libicui18n.so.66 ║
║ libicuuc.so.66 ║
║ libwebp.so.6 ║
║ libflite_cmu_grapheme_lang.so.1 ║
║ libflite_cmu_grapheme_lex.so.1 ║
║ libflite_cmu_indic_lang.so.1 ║
║ libflite_cmu_indic_lex.so.1 ║
║ libpcre.so.3 ║
╚══════════════════════════════════════════════════════╝
at Object.<anonymous> (/usr/lib/node_modules/playwright/cli.js:17:18) {
name: 'Error'
} If anyone has an idea to which packages these libraries belong, please let me know.
|
This is what I added to get down to here: playwright._impl._api_types.Error: Added: libwebp052 |
@collsni I had gotten just as far as you, and managed to get past that by just manually building and linking flite! git clone https://github.com/festvox/flite.git
cd flite
./configure --enable-shared
make
make get_voices Then copy over the necessasry After doing that, I've got WebKit working in Arch with no issues! |
Hi all! Following your advice I managed to solve all the dependencies except for I tried to make a symlink
but then i have he following error that stuck me Error: browserType.launch: Browser closed.
==================== Browser output: ====================
<launching> /home/pres/.cache/ms-playwright/webkit-1869/pw_run.sh --inspector-pipe --headless --no-startup-window
<launched> pid=333527
[pid=333527][err] /home/pres/.cache/ms-playwright/webkit-1869/minibrowser-wpe/bin/MiniBrowser: symbol lookup error: /home/pres/.cache/ms-playwright/webkit-1869/minibrowser-wpe/lib/libWPEWebKit-1.0.so.3: undefined symbol: cmulex_init
=========================== logs ===========================
<launching> /home/pres/.cache/ms-playwright/webkit-1869/pw_run.sh --inspector-pipe --headless --no-startup-window
<launched> pid=333527
[pid=333527][err] /home/pres/.cache/ms-playwright/webkit-1869/minibrowser-wpe/bin/MiniBrowser: symbol lookup error: /home/pres/.cache/ms-playwright/webkit-1869/minibrowser-wpe/lib/libWPEWebKit-1.0.so.3: undefined symbol: cmulex_init Someone in the same situation? |
I was able to run Chromium and Firefox without issues, but finally got WebKit running as well following the info in this thread.
I also had that file missing. I symlinked it, and it worked here. My recipe to get WebKit running was:
(thanks everyone posting in this thread) Interesting that the The files missing in
Could it be |
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 |
I was in the same situation as DevPres, and finally solved it: First I had an issue with glibio, was getting I had to go into ~/.cache/ms-playwright/..., find the webkit folder, my logs said it was launching gtk version. In there, there's a sys/lib folder I deleted the local copies of glib2 and glibio. Now that it was using the latest versions of those on my system, I was in the same state as DevPres, cmulex_init symbol not found. Turns out my flite1 install linked to libflite_cmulex 1.4, but the version if you build from source is 2.3. I replaced the symlink in /usr/lib so that it went: libflite_cmulex.so -> libflite_cmulex.so.1 -> libflite_cmulex.so.2.3. That did the trick, hopefully it helps someone that might be in the same situation. |
Here is every step that got it working for me on Arch:
Note: |
You can also just use git clone https://github.com/festvox/flite.git
cd flite
./configure --enable-shared
# build
make
make get_voices
# include /usr/local/lib in ld config
echo '/usr/local/lib' | sudo tee -a /etc/ld.so.conf.d/local.conf
sudo ldconfig
# dry-run install, to make sure everything's OK
make -n install
# install
sudo make install |
This is still open? Feels bad that a great library is only limited to work out of the box on debian |
I used instructions from @simontong and @nlm-pro but got stuck later with:
Not sure how to resolve this, as I need both libsoup2 and libsoup3 installed for other software. |
I needed for a job task to run it on archlinux too, so I create a simple docker image to run it. |
☝️ |
I have inherited maintainership of the Since this AUR package appears be working for Arch Linux, I am wondering if there is a way I can fully automate the build rather than relying on the download step for the |
It worked for me after rebooting my computer. Thank you! |
Folding into #26482 |
Edit by maintainers
Hey everybody!
There's now an experimental support for all linux distributions using our browser container image
mcr.microsoft.com/playwright
.If you can run this container image on your linux distribution, then you can instruct
@playwright/test
to connect to it and run browsers inside the container.Please give it a try and let us know what you think here: #26482
Feature request
This is a tracking bug to gauge public interest in Arch linux support.
The text was updated successfully, but these errors were encountered: