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.
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-depsCommon 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.
npx playwright install --with-deps chromiumInstall only the dependencies for existing binaries
If the browsers are already cached, install just the system libraries.
npx playwright install-depsHow to prevent it
- Prefer
playwright install --with-depsso libraries and binaries stay in sync. - Use the official
mcr.microsoft.com/playwrightimage, which ships the OS deps preinstalled. - Re-run install-deps after upgrading Playwright in case new libraries are required.