Skip to content
Latchkey

Playwright "Host system is missing dependencies to run browsers" in CI

The Chromium binary is present but its dynamic dependencies (libnss3, libgbm, libgtk, and friends) are not installed on the runner. Playwright detects this before launch and tells you to install the OS packages with playwright install-deps.

What this error means

Playwright aborts with "Host system is missing dependencies to run browsers." and lists missing libraries such as libnss3, libnspr4, libgbm1, or libasound2, then suggests running npx playwright install-deps.

Playwright
Host system is missing dependencies to run browsers.
Missing libraries:
    libnss3.so
    libnspr4.so
    libgbm.so.1
Please install them with the following command:
    npx playwright install-deps

Common causes

A slim runner image without browser OS libraries

Minimal Ubuntu or container images omit the X, GTK, NSS, and Mesa libraries that headless Chromium still links against at launch.

Browsers installed without --with-deps

Running playwright install alone downloads binaries but does not install the system packages they need, so the launch fails on the missing .so files.

How to fix it

Install browsers with their OS dependencies

Use the combined flag so the apt packages land alongside the binaries.

Terminal
npx playwright install --with-deps chromium

Install only the dependencies for existing binaries

If the browsers are already cached, install just the system libraries.

Terminal
npx playwright install-deps

How to prevent it

  • Prefer playwright install --with-deps so libraries and binaries stay in sync.
  • Use the official mcr.microsoft.com/playwright image, which ships the OS deps preinstalled.
  • Re-run install-deps after upgrading Playwright in case new libraries are required.

Frequently asked questions

What causes ""Host system is missing dependencies""?
Minimal Ubuntu or container images omit the X, GTK, NSS, and Mesa libraries that headless Chromium still links against at launch.
How do I fix "Host system is missing dependencies"?
Use the combined flag so the apt packages land alongside the binaries.

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card