{"record":{"id":"68267d2e9021d655","repo":"microsoft/playwright","slug":"firefox-distribution-name-is-not-supported-on","errorCode":null,"errorMessage":"Firefox distribution '${name}' is not supported on ${process.platform}","messagePattern":"Firefox distribution '(.+?)' is not supported on (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/playwright-core/src/server/registry/index.ts","lineNumber":861,"sourceCode":"    return {\n      name,\n      browserName: 'chromium',\n      directory: undefined,\n      executablePath: () => executablePath('', false),\n      executablePathOrDie: (sdkLanguage: string) => executablePath(sdkLanguage, true)!,\n      installType: install ? 'install-script' : 'none',\n      _validateHostRequirements: () => Promise.resolve(),\n      _isHermeticInstallation: false,\n      _install: install,\n    };\n  }\n\n  private _createBidiFirefoxChannel(name: string, lookAt: Record<'linux' | 'darwin' | 'win32', string>, install?: () => Promise<void>): ExecutableImpl {\n    const executablePath = (sdkLanguage: string, shouldThrow: boolean) => {\n      const suffix = lookAt[process.platform as 'linux' | 'darwin' | 'win32'];\n      if (!suffix) {\n        if (shouldThrow)\n          throw new Error(`Firefox distribution '${name}' is not supported on ${process.platform}`);\n        return undefined;\n      }\n      const prefixes = (process.platform === 'win32' ? [\n        process.env.LOCALAPPDATA,\n        process.env.PROGRAMFILES,\n        process.env['PROGRAMFILES(X86)'],\n        // In some cases there is no PROGRAMFILES/(86) env var set but HOMEDRIVE is set.\n        process.env.HOMEDRIVE + '\\\\Program Files',\n        process.env.HOMEDRIVE + '\\\\Program Files (x86)',\n      ].filter(Boolean) : ['']) as string[];\n\n      for (const prefix of prefixes) {\n        const executablePath = path.join(prefix, suffix);\n        if (canAccessFile(executablePath))\n          return executablePath;\n      }\n      if (shouldThrow)\n        throw new Error(`Cannot find Firefox installation for channel '${name}' at the standard system paths. ${`Tried paths:\\n  ${prefixes.map(p => path.join(p, suffix)).join('\\n  ')}`}`);","sourceCodeStart":843,"sourceCodeEnd":879,"githubUrl":"https://github.com/microsoft/playwright/blob/c8fc3bf8d31542d59b4d4d9eaab1df93ff541dc6/packages/playwright-core/src/server/registry/index.ts#L843-L879","documentation":"Thrown by the executable resolver inside _createBidiFirefoxChannel when a Firefox-channel browser (BiDi-prefixed, e.g. 'firefox') is requested on a platform for which no lookup path was registered — lookAt[process.platform] is falsy. Analogous to the Chromium-channel unsupported-platform error (360) but for the Firefox BiDi channel path.","triggerScenarios":"Calling firefox.launch() in BiDi mode (or invoking executablePathOrDie on the bidi-firefox Executable) on an OS whose lookAt map entry is undefined/empty, so there is no system path to probe. Only thrown in the shouldThrow=true branch.","commonSituations":"Running Firefox BiDi on a minimal Linux image or a platform the installed Playwright version does not map a Firefox path for; mixing an older Playwright build with a newer Firefox channel definition.","solutions":["Use the hermetically-installed bundled firefox instead of relying on a system channel (run 'npx playwright install firefox').","Upgrade Playwright to a version that ships a Firefox path entry for your platform.","If you must use a system Firefox, install it to a standard location Playwright probes and ensure the lookAt entry exists in your Playwright version."],"exampleFix":"// before — no firefox path registered for this platform\nconst browser = await firefox.launch();\n\n// after — install bundled firefox hermetically\n// shell: npx playwright install firefox\nconst browser = await firefox.launch();","handlingStrategy":"validation","validationCode":"import { registry } from 'playwright-core/lib/server/registry';\n\nconst exec = registry.findExecutable('firefox');\nconst supported = !!exec?.executablePath(); // undefined rather than throw\nif (!supported) console.warn('Firefox channel not supported on this platform');","typeGuard":"function isFirefoxChannelSupportedOnPlatform(): boolean {\n  const exec = registry.findExecutable('firefox');\n  if (!exec) return false;\n  try { exec.executablePath(); return true; } catch { return false; }\n}","tryCatchPattern":"try {\n  browser = await firefox.launch();\n} catch (e) {\n  if (/not supported on/.test(e.message))\n    throw new Error(`Firefox not available on ${process.platform}; use chromium instead`);\n  else throw e;\n}","preventionTips":["Install bundled firefox via 'npx playwright install firefox' to avoid relying on the system channel.","Gate Firefox tests on supported platforms in the CI matrix.","Probe executablePath() before launching."],"tags":["firefox","bidi","platform","executable-path"],"backgroundTag":null,"analyzedSha":"c8fc3bf8d31542d59b4d4d9eaab1df93ff541dc6","analyzedAt":"2026-08-12T07:26:36.950Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}