microsoft/playwright · error · Error

Cannot install ${channel} on ${process.platform}

Error message

Cannot install ${channel} on ${process.platform}

What it means

Thrown by _installMSEdgeChannel on non-Linux platforms after fetching the Microsoft Edge updates API (edgeupdates.microsoft.com/api/products) when no artifact matching the searchConfig for the current platform is found. The API response either lacked the product (Stable/Beta/Dev), lacked a release for MacOS-universal/pkg or Windows-x64/msi, or had no artifacts.

Source

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

    if (process.platform !== 'linux') {
      const products = lowercaseAllKeys(JSON.parse(await fetchData(undefined, { url: 'https://edgeupdates.microsoft.com/api/products' })));

      const productName = {
        'msedge': 'Stable',
        'msedge-beta': 'Beta',
        'msedge-dev': 'Dev',
      }[channel];
      const product = products.find((product: any) => product.product === productName);
      const searchConfig = ({
        darwin: { platform: 'MacOS', arch: 'universal', artifact: 'pkg' },
        win32: { platform: 'Windows', arch: 'x64', artifact: 'msi' },
      } as any)[process.platform];
      const release = searchConfig ? product.releases.find((release: any) => release.platform === searchConfig.platform && release.architecture === searchConfig.arch && release.artifacts.length > 0) : null;
      const artifact = release ? release.artifacts.find((artifact: any) => artifact.artifactname === searchConfig.artifact) : null;
      if (artifact)
        scriptArgs.push(artifact.location /* url */);
      else
        throw new Error(`Cannot install ${channel} on ${process.platform}`);
    }
    await this._installChromiumChannel(channel, scripts, scriptArgs);
  }

  private async _installChromiumChannel(channel: string, scripts: Record<'linux' | 'darwin' | 'win32', string>, scriptArgs: string[] = []) {
    const scriptName = scripts[process.platform as 'linux' | 'darwin' | 'win32'];
    if (!scriptName)
      throw new Error(`Cannot install ${channel} on ${process.platform}`);
    const cwd = BIN_PATH;
    const isPowerShell = scriptName.endsWith('.ps1');
    if (isPowerShell) {
      const args = [
        '-ExecutionPolicy', 'Bypass', '-File',
        path.join(BIN_PATH, scriptName),
        ...scriptArgs
      ];
      const { code } = await spawnAsync('powershell.exe', args, { cwd, stdio: 'inherit' });
      if (code !== 0)

View on GitHub (pinned to c8fc3bf8d3)

Solutions

  1. Retry the install after a short wait — the API outage is often transient.
  2. Install Microsoft Edge manually from the official site, then launch with channel 'msedge' (Playwright will detect the system install).
  3. On Linux this branch is skipped — run the install on a supported non-Linux platform or pre-stage the binary.
  4. Use the hermetic bundled chromium instead of the Edge channel.
Defensive patterns

Strategy: try-catch

Try / catch

try {
  await runInstall(['msedge']);
} catch (e) {
  if (/Cannot install msedge/.test(e.message)) {
    // fall back: install Edge manually or use bundled chromium
  } else throw e;
}

Prevention

When it happens

Trigger: Running 'playwright install msedge' (or msedge-beta/msedge-dev) on macOS or Windows when the Edge updates API does not return a usable artifact for that channel/platform/arch combination — temporary API outage, schema change, or channel not yet published.

Common situations: Edge updates API is temporarily unavailable or returns an unexpected payload; a brand-new or deprecated channel has no artifact published yet; network returned an error page that was parsed as empty JSON.

Related errors


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