microsoft/playwright · error · Error
Browser is not supported on current platform
Error message
Browser is not supported on current platform
What it means
Thrown by BrowserType.executablePath() when the initializer has no executablePath. The initializer.executablePath is empty when the current platform/architecture has no bundled browser binary for this BrowserType (e.g. a browser package not installed or not shipped for the OS).
Source
Thrown at packages/playwright-core/src/client/browserType.ts:58
export interface BrowserServer extends api.BrowserServer {
process(): ChildProcess;
wsEndpoint(): string;
close(): Promise<void>;
kill(): Promise<void>;
}
export class BrowserType extends ChannelOwner<channels.BrowserTypeChannel> implements api.BrowserType {
_serverLauncher?: BrowserServerLauncher;
_contexts = new Set<BrowserContext>();
_playwright!: Playwright;
static from(browserType: channels.BrowserTypeChannel): BrowserType {
return (browserType as any)._object;
}
executablePath(): string {
if (!this._initializer.executablePath)
throw new Error('Browser is not supported on current platform');
return this._initializer.executablePath;
}
name(): string {
return this._initializer.name;
}
async launch(options: LaunchOptions = {}): Promise<Browser> {
assert(!(options as any).userDataDir, 'userDataDir option is not supported in `browserType.launch`. Use `browserType.launchPersistentContext` instead');
assert(!(options as any).port, 'Cannot specify a port without launching as a server.');
const logger = options.logger || this._playwright._defaultLaunchOptions?.logger;
options = { ...this._playwright._defaultLaunchOptions, ...options };
const launchOptions: channels.BrowserTypeLaunchParams = {
...options,
ignoreDefaultArgs: Array.isArray(options.ignoreDefaultArgs) ? options.ignoreDefaultArgs : undefined,
ignoreAllDefaultArgs: !!options.ignoreDefaultArgs && !Array.isArray(options.ignoreDefaultArgs),
env: options.env ? envObjectToArray(options.env) : undefined,View on GitHub (pinned to c8fc3bf8d3)
Solutions
- Run `npx playwright install` (or `install firefox`) to fetch the browser binary.
- Use a package/platform combination that ships the engine, or fall back to a supported BrowserType.
- Check PLAYWRIGHT_BROWSERS_PATH and that the platform is in the supported matrix.
Example fix
// before console.log(playwright.firefox.executablePath()); // throws on unsupported box // after // install first, then: npx playwright install firefox console.log(playwright.firefox.executablePath());
Defensive patterns
Strategy: validation
Validate before calling
try {
return browserType.executablePath();
} catch {
throw new Error(`No ${browserType.name()} binary for this platform; run 'npx playwright install ${browserType.name()}'.`);
} Type guard
function hasExecutable(bt: any): boolean {
return !!bt?._initializer?.executablePath;
} Prevention
- Run `npx playwright install` as part of CI setup.
- Confirm the platform/arch is in the supported matrix before relying on executablePath().
When it happens
Trigger: Calling `firefox.executablePath()` when the firefox browser package isn't installed for the platform; using a per-browser distribution (e.g. playwright-firefox) on an unsupported arch; running before `npx playwright install` populates the binary.
Common situations: CI images missing the browser system deps or the browser download; ARM/Windows-on-ARM where a particular engine isn't published; calling executablePath() to log/validate before install has run.
Related errors
- WebKit via WSL is only supported on Windows
- Chromium distribution '${name}' is not supported on ${proces
- Firefox distribution '${name}' is not supported on ${process
- Cannot install ${channel} on ${process.platform}
- Only one of --no-shell and --only-shell can be specified
AI-assisted analysis of microsoft/playwright@c8fc3bf8d3 (2026-08-12).
Data as JSON: /api/errors/44cd83c2760ef144.
Report an issue: GitHub.