{"record":{"id":"6faf4e106484d94e","repo":"microsoft/playwright","slug":"chromium-distribution-name-is-not-supported-o","errorCode":null,"errorMessage":"Chromium distribution '${name}' is not supported on ${process.platform}","messagePattern":"Chromium distribution '(.+?)' is not supported on (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/playwright-core/src/server/registry/index.ts","lineNumber":819,"sourceCode":"      executablePath: () => undefined,\n      executablePathOrDie: () => '',\n      installType: 'download-on-demand',\n      _validateHostRequirements: () => Promise.resolve(),\n      downloadURLs: this._downloadURLs(android),\n      title: android.title,\n      revision: android.revision,\n      _install: force => this._downloadExecutable(android, force),\n      _dependencyGroup: 'tools',\n      _isHermeticInstallation: true,\n    });\n  }\n\n  private _createChromiumChannel(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(`Chromium 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        return undefined;","sourceCodeStart":801,"sourceCodeEnd":837,"githubUrl":"https://github.com/microsoft/playwright/blob/c8fc3bf8d31542d59b4d4d9eaab1df93ff541dc6/packages/playwright-core/src/server/registry/index.ts#L801-L837","documentation":"Thrown by the executable-path resolver inside _createChromiumChannel when a system-installed Chromium-channel browser (e.g. 'chrome', 'chrome-beta', 'msedge') is requested on a platform for which no lookup path was registered. The lookAt map keyed by 'linux'|'darwin'|'win32' returns a falsy suffix for process.platform, so Playwright has no known location to probe. It surfaces via executablePathOrDie, which ChromiumType.launch calls when channel is set and the bundled chromium is not used.","triggerScenarios":"Calling chromium.launch({ channel: 'chrome' }) (or 'chrome-beta','msedge','msedge-beta','msedge-dev') on an OS where that channel's lookAt entry is undefined or empty; or invoking executablePathOrDie on the registry Executable for that channel. The error fires only in the shouldThrow=true branch (executablePathOrDie), not in the non-throwing executablePath() probe.","commonSituations":"Running a CI matrix that sets a fixed channel name but executes on an OS that does not ship that channel; using a Playwright version that predates a channel's platform support; assuming 'chrome' is resolvable on a minimal Linux container that only has the bundled chromium.","solutions":["Omit the channel option so Playwright falls back to the hermetically-installed bundled chromium.","Run 'npx playwright install <channel>' on the target OS to register and install the channel before launching.","Gate the channel value on process.platform in your launch config so an unsupported platform uses bundled chromium instead.","Upgrade Playwright — newer versions add platform paths for additional channels."],"exampleFix":"// before\nconst browser = await chromium.launch({ channel: 'chrome' });\n\n// after\nconst browser = await chromium.launch({\n  channel: ['win32','darwin'].includes(process.platform) ? 'chrome' : undefined,\n});","handlingStrategy":"validation","validationCode":"import { registry } from 'playwright-core/lib/server/registry';\n\nconst channel = 'chrome';\nconst exec = registry.findExecutable(channel);\n// Non-throwing probe: returns undefined instead of throwing\nconst path = exec?.executablePath();\nif (!path) {\n  // fall back to bundled chromium — do not call executablePathOrDie\n}","typeGuard":"function isChannelSupportedOnPlatform(channel: string): boolean {\n  const exec = registry.findExecutable(channel);\n  if (!exec) return false;\n  try { exec.executablePath(); return true; } catch { return false; }\n}","tryCatchPattern":"try {\n  browser = await chromium.launch({ channel });\n} catch (e) {\n  if (/not supported on/.test(e.message))\n    browser = await chromium.launch(); // bundled fallback\n  else throw e;\n}","preventionTips":["Make the channel option conditional on process.platform.","Probe executablePath() (non-throwing) before launching with a channel.","In CI, install the channel on every OS in the matrix before running tests."],"tags":["chromium-channel","platform","launch","executable-path"],"backgroundTag":null,"analyzedSha":"c8fc3bf8d31542d59b4d4d9eaab1df93ff541dc6","analyzedAt":"2026-08-12T07:26:36.950Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}