Playwright "Host system is missing dependencies" in CI
By Daniel Zoghalchali·Latchkey
The browser binaries are present but the Linux system libraries they link against (libnss3, libatk, libgbm, fonts) are not installed in the CI container, so the browser cannot launch.
What this error means
Launch fails with "Host system is missing dependencies to run browsers" and a list of missing .so libraries, or "error while loading shared libraries: libnss3.so." Common in slim base images.
playwright
Host system is missing dependencies to run browsers.
Missing libraries:
libnss3.so
libatk-1.0.so.0
libgbm.so.1
Please install them with the following command:
npx playwright install-deps
Common causes
Slim base image without browser libs
Minimal Linux images (alpine, slim) omit the X/graphics/font libraries Chromium and Firefox link against, so the browser cannot start.
install-deps step skipped
npx playwright install downloaded the browsers but install-deps (or --with-deps) was never run, so the OS packages are missing.
How to fix it
Install the system dependencies
Run install-deps (root/sudo) or use --with-deps when installing browsers.
Terminal
sudo npx playwright install-deps
# or in one step:
npx playwright install --with-deps
Use --with-deps or the official Playwright image in CI.
Pin the image so browser libraries match the Playwright version.
Avoid alpine/slim images for browser tests unless deps are added.
Frequently asked questions
What causes ""missing dependencies to run browsers""?
Minimal Linux images (alpine, slim) omit the X/graphics/font libraries Chromium and Firefox link against, so the browser cannot start.
How do I fix "missing dependencies to run browsers"?
Run install-deps (root/sudo) or use --with-deps when installing browsers.
Can Latchkey fix this automatically?
Yes. Latchkey runs your GitHub Actions on managed runners that detect this failure, apply the fix, and retry the job automatically - self-healing is on by default.