Skip to content
Latchkey

Puppeteer "Could not find expected browser (chrome)" in CI

Puppeteer launches a specific Chromium revision it expects in its cache. If the download was skipped (PUPPETEER_SKIP_DOWNLOAD), or the cache was not restored, that revision is absent and launch fails with "Could not find expected browser".

What this error means

puppeteer.launch() throws "Could not find expected browser (chrome) locally. Run npx puppeteer browsers install chrome to download the browser." during a CI run.

puppeteer
Error: Could not find expected browser (chrome) locally.
Run `npx puppeteer browsers install chrome` to download the correct Chromium revision.

Common causes

The browser download was skipped at install

PUPPETEER_SKIP_DOWNLOAD (or PUPPETEER_SKIP_CHROMIUM_DOWNLOAD) was set during npm install, so no Chromium was fetched.

The Puppeteer cache was not restored in CI

A cached ~/.cache/puppeteer was expected but not restored, so the expected revision is missing on the runner.

How to fix it

Install the browser explicitly

  1. Run npx puppeteer browsers install chrome after npm install.
  2. Do not set PUPPETEER_SKIP_DOWNLOAD unless you provide a browser another way.
  3. Re-run so Puppeteer finds the expected revision.
.github/workflows/ci.yml
- run: npm ci
- run: npx puppeteer browsers install chrome

Or point Puppeteer at an installed Chrome

If you install Chrome yourself, set executablePath and the skip-download flag together so Puppeteer uses your binary.

JavaScript
const browser = await puppeteer.launch({
  executablePath: '/usr/bin/google-chrome',
});

How to prevent it

  • Run puppeteer browsers install chrome in CI when download was skipped.
  • Cache and restore ~/.cache/puppeteer with a key tied to the Puppeteer version.
  • If using a system Chrome, set executablePath explicitly.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →