{"record":{"id":"ec2a76c30cc26d99","repo":"microsoft/playwright","slug":"chromium-distribution-name-is-not-found-loca","errorCode":null,"errorMessage":"Chromium distribution '${name}' is not found${location}${installation}","messagePattern":"Chromium distribution '(.+?)' is not found(.+?)(.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/playwright-core/src/server/registry/index.ts","lineNumber":841,"sourceCode":"        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;\n\n      const location = prefixes.length ? ` at ${path.join(prefixes[0], suffix)}` : ``;\n      const installation = install ? `\\nRun \"${buildPlaywrightCLICommand(sdkLanguage, 'install ' + name)}\"` : '';\n      throw new Error(`Chromium distribution '${name}' is not found${location}${installation}`);\n    };\n    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) {","sourceCodeStart":823,"sourceCodeEnd":859,"githubUrl":"https://github.com/microsoft/playwright/blob/c8fc3bf8d31542d59b4d4d9eaab1df93ff541dc6/packages/playwright-core/src/server/registry/index.ts#L823-L859","documentation":"Thrown by the Chromium-channel executable resolver when the current platform IS supported (a lookup suffix exists) but no candidate prefix+suffix path is accessible via canAccessFile, meaning the browser binary is not installed at any expected system location. The message includes the first probed path and, if an install script exists, the exact 'playwright install <name>' command to fix it.","triggerScenarios":"Calling chromium.launch({ channel: 'chrome' }) (or msedge/chrome-beta) via executablePathOrDie when the OS is supported but the browser has not been installed: on Windows none of LOCALAPPDATA/PROGRAMFILES/HOMEDRIVE prefixes resolve to the binary; on Linux/macOS the single '' prefix + suffix path does not exist.","commonSituations":"Fresh CI runner or Docker container where Google Chrome / Edge has never been installed; the browser was uninstalled or installed to a non-standard directory; wrong architecture (e.g. arm64 Chrome not at the x64 path).","solutions":["Run the install command printed in the error, e.g. 'npx playwright install chrome' or 'npx playwright install msedge'.","On Linux CI, add a setup step that installs the system browser (e.g. apt-get install google-chrome-stable).","Remove the channel option to use Playwright's bundled chromium which is always hermetically installable.","Verify the browser actually exists at the reported path and fix the install if it is in a non-standard location."],"exampleFix":"// before — fails on a clean runner\nconst browser = await chromium.launch({ channel: 'chrome' });\n\n// after — install the channel first, then launch\n// shell: npx playwright install chrome\nconst browser = await chromium.launch({ channel: 'chrome' });","handlingStrategy":"try-catch","validationCode":"import { existsSync } from 'fs';\nimport { registry } from 'playwright-core/lib/server/registry';\n\nconst channel = 'chrome';\nconst exec = registry.findExecutable(channel);\nconst present = !!exec?.executablePath(); // non-throwing probe\nif (!present) console.warn(`Channel ${channel} not installed; run: npx playwright install ${channel}`);","typeGuard":"function isChromiumChannelInstalled(channel: string): boolean {\n  const exec = registry.findExecutable(channel);\n  return !!exec?.executablePath();\n}","tryCatchPattern":"try {\n  browser = await chromium.launch({ channel: 'chrome' });\n} catch (e) {\n  if (/is not found/.test(e.message)) {\n    // install or fall back to bundled chromium\n    browser = await chromium.launch();\n  } else throw e;\n}","preventionTips":["Include 'npx playwright install chrome' (or the relevant channel) as a CI setup step.","Probe executablePath() before launching and fall back to bundled chromium.","Pin the browser install to the same Playwright version as the test runner."],"tags":["chromium-channel","browser-not-found","launch","executable-path"],"backgroundTag":null,"analyzedSha":"c8fc3bf8d31542d59b4d4d9eaab1df93ff541dc6","analyzedAt":"2026-08-12T07:26:36.950Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}