Skip to content
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 CentOS #9199

Open
udit0802 opened this issue Sep 28, 2021 · 59 comments
Open

[Feature] Support CentOS #9199

udit0802 opened this issue Sep 28, 2021 · 59 comments

Comments

@udit0802
Copy link

udit0802 commented Sep 28, 2021

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


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 :

<launching> /home/centos/.cache/ms-playwright/chromium-920619/chrome-linux/chrome --disable-background-networking --enable-features=NetworkService,NetworkServiceInProcess --disable-background-timer-throttling --disable-backgrounding-occluded-windows --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-background-pages --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=ImprovedCookieControls,LazyFrameLoading,GlobalMediaControls,DestroyProfileOnBrowserClose,MediaRouter --allow-pre-commit-input --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-backgrounding --disable-sync --force-color-profile=srgb --metrics-recording-only --no-first-run --enable-automation --password-store=basic --use-mock-keychain --no-service-autorun --user-data-dir=/tmp/playwright_chromiumdev_profile-GyWOJw --remote-debugging-pipe --headless --hide-scrollbars --mute-audio --blink-settings=primaryHoverType=2,availableHoverTypes=2,primaryPointerType=4,availablePointerTypes=4 --no-sandbox --no-startup-window
[2021-09-28T13:04:55.123Z]     <launched> pid=20094
[2021-09-28T13:04:55.123Z]     [pid=20094][err] /home/centos/.cache/ms-playwright/chromium-920619/chrome-linux/chrome: /lib64/libc.so.6: version `GLIBC_2.18' not found (required by /home/centos/.cache/ms-playwright/chromium-920619/chrome-linux/chrome)
[2021-09-28T13:04:55.123Z]     [pid=20094] <process did exit: exitCode=1, signal=null>
[2021-09-28T13:04:55.123Z]     [pid=20094] starting temporary directories cleanup

This issue was earlier reported on 1.

Edge :

browserType.launch: Chromium distribution 'msedge' is not supported on linux
[2021-09-28T13:04:55.120Z] 
[2021-09-28T13:04:55.120Z]         at Object._baseTest.extend.browser.scope [as fn] (/apps/jnkn/workspace/EvergreenShoots-CMgt_PR-1560/main/integration-tests/playwright-e2e/node_modules/@playwright/test/lib/test/index.js:127:40)
[2021-09-28T13:04:55.120Z]         at Fixture.setup (/apps/jnkn/workspace/EvergreenShoots-CMgt_PR-1560/main/integration-tests/playwright-e2e/node_modules/@playwright/test/lib/test/fixtures.js:73:73)
[2021-09-28T13:04:55.121Z]         at FixtureRunner.setupFixtureForRegistration (/apps/jnkn/workspace/EvergreenShoots-CMgt_PR-1560/main/integration-tests/playwright-e2e/node_modules/@playwright/test/lib/test/fixtures.js:312:5)
[2021-09-28T13:04:55.121Z]         at FixtureRunner.resolveParametersAndRunHookOrTest (/apps/jnkn/workspace/EvergreenShoots-CMgt_PR-1560/main/integration-tests/playwright-e2e/node_modules/@playwright/test/lib/test/fixtures.js:297:23)
[2021-09-28T13:04:55.121Z]         at WorkerRunner._runTestWithBeforeHooks (/apps/jnkn/workspace/EvergreenShoots-CMgt_PR-1560/main/integration-tests/playwright-e2e/node_modules/@playwright/test/lib/test/workerRunner.js:449:7)

Issue reported earlier on 2

Webkit:

browserType.launch: Host system is missing dependencies!
[2021-09-28T13:04:55.121Z] 
[2021-09-28T13:04:55.121Z]       Install missing packages with:
[2021-09-28T13:04:55.121Z]           sudo apt-get install gstreamer1.0-libav
[2021-09-28T13:04:55.121Z] 
[2021-09-28T13:04:55.121Z]       Missing libraries we didn't find packages for:
[2021-09-28T13:04:55.121Z]           libnotify.so.4
[2021-09-28T13:04:55.121Z]           libopus.so.0
[2021-09-28T13:04:55.121Z]           libwoff2dec.so.1.0.2
[2021-09-28T13:04:55.121Z]           libharfbuzz-icu.so.0
[2021-09-28T13:04:55.121Z]           libgcrypt.so.20
[2021-09-28T13:04:55.121Z]           libgstapp-1.0.so.0
[2021-09-28T13:04:55.121Z]           libgstbase-1.0.so.0
[2021-09-28T13:04:55.121Z]           libgstreamer-1.0.so.0
[2021-09-28T13:04:55.121Z]           libgstpbutils-1.0.so.0
[2021-09-28T13:04:55.121Z]           libgstaudio-1.0.so.0
[2021-09-28T13:04:55.121Z]           libgsttag-1.0.so.0
[2021-09-28T13:04:55.121Z]           libgstvideo-1.0.so.0
[2021-09-28T13:04:55.121Z]           libgstgl-1.0.so.0
[2021-09-28T13:04:55.121Z]           libgstcodecparsers-1.0.so.0
[2021-09-28T13:04:55.121Z]           libgstfft-1.0.so.0
[2021-09-28T13:04:55.121Z]           libjpeg.so.8
[2021-09-28T13:04:55.121Z]           libpng16.so.16
[2021-09-28T13:04:55.121Z]           libopenjp2.so.7
[2021-09-28T13:04:55.121Z]           libwebpdemux.so.2
[2021-09-28T13:04:55.121Z]           libwebp.so.6
[2021-09-28T13:04:55.121Z]           libenchant.so.1
[2021-09-28T13:04:55.121Z]           libsecret-1.so.0
[2021-09-28T13:04:55.121Z]           libhyphen.so.0
[2021-09-28T13:04:55.121Z]           libicui18n.so.66
[2021-09-28T13:04:55.121Z]           libicuuc.so.66
[2021-09-28T13:04:55.121Z]           libevdev.so.2
[2021-09-28T13:04:55.121Z]           libGLESv2.so.2
[2021-09-28T13:04:55.121Z] 
[2021-09-28T13:04:55.121Z] 
[2021-09-28T13:04:55.121Z]         at Object._baseTest.extend.browser.scope [as fn] (/apps/jnkn/workspace/EvergreenShoots-CMgt_PR-1560/main/integration-tests/playwright-e2e/node_modules/@playwright/test/lib/test/index.js:127:40)
[2021-09-28T13:04:55.121Z]         at Fixture.setup (/apps/jnkn/workspace/EvergreenShoots-CMgt_PR-1560/main/integration-tests/playwright-e2e/node_modules/@playwright/test/lib/test/fixtures.js:73:73)
[2021-09-28T13:04:55.121Z]         at FixtureRunner.setupFixtureForRegistration (/apps/jnkn/workspace/EvergreenShoots-CMgt_PR-1560/main/integration-tests/playwright-e2e/node_modules/@playwright/test/lib/test/fixtures.js:312:5)
[2021-09-28T13:04:55.121Z]         at FixtureRunner.resolveParametersAndRunHookOrTest (/apps/jnkn/workspace/EvergreenShoots-CMgt_PR-1560/main/integration-tests/playwright-e2e/node_modules/@playwright/test/lib/test/fixtures.js:297:23)
[2021-09-28T13:04:55.121Z]         at WorkerRunner._runTestWithBeforeHooks (/apps/jnkn/workspace/EvergreenShoots-CMgt_PR-1560/main/integration-tests/playwright-e2e/node_modules/@playwright/test/lib/test/workerRunner.js:449:7)

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!!

@kumaraditya303
Copy link
Contributor

Fyi, I have got chromium and firefox working on CentOS 8 and created a dockerfile here https://github.com/kumaraditya303/playwright-centos/blob/master/Dockerfile only WebKit is not working.
Linking #6219

@udit0802
Copy link
Author

udit0802 commented Sep 29, 2021

https://github.com/kumaraditya303/playwright-centos/blob/master/Dockerfile

Awesome but, i was expecting OOTB support for the same.

@mxschmitt mxschmitt changed the title [Feature] Support playwright on centos [Feature] Support CentOS Sep 30, 2021
@jasonparallel
Copy link

GLIBC_2.18 ticket for chromium https://bugs.chromium.org/p/chromium/issues/detail?id=1253967&q=glibc&can=2

@ghost
Copy link

ghost commented Oct 13, 2021

+1 , we would like using Playwright on our production server, it runs CentOS 8

@andrewvc
Copy link

+1 as well

@paulovpereira
Copy link

+1 on this request

@MDSemetis
Copy link

+1 as well

@paulovpereira
Copy link

Seems like Chromium has a fix according to this comment: https://bugs.chromium.org/p/chromium/issues/detail?id=1261617#c49

@y-chen
Copy link

y-chen commented Nov 2, 2021

+1

1 similar comment
@FreezeSoul
Copy link

+1

@bbhxwl
Copy link

bbhxwl commented Nov 11, 2021

+1
chromium-930007 ./chrome: /lib64/libc.so.6: version `GLIBC_2.18' not found (required by ./chrome)

@bbhxwl
Copy link

bbhxwl commented Nov 11, 2021

+10

@aslushnikov
Copy link
Contributor

For the record: only issue upvoting counts as a vote

@canfeng11
Copy link

+10

@anastasiyamazheika
Copy link

+1

@rinogo
Copy link

rinogo commented Feb 3, 2022

What version(s) should we revert to for CentOS support? We were previously using ^1.9.2 successfully on our CentOS machine. When we updated to ^1.18.1, we started having problems. I see that @vigneshshanmugam reverted to 1.14.0. Will that enable us to use chrome on CentOS?

@andrewvc
Copy link

andrewvc commented Feb 3, 2022

@rinogo I think you may be confused between the versioning of https://github.com/elastic/synthetics which uses playwright and this repo which is for the playwright project itself. We have resolved our issue by moving our base image to Ubuntu FWIW.

@rinogo
Copy link

rinogo commented Feb 3, 2022

Thanks for your feedback, @andrewvc ! I was referring to this; maybe I'm misunderstanding, though!

Regardless, our environment is unfortunately not containerized, so switching platforms is a lot more challenging. Hoping something can come of this for us and the community - lots of legacy CentOS-hosted apps are still out there!

If I find some other kind of workaround, I'll post back here.

@ECIAP
Copy link

