From 461bd92f12fc968a8df03535e238ca40861505d4 Mon Sep 17 00:00:00 2001 From: Max Schmitt Date: Wed, 29 Jun 2022 13:49:22 +0200 Subject: [PATCH] docs(browsers): add note about 'self signed certificate in certificate chain' Error (#15221) --- docs/src/browsers.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/src/browsers.md b/docs/src/browsers.md index 65115e0730..6ee49e71e5 100644 --- a/docs/src/browsers.md +++ b/docs/src/browsers.md @@ -405,6 +405,20 @@ $env:HTTPS_PROXY="https://192.0.2.1" pwsh bin\Debug\netX\playwright.ps1 install ``` +If the requests of the proxy get intercepted with a custom untrusted certificate authority (CA) and it yields to `Error: self signed certificate in certificate chain` while downloading the browsers, you must set your custom root certificates via the [`NODE_EXTRA_CA_CERTS`](https://nodejs.org/api/cli.html#node_extra_ca_certsfile) environment variable before installing the browsers: + +```bash tab=bash-bash +export NODE_EXTRA_CA_CERTS="/path/to/cert.pem" +``` + +```batch tab=bash-batch +set NODE_EXTRA_CA_CERTS="C:\certs\root.crt" +``` + +```powershell tab=bash-powershell +$env:NODE_EXTRA_CA_CERTS="C:\certs\root.crt" +``` + ## Download from artifact repository By default, Playwright downloads browsers from Microsoft CDN.