{"record":{"id":"cf04136ad9d2a04f","repo":"microsoft/playwright","slug":"no-chromium-based-browser-found-on-the-system-ple","errorCode":null,"errorMessage":"No chromium-based browser found on the system.\nPlease run the following command to download one:\n\n    ${installCommand}\n\n<3 Playwright Team","messagePattern":"No chromium-based browser found on the system\\.\nPlease run the following command to download one:\n\n    (.+?)\n\n<3 Playwright Team","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/playwright-core/src/server/registry/index.ts","lineNumber":1378,"sourceCode":"    try {\n      registry.findExecutable(name)!.executablePathOrDie(sdkLanguage);\n      channel = name === 'chromium' ? undefined : name;\n      break;\n    } catch (e) {\n    }\n  }\n\n  if (channel === null) {\n    const installCommand = buildPlaywrightCLICommand(sdkLanguage, `install chromium`);\n    const prettyMessage = [\n      `No chromium-based browser found on the system.`,\n      `Please run the following command to download one:`,\n      ``,\n      `    ${installCommand}`,\n      ``,\n      `<3 Playwright Team`,\n    ].join('\\n');\n    throw new Error('\\n' + wrapInASCIIBox(prettyMessage, 1));\n  }\n  return channel;\n}\n\nfunction lowercaseAllKeys(json: any): any {\n  if (typeof json !== 'object' || !json)\n    return json;\n\n  if (Array.isArray(json))\n    return json.map(lowercaseAllKeys);\n\n  const result: any = {};\n  for (const [key, value] of Object.entries(json))\n    result[key.toLowerCase()] = lowercaseAllKeys(value);\n  return result;\n}\n\nexport const registry = new Registry(require(path.join(packageRoot, 'browsers.json')));","sourceCodeStart":1360,"sourceCodeEnd":1396,"githubUrl":"https://github.com/microsoft/playwright/blob/c8fc3bf8d31542d59b4d4d9eaab1df93ff541dc6/packages/playwright-core/src/server/registry/index.ts#L1360-L1396","documentation":"Thrown by findChromiumChannelBestEffort (used by launchApp for UI Mode / Trace Viewer) when the loop over ['chromium','chrome','msedge'] finds none of them via executablePathOrDie — no hermetic chromium installed and no system Chrome/Edge detected. The boxed message directs the user to run 'playwright install chromium'.","triggerScenarios":"Opening UI Mode or the Trace Viewer on a machine where neither bundled chromium nor system chrome/msedge is installed — every executablePathOrDie call threw, leaving channel null.","commonSituations":"First run of 'npx playwright test --ui' or 'npx playwright show-tracer' before any browser was installed; a container image that skips browser download (PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD) and has no system Chrome.","solutions":["Run the command shown in the message: 'npx playwright install chromium'.","Install Google Chrome or Microsoft Edge system-wide so the best-effort detection succeeds.","Ensure the registry directory and bundled chromium are present (re-run 'npm install' for Playwright)."],"exampleFix":"// before — UI Mode launch fails\n// shell: npx playwright test --ui\n\n// after — install chromium first\n// shell: npx playwright install chromium && npx playwright test --ui","handlingStrategy":"try-catch","validationCode":"import { existsSync } from 'fs';\nimport { join } from 'path';\n\n// Best-effort pre-check before launching UI Mode / Trace Viewer\nconst browsersPath = process.env.PLAYWRIGHT_BROWSERS_PATH || join(require('os').homedir(), '.cache', 'ms-playwright');\nconst hasChromium = existsSync(browsersPath) && require('fs').readdirSync(browsersPath).some(d => d.startsWith('chromium'));\nif (!hasChromium) console.warn('Run: npx playwright install chromium');","typeGuard":"function hasAnyChromiumBrowser(): boolean {\n  for (const name of ['chromium', 'chrome', 'msedge']) {\n    const exec = registry.findExecutable(name);\n    if (exec?.executablePath()) return true;\n  }\n  return false;\n}","tryCatchPattern":"try {\n  const channel = findChromiumChannelBestEffort(sdkLanguage);\n} catch (e) {\n  if (/No chromium-based browser found/.test(e.message))\n    throw new Error('Run `npx playwright install chromium` before starting UI Mode');\n  else throw e;\n}","preventionTips":["Run 'npx playwright install chromium' as part of project setup.","Ensure CI images include either bundled chromium or a system Chrome/Edge.","Do not combine PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD with UI Mode/Trace Viewer without a system browser."],"tags":["chromium","ui-mode","trace-viewer","launch-app","browser-not-found"],"backgroundTag":null,"analyzedSha":"c8fc3bf8d31542d59b4d4d9eaab1df93ff541dc6","analyzedAt":"2026-08-12T07:26:36.950Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}