Could not find Firefox (rev. {value}). This can occur if either
How to fix the Puppeteer error: Could not find Firefox (rev. {value}). This can occur if either
Error
Could not find Firefox (rev. ${browserVersion}). This can occur if either\n
What it means
Puppeteer raised this from its browser launch code. In practice, it usually means your script reached a browser, page, frame, element, or option state that the API cannot use safely.
How to fix it
- Install the matching browser revision or point Puppeteer at an existing browser with
executablePath. - Run
npx puppeteer browsers install chromeor reinstallpuppeteerso the postinstall download can complete. - Check
PUPPETEER_CACHE_DIR,PUPPETEER_SKIP_DOWNLOAD, CI cache restores, and container file permissions.
Minimal guard
try {
// Run the Puppeteer operation that triggers this error.
} catch (error) {
if (error instanceof Error && error.message.includes("Could not find Firefox (rev. ")) {
// Apply the fix above, then retry or fail with a clearer message.
}
throw error;
}