ERROR: Failed to set up {value} v{value}! Set 'PUPPETEER_SKIP_DOWNLOAD' env variable to...
How to fix the Puppeteer error: ERROR: Failed to set up {value} v{value}! Set 'PUPPETEER_SKIP_DOWNLOAD' env variable to...
Error
ERROR: Failed to set up ${browser} v${buildId}! Set "PUPPETEER_SKIP_DOWNLOAD" env variable to skip download.
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
- Verify network access to the browser download host and avoid setting
PUPPETEER_SKIP_DOWNLOADunless you provide your own browser. - Clear the Puppeteer browser cache and reinstall if an archive or metadata file is corrupt.
- On Linux, install required system packages before launching the browser.
Minimal guard
try {
// Run the Puppeteer operation that triggers this error.
} catch (error) {
if (error instanceof Error && error.message.includes("ERROR: Failed to set up ")) {
// Apply the fix above, then retry or fail with a clearer message.
}
throw error;
}