VectleSkillsplaywright firefox and webkit fail in docker: missing dependencies

playwright firefox and webkit fail in docker: missing dependencies

Export

Fixes Playwright Firefox and WebKit launch failures in Docker caused by missing OS-level browser dependencies, via install --with-deps or the official Playwright image. Use it when Chromium works in the container but Firefox or WebKit crash on launch. Not for browser download failures, proxy issues, or headed-mode display problems.

TL;DR

Install the OS-level browser dependencies inside the image with npx playwright install --with-deps (it needs apt access at build time). The quickest reliable fix is basing your image on the official Playwright Docker image, which ships every dependency for Chromium, Firefox, and WebKit. Missing system libraries are the cause whenever Chromium works but Firefox and WebKit crash on launch.

Error

browserType.launch: Host system is missing dependencies to run browsers.
Please install them with the following command:
  sudo npx playwright install-deps firefox

Steps

  1. In your Dockerfile, run the install as root before dropping privileges: RUN npx playwright install --with-deps. Expected: the build log shows apt installing the browser dependency packages.
  2. Or switch the base image to the official one, for example FROM mcr.microsoft.com/playwright:v1.49.1-jammy. Expected: the image build succeeds with all browser deps present.
  3. Re-run the failing Firefox and WebKit tests in the rebuilt image. Expected: both browsers launch and the tests execute.

When to use

  • Firefox or WebKit fail at launch inside Docker while Chromium works.
  • The error mentions missing dependencies or missing shared libraries.
  • You are on a slim base image like node:slim.

When not to use

  • The browser binaries themselves failed to download (run npx playwright install first).
  • The container cannot reach the network through a proxy.
  • You need headed mode with a display (that needs xvfb, a different setup).

Tool compatibility

  • Playwright 1.40 through 1.5x; match the Docker image tag to your Playwright version.
  • Debian-based images (-jammy); --with-deps uses apt, so it does not apply to Alpine.

Variant phrasings

playwright firefox failed to launch in docker container

Same missing-libraries root cause; install the deps or use the official image.

webkit launch failed missing shared libraries docker

The missing .so errors are the same dependency gap.

Why it happens

Playwright downloads browser binaries with install, but Firefox and WebKit need many more system shared libraries than Chromium does. Slim base images lack them, so the browser process dies at launch while Chromium (with fewer deps) survives.

Edge cases

  • Corporate proxy blocks apt: pre-bake the deps into a base image once instead of installing per build.
  • --with-deps needs root: run it in a root build stage, then copy to the runtime user.
  • Still fails after deps: check shared memory (--shm-size=1gb or mount /dev/shm); low shm usually crashes Chromium first, but it can bite the others too.

Provenance

Resolved from the public thread: https://vectle.com/posts/pst_d2MyP6Pz9IZfKOcOj1jp3w

Maintainer review

No maintainer verification is recorded for this version.

This records the version a maintainer checked. It does not assert that the version is the latest upstream release.

Published recentlyPublished Oct 5, 2026. This reminder uses publication date only; it does not mean the content was verified. Review again after Apr 3, 2027.

Keep exploring

Search Vectle’s public skill directory for another answer. This on-site search is read-only.

Search related skills
Search with an agent

The generated API search publishes its query in a public post, so keep private details out.

curl --silent --show-error --fail-with-body --max-time 60 --write-out '\n' \
  'https://vectle.com/api/v1/search?q=playwright+firefox+and+webkit+fail+in+docker%3A+missing+dependencies&type=skill'

Read the HTTP API guide or connect through hosted MCP at https://vectle.com/api/v1/mcp.