playwright icon indicating copy to clipboard operation
playwright copied to clipboard

[Feature] Support CentOS

Open udit0802 opened this issue 3 years ago • 58 comments

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 :

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

udit0802 avatar Sep 28 '21 19:09 udit0802

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 https://github.com/microsoft/playwright/issues/6219

kumaraditya303 avatar Sep 29 '21 03:09 kumaraditya303

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

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

udit0802 avatar Sep 29 '21 15:09 udit0802

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

jasonparallel avatar Oct 06 '21 15:10 jasonparallel

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

ghost avatar Oct 13 '21 02:10 ghost

+1 as well

andrewvc avatar Oct 19 '21 21:10 andrewvc

+1 on this request

paulovpereira avatar Oct 28 '21 11:10 paulovpereira

+1 as well

MDSemetis avatar Oct 29 '21 09:10 MDSemetis

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

paulovpereira avatar Oct 29 '21 10:10 paulovpereira

+1

y-chen avatar Nov 02 '21 15:11 y-chen

+1

FreezeSoul avatar Nov 05 '21 01:11 FreezeSoul

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

bbhxwl avatar Nov 11 '21 06:11 bbhxwl

+10

bbhxwl avatar Nov 11 '21 07:11 bbhxwl

For the record: only issue upvoting counts as a vote

aslushnikov avatar Nov 11 '21 07:11 aslushnikov

+10

canfeng11 avatar Nov 17 '21 07:11 canfeng11

+1

anastasiyamazheika avatar Jan 24 '22 13:01 anastasiyamazheika

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?

rinogo avatar Feb 03 '22 18:02 rinogo

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

andrewvc avatar Feb 03 '22 21:02 andrewvc

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.

rinogo avatar Feb 03 '22 21:02 rinogo

+1

ECIAP avatar Mar 15 '22 09:03 ECIAP

++1

azarudeena avatar Aug 23 '22 12:08 azarudeena

+1

tranngoclam avatar Aug 23 '22 12:08 tranngoclam

+1

Rvtea avatar Sep 01 '22 03:09 Rvtea

+1 (Rocky Linux)

digiscape-bnu avatar Sep 04 '22 16:09 digiscape-bnu

+1

ToanNguyen97 avatar Sep 23 '22 09:09 ToanNguyen97

+1

royteeuwen avatar Oct 17 '22 15:10 royteeuwen

+1

sanderlenaerts avatar Oct 17 '22 15:10 sanderlenaerts

+1

BryanEdClark avatar Oct 28 '22 22:10 BryanEdClark

+1

rhwong avatar Nov 09 '22 01:11 rhwong

+1 Wouldnt be bad to add support for the RedHat too 👍🏻

Sanady avatar Nov 16 '22 11:11 Sanady

+1

baart1989 avatar Nov 26 '22 21:11 baart1989