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

Help installing Playwright with Webkit on Fedora 41 #2839

Open
fantonangeli opened this issue Jan 9, 2025 · 2 comments
Open

Help installing Playwright with Webkit on Fedora 41 #2839

fantonangeli opened this issue Jan 9, 2025 · 2 comments

Comments

@fantonangeli
Copy link
Contributor

I needed to run Playwright tests using Webkit and update a snapshot test, but Fedora Linux is not officially supported by Playwright (https://playwright.dev/docs/intro#system-requirements). Only Ubuntu and Debian are officially supported.

Steps to Reproduce

Followed the official instructions for installing Playwright dependencies (https://github.com/apache/incubator-kie-tools?tab=readme-ov-file#step-1-bootstrap) with the following command:

PLAYWRIGHT_BASE__installDeps=true pnpm bootstrap

output:

packages/playwright-base install$ run-script-if --bool "$(build-env playwrightBase.installDeps)" --then "pnpm playwright install --with-deps"
│ [run-script-if] Boolean condition supplied.
│ [run-script-if] Conditions are checked using the operator 'and'.
│ [run-script-if] Condition is 'true'. Running _then_ command(s).
│ [run-script-if] Running 1 command(s): ['pnpm playwright install --with-deps']
│ [run-script-if] Running 'pnpm playwright install --with-deps'
│ BEWARE: your OS is not officially supported by Playwright; installing dependencies for ubuntu20.04-x64 as a fallback.
│ Installing dependencies...
│ Switching to root user to install dependencies...
│ sh: line 1: apt-get: command not found
│ Failed to install browsers
│ Error: Installation process exited with code: 127
│ [run-script-if] Error executing 'pnpm playwright install --with-deps'.

How did I partially fix

  1. Tried manual installation with:
     cd packages/playwright-base; pnpx playwright install
     BEWARE: your OS is not officially supported by Playwright; downloading fallback build for ubuntu20.04-x64.
     Downloading Chromium 131.0.6778.33 (playwright build v1148) from https://playwright.azureedge.net/builds/chromium/1148/chromium-linux.zip
     161.3 MiB [====================] 100% 0.0s
     Chromium 131.0.6778.33 (playwright build v1148) downloaded to /home/fantonan/.cache/ms-playwright/chromium-1148
     BEWARE: your OS is not officially supported by Playwright; downloading fallback build for ubuntu20.04-x64.
     Downloading Chromium Headless Shell 131.0.6778.33 (playwright build v1148) from https://playwright.azureedge.net/builds/chromium/1148/chromium-headless-shell-linux.zip
     100.9 MiB [====================] 100% 0.0s
     Chromium Headless Shell 131.0.6778.33 (playwright build v1148) downloaded to /home/fantonan/.cache/ms-playwright/chromium_headless_shell-1148
     BEWARE: your OS is not officially supported by Playwright; downloading fallback build for ubuntu20.04-x64.
     Downloading Firefox 132.0 (playwright build v1466) from https://playwright.azureedge.net/builds/firefox/1466/firefox-ubuntu-20.04.zip
     87.6 MiB [====================] 100% 0.0s
     Firefox 132.0 (playwright build v1466) downloaded to /home/fantonan/.cache/ms-playwright/firefox-1466
     BEWARE: your OS is not officially supported by Playwright; downloading fallback build for ubuntu20.04-x64.
     You are using a frozen webkit browser which does not receive updates anymore on ubuntu20.04-x64. Please update to the latest version of your operating system to test up-to-date browsers.
     BEWARE: your OS is not officially supported by Playwright; downloading fallback build for ubuntu20.04-x64.
     Downloading FFMPEG playwright build v1010 from https://playwright.azureedge.net/builds/ffmpeg/1010/ffmpeg-linux.zip
     2.3 MiB [====================] 100% 0.0s
     FFMPEG playwright build v1010 downloaded to /home/fantonan/.cache/ms-playwright/ffmpeg-1010   
    This successfully installed Chromium and Firefox, but Webkit does not work.

How can I install Playwright with Webkit on Fedora Linux? Are there workarounds or additional steps I should take?
Thanks in advance

@fantonangeli fantonangeli changed the title Help installing Playwright with Webkit on Fedora Help installing Playwright with Webkit on Fedora 41 Jan 9, 2025
@ljmotta
Copy link
Contributor

ljmotta commented Jan 9, 2025

@fantonangeli Hey there! I'm not aware of any workarounds on how setup Playwright in Fedora, but I don't think this will work for the kie-tools monorepo as each OS has a slightly different screenshot, meaning the Fedora screenshot will be different of the Ubuntu that is used in the CI. I'm working in a solution to generate screenshots inside an Ubuntu container. I'll try to land a PR tomorrow or early next week.

@fantonangeli
Copy link
Contributor Author

Thank you so much, @ljmotta

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

No branches or pull requests

2 participants