Visual regression: browser binaries not installed in CI
Screenshot tools drive a real browser. If the browser binary or its shared libraries are not installed on the runner, capture fails before any comparison. Install the browsers (and dependencies) as an explicit CI step.
What this error means
The run fails with "Executable doesn't exist at ... run npx playwright install" or a Puppeteer "Could not find Chromium" error. No screenshots are captured because the browser never launches.
Error: browserType.launch: Executable doesn't exist at
/home/runner/.cache/ms-playwright/chromium-1112/chrome-linux/chrome
Looks like Playwright was just installed or updated.
Please run the following command to download new browsers:
npx playwright installCommon causes
Browsers not installed after the npm install
Installing the npm package does not download the browser binaries; a separate install step is required and was skipped.
Missing system dependencies for the browser
Even with the binary present, the runner may lack shared libraries the browser needs to launch.
How to fix it
Install browsers with their dependencies
Run the tool's install command with --with-deps so both the binary and system libraries are provisioned.
npx playwright install --with-deps chromiumCache the browser download
Cache the browser cache directory keyed on the tool version so installs are fast and reliable.
- uses: actions/cache@v4
with:
path: ~/.cache/ms-playwright
key: playwright-${{ hashFiles('package-lock.json') }}How to prevent it
- Add an explicit browser install step with
--with-deps. - Cache the browser cache directory keyed on the tool version.
- Prefer the official tool Docker image, which bundles browsers.