Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Fix the driver behind crashes, sound loss and screen glitches3Clear out junk files and repair common Windows errorsSome links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.
Most Playwright .NET browser launch errors come from a missing or mismatched browser installation, absent operating-system dependencies, or differences between your local machine and CI. Build the project, run the generated playwright.ps1 install from the correct target-framework output directory, and check that the install and test processes use the same browser cache. For Linux CI, install system dependencies with --with-deps. If the cause is not obvious, enable DEBUG=pw:browser before changing launch options.
Start with the first error line
Use the first specific message in the exception to choose a fix. Changing ExecutablePath or adding launch flags before identifying the failure can mask an installation problem without resolving it.
| Error or symptom | Likely cause | First action |
|---|---|---|
Executable doesn't exist at … ms-playwright |
The required browser binary is missing, was installed for a different Playwright package version, or is in a different cache directory. | Build the project, rerun the generated install script, and compare PLAYWRIGHT_BROWSERS_PATH in the installation and test environments. |
Host system is missing dependencies to run browsers |
Required operating-system libraries are not installed. | On Linux, run the generated script with install --with-deps, or install dependencies separately. |
| Browser download fails, times out, or reports a certificate error | A proxy, certificate authority, restricted network, or slow connection is interfering with the download. | Check the documented proxy, download-host, certificate, and timeout environment variables. |
| Browser installs but fails to launch in a container | The image may not match the project’s Playwright version, or the selected browser may be incompatible with the image’s system libraries. | Align the image and package versions; avoid Alpine for Playwright Firefox or WebKit images because those builds require glibc. |
| Only installed Chrome or Edge fails | An enterprise browser policy or a version mismatch may block automation. | Try the bundled browser first; use a branded channel only when it is required. |
Reinstall the matching browser
The Playwright .NET package and its browser binaries are a versioned pair. Microsoft states that “Each version of Playwright needs specific versions of browser binaries to operate.” Restoring or building the .NET package does not by itself guarantee that the matching browser is installed. After upgrading Playwright, run the install command again.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstall-
Build the project so the generated Playwright script is available:
#1 Best Overall
dotnet build -
Run the script from the output directory for the project’s target framework. Replace
netXwith the actual framework, for examplenet8.0:pwsh bin/Debug/netX/playwright.ps1 install -
On a Linux CI agent, install the operating-system dependencies as well as the browser:
pwsh bin/Debug/netX/playwright.ps1 install --with-deps -
Inspect which browser revisions are installed, if needed:
PerformancePC Slower Than It Used to Be?DriversCrashes, No Sound, or Screen Glitches?PerformanceWindows Errors? Fix Them Before They SpreadSpecial offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.pwsh bin/Debug/netX/playwright.ps1 install --list
If installation is part of a build, the .NET API can also invoke it with Microsoft.Playwright.Program.Main(new[] { "install" }). Check the returned exit code and fail the build when it is nonzero; otherwise a failed installation can be hidden until a later test run.
Check the browser cache path
Playwright uses a per-user cache by default. A browser installed under one account or path is not necessarily available to the account that runs tests. The documented default locations are:
| Operating system | Default browser cache |
|---|---|
| Windows | %USERPROFILE%AppDataLocalms-playwright |
| macOS | ~/Library/Caches/ms-playwright |
| Linux | ~/.cache/ms-playwright |
If your build or agent uses a shared cache, set PLAYWRIGHT_BROWSERS_PATH to that directory for both installation and test execution. A common failure is setting it only in one step. Also check that the install and test steps run as the same user or have the necessary access to the shared directory.
Browser caching in CI needs care. If you cache browser binaries, include the Playwright package version in the cache key so a package upgrade cannot reuse incompatible revisions. Official guidance says dependency installation is not cacheable on Linux; do not treat a cached directory as a substitute for installing the required system dependencies.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Rank #2
Install Linux dependencies and choose the right display mode
On Linux, browser binaries can exist and still fail at launch when shared libraries are missing. Use install --with-deps on an agent where the install step can install system packages. If your environment separates browser downloads from operating-system provisioning, run the generated script’s dependency-install command:
pwsh bin/Debug/netX/playwright.ps1 install-deps
Headless execution does not require a visible desktop, but headed browser runs on Linux need a display server. In CI, use Xvfb when you need headed mode:
xvfb-run dotnet test
Playwright’s stated .NET system requirements include Windows 11 or Windows Server 2019 and later, macOS 14 and later, and Debian 12/13 or Ubuntu 22.04/24.04/26.04 on x86-64 or arm64. If your runner is outside those listed platforms or versions, do not assume a launch failure has the same remedy as a supported host.
Make CI and containers reproducible
A local success does not prove the CI environment has the same browser revision, libraries, display server, or cache. Record and compare the environment where the failure occurs.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →-
Run
dotnet buildbefore invokingplaywright.ps1. -
On Linux, install dependencies with
--with-deps, unless the image already provisions them in a version-controlled way. -
Use a version-pinned Playwright Docker image, and keep its Playwright version aligned with the project package.
-
Avoid Alpine for Firefox and WebKit images: those browser builds require glibc.
-
Use
xvfb-runfor headed Linux tests that need a display.Recommended: Update Every Outdated Driver on Your PC in One Scan - Free →Recommended: PC Feels Slow? A Free Scan Shows What's Dragging Windows Down →Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy. -
Do not assume package restore installed browser binaries, and do not cache browser files without a version-aware cache key.
For a local-versus-CI comparison, capture the selected browser, Playwright package version, target framework, operating system or container image, browser-cache path, and complete first exception. Differences in any of these can explain why the same test behaves differently.
Turn on browser diagnostics before changing launch code
Enable Playwright’s browser-level logs when the error says the browser failed to launch:
DEBUG=pw:browser dotnet test
Microsoft’s CI documentation specifically recommends pw:browser when debugging “Error: Failed to launch browser” errors. For broader Playwright API logging, use DEBUG=pw:api. These logs can help distinguish a missing executable from a process that starts and then exits.
Recommended Free Tools
In a cross-platform CI configuration, set the environment variable using the syntax appropriate to that shell or job runner. Keep the full exception and relevant logs from the failed run; the first error line plus the browser and environment details is more useful than changing several launch options at once.
Handle download, proxy, certificate, and timeout failures
Playwright downloads browsers from Microsoft’s CDN by default. If a corporate network or slow link interrupts that download, check which condition applies before changing the browser launch configuration:
-
HTTPS_PROXYconfigures a proxy for HTTPS requests when required by the network. -
PLAYWRIGHT_DOWNLOAD_HOSTselects a custom browser download host when your environment requires one.Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy. -
NODE_EXTRA_CA_CERTSsupplies additional certificate authorities for TLS validation in supported download environments. -
PLAYWRIGHT_DOWNLOAD_CONNECTION_TIMEOUTadjusts the browser download connection timeout for slow links.
Set only the variable that matches the observed failure, and make sure it is present in the step that performs installation. A test process cannot launch a browser that a separate installation step failed to download.
Choose a browser engine to isolate the failure
Playwright supports Chromium, Firefox, and WebKit. If only one engine fails, run that engine separately before treating the issue as a general .NET or CI problem. The selected browser can be controlled through BROWSER, runsettings, or dotnet test arguments, depending on how the test project is configured. Record the exact engine used alongside the exception so that an engine-specific problem is not confused with a missing shared dependency.
Free tools Windows power users keep installed
One-click scans. No signup required.
Should you set ExecutablePath or use Chrome and Edge?
Usually, no. Playwright’s BrowserType API warns: “Note that Playwright only works with the bundled Chromium, Firefox or WebKit, use at your own risk.” The bundled browsers are the most controlled choice because Playwright updates supported browser revisions with its releases.
A system Chrome or Edge channel is an option when a test specifically needs that branded browser. It also adds compatibility variables: the installed browser version may differ, and enterprise policies can block automation. An arbitrary executable supplied through ExecutablePath is a last-resort compatibility choice, not a reliable repair for a missing Playwright installation.
| Choice | Compatibility control | Additional risk or maintenance |
|---|---|---|
| Playwright bundled browser | Uses the browser revision expected by the installed Playwright package. | Rerun installation after package upgrades. |
| Branded Chrome or Edge channel | Useful when testing a branded browser is a requirement. | Browser version and enterprise policy can affect automation. |
Arbitrary ExecutablePath |
Allows an explicit executable path. | Playwright does not guarantee compatibility with arbitrary browser versions. |
Or skip the browser setup
If your goal is to capture a website image or PDF rather than run browser automation tests, ScreenshotNeo provides a website screenshot API and MCP server for developers. One GET request returns a PNG, JPEG, WebP, or PDF. For details on request options, see the ScreenshotNeo API documentation.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
Cookie banners, newsletter popups, and chat widgets are removed before capture. Bot checks, blank pages, failed loads, timeouts, and cache hits cost nothing; response headers report the page verdict and whether the request was billed. An MCP server lets AI agents using Claude, Cursor, or another MCP client take screenshots. The free plan includes 1,000 screenshots a month with no card, and paid plans start at $5 for 3,000 screenshots.
Sign up for ScreenshotNeo’s free plan to start with 1,000 screenshots a month and no card required.
Frequently asked questions
Does Playwright package restore install browsers?
No. Restore and build the project, then run its generated playwright.ps1 install command to download the browser binaries required by that package version.
Can I install browsers through code instead of a script?
Yes. You can call Microsoft.Playwright.Program.Main(new[] { "install" }); check its exit code and fail the build if it is nonzero.
Why does only headed Linux execution fail?
A headed Linux browser needs a display server. In CI, run it under Xvfb, for example with xvfb-run dotnet test.
Which browser should I test first when only one engine fails?
Run the failing engine by itself using your project’s BROWSER, runsettings, or dotnet test configuration. Isolating Chromium, Firefox, or WebKit helps establish whether the problem is engine-specific.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

