microsoft/playwright · error · Error
Chromium distribution '${name}' is not found${location}${ins
Error message
Chromium distribution '${name}' is not found${location}${installation} What it means
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.
Source
Thrown at packages/playwright-core/src/server/registry/index.ts:841
process.env.LOCALAPPDATA,
process.env.PROGRAMFILES,
process.env['PROGRAMFILES(X86)'],
// In some cases there is no PROGRAMFILES/(86) env var set but HOMEDRIVE is set.
process.env.HOMEDRIVE + '\\Program Files',
process.env.HOMEDRIVE + '\\Program Files (x86)',
].filter(Boolean) : ['']) as string[];
for (const prefix of prefixes) {
const executablePath = path.join(prefix, suffix);
if (canAccessFile(executablePath))
return executablePath;
}
if (!shouldThrow)
return undefined;
const location = prefixes.length ? ` at ${path.join(prefixes[0], suffix)}` : ``;
const installation = install ? `\nRun "${buildPlaywrightCLICommand(sdkLanguage, 'install ' + name)}"` : '';
throw new Error(`Chromium distribution '${name}' is not found${location}${installation}`);
};
return {
name,
browserName: 'chromium',
directory: undefined,
executablePath: () => executablePath('', false),
executablePathOrDie: (sdkLanguage: string) => executablePath(sdkLanguage, true)!,
installType: install ? 'install-script' : 'none',
_validateHostRequirements: () => Promise.resolve(),
_isHermeticInstallation: false,
_install: install,
};
}
private _createBidiFirefoxChannel(name: string, lookAt: Record<'linux' | 'darwin' | 'win32', string>, install?: () => Promise<void>): ExecutableImpl {
const executablePath = (sdkLanguage: string, shouldThrow: boolean) => {
const suffix = lookAt[process.platform as 'linux' | 'darwin' | 'win32'];
if (!suffix) {View on GitHub (pinned to c8fc3bf8d3)
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.
Example fix
// before — fails on a clean runner
const browser = await chromium.launch({ channel: 'chrome' });
// after — install the channel first, then launch
// shell: npx playwright install chrome
const browser = await chromium.launch({ channel: 'chrome' }); Defensive patterns
Strategy: try-catch
Validate before calling
import { existsSync } from 'fs';
import { registry } from 'playwright-core/lib/server/registry';
const channel = 'chrome';
const exec = registry.findExecutable(channel);
const present = !!exec?.executablePath(); // non-throwing probe
if (!present) console.warn(`Channel ${channel} not installed; run: npx playwright install ${channel}`); Type guard
function isChromiumChannelInstalled(channel: string): boolean {
const exec = registry.findExecutable(channel);
return !!exec?.executablePath();
} Try / catch
try {
browser = await chromium.launch({ channel: 'chrome' });
} catch (e) {
if (/is not found/.test(e.message)) {
// install or fall back to bundled chromium
browser = await chromium.launch();
} else throw e;
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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).
Related errors
- Chromium distribution '${name}' is not supported on ${proces
- Failed to launch ${this._name} because executable doesn't ex
- Cannot find Firefox installation for channel '${name}' at th
- Browser is not supported on current platform
- Cannot launch Firefox with relative home directory. Did you
AI-assisted analysis of microsoft/playwright@c8fc3bf8d3 (2026-08-12).
Data as JSON: /api/errors/ec2a76c30cc26d99.
Report an issue: GitHub.