The browser doesn't trust the TLS certificate of the site under test. Common with self-signed certificates on local, staging, and preview environments.
Published
Why this happens
The test environment uses a self-signed certificate or one issued by an internal company CA
A local HTTPS dev server (mkcert, Vite's basic-ssl plugin, etc.) uses a CA installed on your machine but not in the CI runner or the Playwright browser
A corporate proxy intercepts TLS traffic and re-signs it with its own certificate
How to fix it
For test environments you control, set `ignoreHTTPSErrors: true` in the `use` block of playwright.config.ts
Scope it to the non-production projects only, so a genuinely broken certificate on production still fails loudly
Better long term: give staging a real certificate (e.g. Let's Encrypt) so tests don't need the bypass at all