Closed surfmuggle closed 1 year ago
Have you seen this guide which is about installing browsers when using proxies?
-> I'd try to set the NODE_EXTRA_CA_CERTS
env var. Maybe your default Node already sets this somehow, maybe via a global npmrc or something like that and our Node inside the .NET package does not consider this option.
I tried the follwing
cmd.exe
i started the cert-manager gui by typing Certmgr.msc
trustworthy root certificates
and opened the subfolder Certificates
C:\Users\Public\CertOfOurCompany\One-CA-ROOT-10.cer
set NODE_EXTRA_CA_CERTS="C:\Users\Public\CertOfOurCompany\One-CA-ROOT-10.cer"
in the docs is said to use set NODE_EXTRA_CA_CERTS="C:\certs\root.crt"
but to my knowledege the files *.crt
and *.cer
are of the same type.C:\dev\playwright\PlayNet\PlaywrightTests>pwsh bin/Debug/net7.0/playwright.ps1 install
and got this error:Warning: Ignoring extra certs from `"C:\Users\Public\CertOfOurCompany\One-CA-ROOT-10.cer"`,
load failed: error:8000007B:system library::Unknown error
Looks like the file path is double quoted: https://github.com/nodejs/node/blob/2e0152ccf1a895962991ae3512a941454e68ac71/src/crypto/crypto_context.cc#L1374
Try to remove the double quotes or set the env var via PowerShell:
$Env:NODE_EXTRA_CA_CERTS="C:\Users\Public\CertOfOurCompany\One-CA-ROOT-10.cer"
Since this is unlikely an issue with Playwright and more like a configuration issue of your system to make Node.js (which Playwright uses under the hood) work with the custom proxies, we unfortunately cannot assist on that. If you have any findings, I recommend posting them into this issue, so future users who encounter this could use it as a reference to workaround / fix this issue.
Thanks for your understanding.
Your question
The installation for JavaScript did work. But for dotnet it failed.
Installation for dotnet gives these steps for
NUnit
dotnet new nunit -n PlaywrightTests
andcd PlaywrightTests
- this worked ๐dotnet add package Microsoft.Playwright.NUnit
- this worked ๐dotnet build
- this worked ๐Build succeeded. 0 Warning(s) 0 Error(s)
pwsh bin/Debug/net7.0/playwright.ps1 install
- this failed ๐Error Screen
Error Message
Question and Possible causes
I am behind a corporate proxy.
What else have i tried?
The Installation for JavaSript works