{"record":{"id":"44cd83c2760ef144","repo":"microsoft/playwright","slug":"browser-is-not-supported-on-current-platform","errorCode":null,"errorMessage":"Browser is not supported on current platform","messagePattern":"Browser is not supported on current platform","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/playwright-core/src/client/browserType.ts","lineNumber":58,"sourceCode":"export interface BrowserServer extends api.BrowserServer {\n  process(): ChildProcess;\n  wsEndpoint(): string;\n  close(): Promise<void>;\n  kill(): Promise<void>;\n}\n\nexport class BrowserType extends ChannelOwner<channels.BrowserTypeChannel> implements api.BrowserType {\n  _serverLauncher?: BrowserServerLauncher;\n  _contexts = new Set<BrowserContext>();\n  _playwright!: Playwright;\n\n  static from(browserType: channels.BrowserTypeChannel): BrowserType {\n    return (browserType as any)._object;\n  }\n\n  executablePath(): string {\n    if (!this._initializer.executablePath)\n      throw new Error('Browser is not supported on current platform');\n    return this._initializer.executablePath;\n  }\n\n  name(): string {\n    return this._initializer.name;\n  }\n\n  async launch(options: LaunchOptions = {}): Promise<Browser> {\n    assert(!(options as any).userDataDir, 'userDataDir option is not supported in `browserType.launch`. Use `browserType.launchPersistentContext` instead');\n    assert(!(options as any).port, 'Cannot specify a port without launching as a server.');\n\n    const logger = options.logger || this._playwright._defaultLaunchOptions?.logger;\n    options = { ...this._playwright._defaultLaunchOptions, ...options };\n    const launchOptions: channels.BrowserTypeLaunchParams = {\n      ...options,\n      ignoreDefaultArgs: Array.isArray(options.ignoreDefaultArgs) ? options.ignoreDefaultArgs : undefined,\n      ignoreAllDefaultArgs: !!options.ignoreDefaultArgs && !Array.isArray(options.ignoreDefaultArgs),\n      env: options.env ? envObjectToArray(options.env) : undefined,","sourceCodeStart":40,"sourceCodeEnd":76,"githubUrl":"https://github.com/microsoft/playwright/blob/c8fc3bf8d31542d59b4d4d9eaab1df93ff541dc6/packages/playwright-core/src/client/browserType.ts#L40-L76","documentation":"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).","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before\nconsole.log(playwright.firefox.executablePath()); // throws on unsupported box\n// after\n// install first, then:\nnpx playwright install firefox\nconsole.log(playwright.firefox.executablePath());","handlingStrategy":"validation","validationCode":"try {\n  return browserType.executablePath();\n} catch {\n  throw new Error(`No ${browserType.name()} binary for this platform; run 'npx playwright install ${browserType.name()}'.`);\n}","typeGuard":"function hasExecutable(bt: any): boolean {\n  return !!bt?._initializer?.executablePath;\n}","tryCatchPattern":null,"preventionTips":["Run `npx playwright install` as part of CI setup.","Confirm the platform/arch is in the supported matrix before relying on executablePath()."],"tags":["executable-path","platform","install"],"backgroundTag":null,"analyzedSha":"c8fc3bf8d31542d59b4d4d9eaab1df93ff541dc6","analyzedAt":"2026-08-12T07:26:36.950Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}