(Created on )

Puppeteer: Could not detect required browser platform

Executable resolution cannot detect a supported browser platform.


Executable resolution cannot detect a supported browser platform.

Error message

Could not detect required browser platform

How this error happens

Executable resolution depends on an OS/architecture pair supported by the browser manager. On an unsupported host, automatic resolution has no platform to use.

The failing snippet assumes the browser manager cannot detect a supported platform.

import puppeteer from "puppeteer";

const executable = puppeteer.executablePath();

How to fix

Run the browser on a supported host. If Node.js can use a supported remote endpoint, connect instead of trying to resolve and launch a local browser.

const browser = await puppeteer.connect({
    browserWSEndpoint: process.env.BROWSER_WS_ENDPOINT,
});

Things to keep in mind

Set BROWSER_WS_ENDPOINT to a real reachable browser endpoint. A platform override cannot make a foreign binary executable on the current OS.

All Puppeteer errors

Keep Reading

Puppeteer Guides

All Guides →