Open udit0802 opened 3 years ago
+1
Managed to run playwright 1.39.0 on CentOs 7 with firefox browser by building glibc-2.28 from sources, patchelf and adding some missing libraries. But chromium (also patched with patchelf) fails - PlaywrightException: Failed to read message from driver, pipe closed.
Guess its some kind of driver issue. Did anyone do something similar and can assist? Thanks a lot!
Heads up, since the solution quoted in here installs a static version, turns out we could make playwright with chromium work without a problem on our Rocky8 servers with a simplification of @kumaraditya303 fantastic answer! This command replaces playwright install-deps .
dnf install -y alsa-lib \
at-spi2-atk \
at-spi2-core \
atk \
bash \
cairo \
cups-libs \
dbus-libs \
expat \
flac-libs \
gdk-pixbuf2 \
glib2 \
glibc \
gtk3 \
libX11 \
libXcomposite \
libXdamage \
libXext \
libXfixes \
libXrandr \
libXtst \
libcanberra-gtk3 \
libdrm \
libgcc \
libstdc++ \
libxcb \
libxkbcommon \
libxshmfence \
libxslt \
mesa-libgbm \
nspr \
nss \
nss-util \
pango \
policycoreutils \
policycoreutils-python-utils \
zlib
To add to @knowledge-labz answer, I had to also install dbus-glib in order for Firefox to work (on Fedora).
Heads up, since the solution quoted in here installs a static version, turns out we could make playwright with chromium work without a problem on our Rocky8 servers with a simplification of @kumaraditya303 fantastic answer! This command replaces playwright install-deps .
dnf install -y alsa-lib \ at-spi2-atk \ at-spi2-core \ atk \ bash \ cairo \ cups-libs \ dbus-libs \ expat \ flac-libs \ gdk-pixbuf2 \ glib2 \ glibc \ gtk3 \ libX11 \ libXcomposite \ libXdamage \ libXext \ libXfixes \ libXrandr \ libXtst \ libcanberra-gtk3 \ libdrm \ libgcc \ libstdc++ \ libxcb \ libxkbcommon \ libxshmfence \ libxslt \ mesa-libgbm \ nspr \ nss \ nss-util \ pango \ policycoreutils \ policycoreutils-python-utils \ zlib
This works for an Amazon Linux 2 image on AWS (with yum package manager instead of dnf). Thanks!
I tried running my scrapy-playwright
project and faced similar issue. I managed to run my project in CentOS 7
by dockarising it under Ubuntu 20.04
base image. I could not use Ubuntu 22.04 (current latest LTS) due to the following error: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY ...
真是可惜官方不支持Cent OS,虽然网上有一些魔法可以使用,但也多多少少有些问题。 最后我还是用Docker算了:docker pull mcr.microsoft.com/playwright/python:v1.32.0-focal 亲测这个镜像可以正常使用,但是有些镜像是坏的!
注意:不要使用docker pull mcr.microsoft.com/playwright/python:v1.40.0-jammy 实际测试,这个镜像是坏的,里面没有playwright,连pip install xxx也报错!!! 千万不要安装这个镜像!!!!!!
真是可惜官方不支持Cent OS,虽然网上有一些魔法可以使用,但也多多少少有些问题。 最后我还是用Docker算了:docker pull mcr.microsoft.com/playwright/python:v1.32.0-focal 亲测这个镜像可以正常使用,但是有些镜像是坏的!
注意:不要使用docker pull mcr.microsoft.com/playwright/python:v1.40.0-jammy 实际测试,这个镜像是坏的,里面没有playwright,连pip install xxx也报错!!! 千万不要安装这个镜像!!!!!!
我一直不能在docker 里面运行,不知道为什么。
I was having issues with using playwright on aws lambda inside a centos python docker image, was able to solve with the help of @kumaraditya303 using below dockerfile: https://github.com/sksharma0/playwright-on-centos/blob/master/Dockerfile putting it here for reference
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: https://github.com/microsoft/playwright/issues/26482
We have our CI machines setup on centos7. I am trying to integrate in our integration tests which runs on jenkins on centos machines. Able to run tests using chrome but facing issues with following browsers:
Chromium :
This issue was earlier reported on 1.
Edge :
Issue reported earlier on 2
Webkit:
Issue reported earlier on 3
As many organizations like ours uses centos machines as their infrastructure, this feature will have a wider impact and will help many developers. Request playwright team to have a look at this request.
Thanks!!