-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: unable to get local issuer certificate #1352
Comments
We do not issue our own CA store.
|
Yeah, it might be your own network proxy that acts like man in the middle while downloading from external sources (at least that's my understanding from reading reports about such issues here nodejs/help#979) |
@bahmutov - I do believe something like that is going on. When I dump my npm config I have this setup:
|
Yes it's because corporate proxies usually encrypts the traffic using a self-signed certificate. See #1401 for more details. |
Since this issue hasn't had activity in a while, we'll close the issue until we can confirm this is still happening. Please comment if there is new information to provide concerning the original issue and we'd be happy to reopen. |
npm install cypress is failing, I am using windows 10 64 bit and our company uses zscaler ,Can someone help ? The Cypress App could not be downloaded. Does your workplace require a proxy to be used to access the Internet? If so, you must configure the HTTP_PROXY environment variable before downloading Cypress. Read more: https://on.cypress.io/proxy-configuration Otherwise, please check network connectivity and try again: URL: https://download.cypress.io/desktop/7.7.0?platform=win32&arch=x64 Platform: win32 (10.0.18363) |
If you run into this problem due to corp firewall rules and are using WSL, you can do this to work around. Change the version as needed.
|
Hi @chauhansumit12, Currently I am working with "CYPRESS_INSTALL_BINARY" but for ci/cd this feels like a messy crutch. Because running e2e tests in a pipeline is most important, we discuss to switch to testcafe... Best regards. |
helloworld121 you can install your own certificate for cdn.cypress.io like this abstraction from part of a bash script I wrote.
|
Hi @pjobson, I installed custom certificates using "update-ca-certificates". And installing npm packages works fine.
I have no idea why this is a problem. |
This stackoverflow answer may be better for you than my other answer. I'm not sure how NPM manages certificates, maybe it doesn't use the OS's. Good luck! |
Be careful when using options like |
Okay, so I think I figured it out for myself. I am behind a corporate firewall and need to set custom ca certificates. Based on this function when cypress downloads itself it attempts to use the npm ca or cafile settings from To address the issue I had to run these two lines: export npm_config_cafile=/etc/pki/tls/certs/ca-bundle.crt
export CYPRESS_DOWNLOAD_USE_CA=1 This sets the bash environment variables which will be read correctly by cypress' postInstall. So even if you run node doesn't provide a builtin package to get the settings inside of itself by default, but a user named kevva seems to have created a package to get settings the same way npm does. It was forked and is now more recently maintained by the pnpm project here though. If cypress would like to use it, it works like this after you install it: It seems like this kind of problem comes up a lot: Good luck everyone. |
I am getting this error despite having certs installed.
As you can see, I both register the certs with npm and set the environment variable. It cleared up all other cert problems beside this one. And I am not behind a corporate firewall. Please reopen. |
Issue
When installing cypress via node on a restrictive network at a large corp, I receive the following error:
Accessing the link directly works. Also I can WGET and Curl the link without issue.
I tried setting
NODE_TLS_REJECT_UNAUTHORIZED=0
but that didn't seem to resolve the issue. My corporate security team asked:The text was updated successfully, but these errors were encountered: