{"record":{"id":"a773455a838c2865","repo":"microsoft/playwright","slug":"webkit-via-wsl-is-only-supported-on-windows","errorCode":null,"errorMessage":"WebKit via WSL is only supported on Windows","messagePattern":"WebKit via WSL is only supported on Windows","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/playwright-core/src/server/registry/index.ts","lineNumber":749,"sourceCode":"    this._executables.push({\n      name: 'webkit-wsl',\n      browserName: 'webkit',\n      directory: webkit.dir,\n      executablePath: () => wslExecutable,\n      executablePathOrDie: () => {\n        if (!wslExecutable)\n          throw new Error(`webkit-wsl is only supported on Windows`);\n        return wslExecutable;\n      },\n      // WebKit is installed inside the WSL distribution by install_webkit_wsl.ps1.\n      wslExecutablePath: `/home/pwuser/.cache/ms-playwright/webkit-${webkit.revision}/pw_run.sh`,\n      installType: 'download-on-demand',\n      title: 'Webkit in WSL',\n      _validateHostRequirements: (sdkLanguage: string) => Promise.resolve(),\n      _isHermeticInstallation: true,\n      _install: async () => {\n        if (process.platform !== 'win32')\n          throw new Error(`WebKit via WSL is only supported on Windows`);\n        const script = path.join(BIN_PATH, 'install_webkit_wsl.ps1');\n        const { code } = await spawnAsync('powershell.exe', [\n          '-ExecutionPolicy', 'Bypass',\n          '-File', script,\n        ], {\n          stdio: 'inherit',\n        });\n        if (code !== 0)\n          throw new Error(`Failed to install WebKit via WSL`);\n      },\n    });\n\n    const ffmpeg = descriptors.find(d => d.name === 'ffmpeg')!;\n    const ffmpegExecutable = findExecutablePath(ffmpeg.dir, 'ffmpeg');\n    this._executables.push({\n      name: 'ffmpeg',\n      browserName: undefined,\n      directory: ffmpeg.dir,","sourceCodeStart":731,"sourceCodeEnd":767,"githubUrl":"https://github.com/microsoft/playwright/blob/c8fc3bf8d31542d59b4d4d9eaab1df93ff541dc6/packages/playwright-core/src/server/registry/index.ts#L731-L767","documentation":"Thrown by the webkit-wsl executable's _install routine when process.platform is not win32. The installer runs install_webkit_wsl.ps1 via powershell.exe, which only exists on Windows; attempting to run the WSL-based install elsewhere is rejected up front.","triggerScenarios":"Triggering `playwright install webkit-wsl` (or the on-demand download) on macOS or Linux; an install routine that lists all executables including webkit-wsl and tries to install each.","commonSituations":"A cross-platform install script that does not filter webkit-wsl; copying a Windows install workflow to a non-Windows CI runner.","solutions":["On macOS/Linux, install the regular webkit build instead (`npx playwright install webkit`).","Restrict webkit-wsl installation to Windows runners in your matrix.","Filter platform-specific executables out of any 'install everything' routine."],"exampleFix":"# before (runs on all platforms)\nnpx playwright install webkit-wsl\n# after (Windows only)\n# Windows runner:\nnpx playwright install webkit-wsl\n# macOS/Linux runner:\nnpx playwright install webkit","handlingStrategy":"validation","validationCode":"if (executable === 'webkit-wsl' && process.platform !== 'win32')\n  throw new Error('skip webkit-wsl install off Windows');","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Restrict webkit-wsl installation to Windows runners.","Install standard webkit on macOS/Linux instead.","Filter executables by platform before 'install everything' routines."],"tags":["registry","webkit","wsl","install","platform","windows-only"],"backgroundTag":null,"analyzedSha":"c8fc3bf8d31542d59b4d4d9eaab1df93ff541dc6","analyzedAt":"2026-08-12T07:26:36.950Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}