Skip to content
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

Can't upgrade to v3.0.2: "Error: unable to verify the first certificate" #2097

Closed
4z5lz opened this issue Jul 4, 2018 · 11 comments
Closed

Comments

@4z5lz
Copy link

4z5lz commented Jul 4, 2018

Current behavior:

Can't upgrade to v3.0.2

Desired behavior:

Want to upgrade to v3.0.2 :)

Steps to reproduce:

npm install --save-dev [email protected]

Receive:

> node index.js --exec install

 ×  Downloading Cypress
   → Cypress Version: 3.0.2
    Unzipping Cypress
    Finishing Installation
The Cypress App could not be downloaded.

Please check network connectivity and try again:
----------

URL: https://download.cypress.io/desktop/3.0.2?platform=win32&arch=x64
Error: unable to verify the first certificate
----------

Platform: win32 (6.1.7601)
Cypress Version: 3.0.2
- @types/[email protected] node_modules\cypress\node_modules\@types\minimatch
- [email protected] node_modules\cypress\node_modules\assert-plus
- [email protected] node_modules\cypress\node_modules\aws-sign2
- [email protected] node_modules\cypress\node_modules\cachedir
- [email protected] node_modules\cypress\node_modules\form-data
- [email protected] node_modules\cypress\node_modules\har-schema
- [email protected] node_modules\cypress\node_modules\http-signature
- [email protected] node_modules\cypress\node_modules\json-stable-stringify
- [email protected] node_modules\cypress\node_modules\ajv
- [email protected] node_modules\cypress\node_modules\har-validator
- [email protected] node_modules\cypress\node_modules\performance-now
- [email protected] node_modules\hoek
- [email protected] node_modules\boom
- [email protected] node_modules\cryptiles
- [email protected] node_modules\sntp
- [email protected] node_modules\hawk
- [email protected] node_modules\stringstream
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN enoent ENOENT: no such file or directory, open 'D:\git\project\node_modules\log-symbols\package.json'
npm WARN enoent ENOENT: no such file or directory, open 'D:\git\project\node_modules\listr\package.json'
npm WARN enoent ENOENT: no such file or directory, open 'D:\git\project\node_modules\request\package.json'
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "--save-dev" "[email protected]"
npm ERR! node v6.9.0
npm ERR! npm  v3.10.8
npm ERR! code ELIFECYCLE

npm ERR! [email protected] postinstall: `node index.js --exec install`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script 'node index.js --exec install'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the cypress package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node index.js --exec install
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs cypress
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls cypress
npm ERR! There is likely additional logging output above.

Versions

Windows 7 64b
node: v6.9.0
npm: v3.10.8
current Cypress: v3.0.1

@brian-mann
Copy link
Member

Are you behind any kind of proxy or firewall?

This is an SSL Cert error from node, but our certs are just fine and we've had a great many downloads today already ;-)

Maybe just try again? Or change your node version perhaps? Do you know of any kind of system settings that may muck with your network configuration? Have you had any issues downloading Cypress before?

@brian-mann brian-mann added the stage: awaiting response Potential fix was proposed; awaiting response label Jul 4, 2018
@4z5lz
Copy link
Author

4z5lz commented Jul 5, 2018

Yes, I'm behind the corporate firewall, but I not had any issue with installation of Cypress 3.0.1 before.

@cLupus
Copy link

cLupus commented Jul 6, 2018

I have the same error.
While I've tried setting NODE_EXTRA_CA_CERTS to the bundled corporate certificate bundle (which includes Mozilla's), setting an alias for node to node --use-openssl-ca, and setting npm config set cafile $PATH_TO_CORPERATE_CA_BUNDLE
Neither of which worked out.

@brian-mann
Copy link
Member

You likely just need to set HTTP_PROXY=whatever npm install or set it up in your .npmrc file.

Read this comment here for workarounds when installing Cypress: #1469

I looked at our documentation and expected this to be there but was surprised not to find it. You likely just need to set HTTP_PROXY or HTTPS_PROXY environment variables when doing the npm install.

@cLupus
Copy link

cLupus commented Jul 16, 2018

PS: For my part, HTTP(S)?_PROXY is set (exported).
I've managed to work around the issue on my work computer, however, such a workaround is not really an option in our CI/CD pipeline.
The said environment variable have also been set (globally) in our CI/CD pipeline, but we still get the certificate error.

edit: I've also tried with HTTP_PROXY=<proxy.example.com:port> nam install, but that didn't work either.

@jennifer-shehane
Copy link
Member

We made a lot of improvements to proxy support recently. Can you try updating to 3.3.1 and update this issue if it is fixed/not fixed please? Thanks.

@ghost
Copy link

ghost commented Jun 11, 2019

Unfortunately still not working.

×  Downloading Cypress
   → Cypress Version: 3.3.1
    Unzipping Cypress
    Finishing Installation
The Cypress App could not be downloaded.

Please check network connectivity and try again:

----------

URL: https://download.cypress.io/desktop/3.3.1?platform=win32&arch=x64
Error: unable to verify the first certificate

@ghost
Copy link

ghost commented Jun 11, 2019

I was able to resolve the situation by following the instructions on Proxy Configuration

Specifically I had to: set HTTP_PROXY=http://my-company-proxy.com in my Windows Command Prompt before I did my npm install

@jennifer-shehane
Copy link
Member

Closing as resolved. Please comment if you are still having this issue and we will consider reopening.

@jennifer-shehane jennifer-shehane removed the stage: awaiting response Potential fix was proposed; awaiting response label Jul 11, 2019
@visjag
Copy link

visjag commented Jan 30, 2020

Hi,
I am getting following issue, while installing cypress 3.8.3

[email protected] postinstall C:\dev\cy_npm\node_modules\cypress
node index.js --exec install

Installing Cypress (version: 3.8.3)

× Downloading Cypress
→ Cypress Version: 3.8.3
Unzipping Cypress
Finishing Installation
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/3.8.3?platform=win32&arch=x64
Error: unable to verify the first certificate


Platform: win32 (10.0.17763)
Cypress Version: 3.8.3
npm WARN rollback Rolling back [email protected] failed (this is probably harmless): EPERM: operation not permitted, lstat 'C:\dev\cy_npm\node_modules\listr-verbose-renderer\node_modules'
npm WARN enoent ENOENT: no such file or directory, open 'C:\dev\cy_npm\package.json'
npm WARN cy_npm No description
npm WARN cy_npm No repository field.
npm WARN cy_npm No README data
npm WARN cy_npm No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: node index.js --exec install
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! 2020-01-30T15_49_54_548Z-debug.log

I have already set my environment variale
ie HTTP_PROXY, HTTPS_PROXY and NO_PROXY

As well as I tried with http= run cypress. but it didn't work

Please can you guide

@shankarnarayanb
Copy link

@visjag try using

export NODE_TLS_REJECT_UNAUTHORIZED=0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants