microsoft/playwright · error · Error

Firefox distribution '${name}' is not supported on ${process

Error message

Firefox distribution '${name}' is not supported on ${process.platform}

What it means

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.

Source

Thrown at packages/playwright-core/src/server/registry/index.ts:861

    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) {
        if (shouldThrow)
          throw new Error(`Firefox distribution '${name}' is not supported on ${process.platform}`);
        return undefined;
      }
      const prefixes = (process.platform === 'win32' ? [
        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)
        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  ')}`}`);

View on GitHub (pinned to c8fc3bf8d3)

Solutions

  1. Use the hermetically-installed bundled firefox instead of relying on a system channel (run 'npx playwright install firefox').
  2. Upgrade Playwright to a version that ships a Firefox path entry for your platform.
  3. 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.

Example fix

// before — no firefox path registered for this platform
const browser = await firefox.launch();

// after — install bundled firefox hermetically
// shell: npx playwright install firefox
const browser = await firefox.launch();
Defensive patterns

Strategy: validation

Validate before calling

import { registry } from 'playwright-core/lib/server/registry';

const exec = registry.findExecutable('firefox');
const supported = !!exec?.executablePath(); // undefined rather than throw
if (!supported) console.warn('Firefox channel not supported on this platform');

Type guard

function isFirefoxChannelSupportedOnPlatform(): boolean {
  const exec = registry.findExecutable('firefox');
  if (!exec) return false;
  try { exec.executablePath(); return true; } catch { return false; }
}

Try / catch

try {
  browser = await firefox.launch();
} catch (e) {
  if (/not supported on/.test(e.message))
    throw new Error(`Firefox not available on ${process.platform}; use chromium instead`);
  else throw e;
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of microsoft/playwright@c8fc3bf8d3 (2026-08-12). Data as JSON: /api/errors/68267d2e9021d655. Report an issue: GitHub.