{"record":{"id":"fb8bb824525547ae","repo":"microsoft/playwright","slug":"cannot-install-channel-on-process-platform","errorCode":null,"errorMessage":"Cannot install ${channel} on ${process.platform}","messagePattern":"Cannot install (.+?) on (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/playwright-core/src/server/registry/index.ts","lineNumber":1150,"sourceCode":"    if (process.platform !== 'linux') {\n      const products = lowercaseAllKeys(JSON.parse(await fetchData(undefined, { url: 'https://edgeupdates.microsoft.com/api/products' })));\n\n      const productName = {\n        'msedge': 'Stable',\n        'msedge-beta': 'Beta',\n        'msedge-dev': 'Dev',\n      }[channel];\n      const product = products.find((product: any) => product.product === productName);\n      const searchConfig = ({\n        darwin: { platform: 'MacOS', arch: 'universal', artifact: 'pkg' },\n        win32: { platform: 'Windows', arch: 'x64', artifact: 'msi' },\n      } as any)[process.platform];\n      const release = searchConfig ? product.releases.find((release: any) => release.platform === searchConfig.platform && release.architecture === searchConfig.arch && release.artifacts.length > 0) : null;\n      const artifact = release ? release.artifacts.find((artifact: any) => artifact.artifactname === searchConfig.artifact) : null;\n      if (artifact)\n        scriptArgs.push(artifact.location /* url */);\n      else\n        throw new Error(`Cannot install ${channel} on ${process.platform}`);\n    }\n    await this._installChromiumChannel(channel, scripts, scriptArgs);\n  }\n\n  private async _installChromiumChannel(channel: string, scripts: Record<'linux' | 'darwin' | 'win32', string>, scriptArgs: string[] = []) {\n    const scriptName = scripts[process.platform as 'linux' | 'darwin' | 'win32'];\n    if (!scriptName)\n      throw new Error(`Cannot install ${channel} on ${process.platform}`);\n    const cwd = BIN_PATH;\n    const isPowerShell = scriptName.endsWith('.ps1');\n    if (isPowerShell) {\n      const args = [\n        '-ExecutionPolicy', 'Bypass', '-File',\n        path.join(BIN_PATH, scriptName),\n        ...scriptArgs\n      ];\n      const { code } = await spawnAsync('powershell.exe', args, { cwd, stdio: 'inherit' });\n      if (code !== 0)","sourceCodeStart":1132,"sourceCodeEnd":1168,"githubUrl":"https://github.com/microsoft/playwright/blob/c8fc3bf8d31542d59b4d4d9eaab1df93ff541dc6/packages/playwright-core/src/server/registry/index.ts#L1132-L1168","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Retry the install after a short wait — the API outage is often transient.","Install Microsoft Edge manually from the official site, then launch with channel 'msedge' (Playwright will detect the system install).","On Linux this branch is skipped — run the install on a supported non-Linux platform or pre-stage the binary.","Use the hermetic bundled chromium instead of the Edge channel."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  await runInstall(['msedge']);\n} catch (e) {\n  if (/Cannot install msedge/.test(e.message)) {\n    // fall back: install Edge manually or use bundled chromium\n  } else throw e;\n}","preventionTips":["Install Microsoft Edge manually from the official site as a reliable alternative.","Retry transient Edge updates API failures after a short delay.","Prefer the bundled chromium channel in CI to avoid the external API dependency."],"tags":["msedge","install","platform","network","edge-updates-api"],"backgroundTag":null,"analyzedSha":"c8fc3bf8d31542d59b4d4d9eaab1df93ff541dc6","analyzedAt":"2026-08-12T07:26:36.950Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}