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

Playwright Host Validation Warning - Missing Browser Dependencies on CI #191

Closed
maehr opened this issue Oct 15, 2024 · 0 comments · Fixed by #193
Closed

Playwright Host Validation Warning - Missing Browser Dependencies on CI #191

maehr opened this issue Oct 15, 2024 · 0 comments · Fixed by #193
Assignees
Labels
bug Something isn't working

Comments

@maehr
Copy link
Member

maehr commented Oct 15, 2024

Current Behavior

While running the SvelteKit CI workflow, the Playwright setup step is failing due to missing dependencies required for running browsers on the host system. The CI job successfully downloads Chromium, FFMPEG, Firefox, and WebKit, but the following warning is displayed:

Host system is missing dependencies to run browsers.
Please install them with the following command:

    sudo pnpm exec playwright install-deps

Alternatively, use apt:
    sudo apt-get install libwoff1\
        libvpx9\
        libevent-2.1-7t64\
        libopus0\
        libgstreamer-plugins-base1.0-0\
        libgstreamer-gl1.0-0\
        libgstreamer-plugins-bad1.0-0\
        libharfbuzz-icu0\
        libsecret-1-0\
        libhyphen0\
        libmanette-0.2-0\
        libflite1\
        libgles2\
        gstreamer1.0-libav

The issue arises when running the Playwright installation command during the CI process:

pnpm exec playwright install

This step results in a warning due to the missing system dependencies required for browser execution on Ubuntu.

Expected Behavior:

Playwright should install the necessary dependencies for running browsers during the setup process in the CI workflow.

Actual Behavior:

The CI job fails with a warning regarding missing system libraries that Playwright requires to run the downloaded browsers.

Suggested Fix:

To resolve this issue, we need to add the missing dependencies installation step in the workflow YAML file prior to running the Playwright installation step.

Proposed Workflow YAML Update:

      - name: Install Playwright dependencies
        run: sudo pnpm exec playwright install-deps

      - name: Install playwright
        run: pnpm exec playwright install

This ensures that the required system dependencies are installed before attempting to install and use Playwright browsers.

Environment:

  • OS: Ubuntu (GitHub Actions ubuntu-latest)
  • Node.js: v22
  • Playwright: v1.48.0
  • Package Manager: pnpm v9

Let me know if you need any adjustments or further details for this issue!

Reproduction / Steps To Reproduce

  1. Trigger the SvelteKit CI pipeline.
  2. Observe that Playwright downloads the necessary browser binaries (Chromium, Firefox, WebKit, etc.).
  3. Receive a host validation warning indicating missing dependencies for running the browsers.

Anything else?

No response

@maehr maehr added the bug Something isn't working label Oct 15, 2024
@koilebeit koilebeit mentioned this issue Oct 23, 2024
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants