Playwright "Download failed: server returned code 403" in CI
playwright install tried to fetch a browser archive from the CDN and the server answered 403 Forbidden. In CI this is almost always a proxy, firewall, or mirror that blocks or rejects the download host, not a bug in Playwright.
What this error means
The install step fails with "Downloading Chromium ... Download failed: server returned code 403" and stops before any test runs. Public installs work locally but not behind the CI network.
Downloading Chromium 124.0.6367.29 (playwright build v1140) from
https://playwright.azureedge.net/builds/chromium/1140/chromium-linux.zip
Error: Download failed: server returned code 403. URL:
https://playwright.azureedge.net/builds/chromium/1140/chromium-linux.zipCommon causes
A proxy or firewall blocks the download host
The CI egress proxy denies the Playwright CDN, returning 403 for the browser archive request.
A misconfigured or expiring internal mirror
A PLAYWRIGHT_DOWNLOAD_HOST mirror requires auth or serves a stale path, so the request is forbidden.
How to fix it
Route the download through the allowed proxy or mirror
Point Playwright at an approved download host, or set the proxy so the CDN is reachable.
env:
PLAYWRIGHT_DOWNLOAD_HOST: https://mirror.internal.example.com/playwright
HTTPS_PROXY: http://proxy.internal.example.com:8080Allowlist the CDN host and retry
- Add the Playwright CDN host to the egress allowlist.
- If a mirror is required, confirm the browser build path exists on it.
- Re-run install; a transient 403 from a flaky proxy may clear on retry.
How to prevent it
- Allowlist the Playwright download host (or an internal mirror) in CI egress rules.
- Cache the browsers directory so a blocked download is not on the critical path every run.
- Set
PLAYWRIGHT_DOWNLOAD_HOSTto a maintained mirror in locked-down networks.