ECIAP commented Mar 15, 2022

+1

@azarudeena
Copy link

azarudeena commented Aug 23, 2022

++1

@tranngoclam
Copy link

+1

@baiyyee
Copy link

baiyyee commented Mar 13, 2023

+1

@jasonparallel
Copy link

@aslushnikov The recent move to node 18 broke centos 7 support. Was this intentional? See nodejs/node#43246

@aslushnikov
Copy link
Contributor

@jasonparallel we never supported CentOS, so i'm not sure what broke exactly. The move to node 18 was since 18 is the current LTS.

@yesid-lopez
Copy link

+1

@DexterIA
Copy link

+1 CentoOS support needed for our CI

@gskierk
Copy link

gskierk commented May 17, 2023

+1

1 similar comment
@dulestar
Copy link

+1

@tustman
Copy link

tustman commented Jun 13, 2023

+1 for centos

@vasthan
Copy link

vasthan commented Jun 23, 2023

+1

1 similar comment
@Johnson-You
Copy link

+1

@aslushnikov
Copy link
Contributor

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

@jonasz9
Copy link

jonasz9 commented Aug 22, 2023

+1

1 similar comment
@abinba
Copy link

abinba commented Sep 7, 2023

+1

@tov324
Copy link

tov324 commented Nov 12, 2023

+1

@1ManSmoking
Copy link

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!

@Knowledge-Labz
Copy link

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

@chrisdavies
Copy link

chrisdavies commented Mar 14, 2024

To add to @Knowledge-Labz answer, I had to also install dbus-glib in order for Firefox to work (on Fedora).

@mario16
Copy link

mario16 commented Mar 15, 2024

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!

@hafiz031
Copy link

hafiz031 commented Apr 1, 2024

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 ...

@yeyuchen198
Copy link

真是可惜官方不支持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也报错!!!
千万不要安装这个镜像!!!!!!

@bbhxwl
Copy link

bbhxwl commented Apr 24, 2024

真是可惜官方不支持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 里面运行,不知道为什么。

@sksharma0
Copy link

sksharma0 commented Jul 27, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests