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

npm install cypress often fails with download timeout #8392

Closed
bjowes opened this issue Aug 24, 2020 · 12 comments
Closed

npm install cypress often fails with download timeout #8392

bjowes opened this issue Aug 24, 2020 · 12 comments
Labels
topic: installation Issue during installation or downloading Cypress

Comments

@bjowes
Copy link
Contributor

bjowes commented Aug 24, 2020

Current behavior:

´npm install cypress´ often fails with download timeout from our environment.

Desired behavior:

´npm install cypress´ should have a higher default timeout, and possibly an environment variable to set the timeout.

Test code to reproduce

Install cypress on a machine with low bandwidth internet connection.

Versions

Cypress 5.0.0.
Download worked fine with version 4.7.0 (last time we updated) and it seems the size of the zip file has increased a bit since then. We used to have the same problem with older versions of cypress, when the zip files were >200 MB.

Help offered

If the desired behavior is considered something that could improve cypress, I would be happy to provide the PR for it.

@jennifer-shehane
Copy link
Member

Can you provide the full error text that displays when this happens? Would like to see where/what is timing out exactly.

@jennifer-shehane jennifer-shehane added the stage: needs information Not enough info to reproduce the issue label Aug 24, 2020
@bjowes
Copy link
Contributor Author

bjowes commented Aug 24, 2020

Sure, see the log below. I timed it, the download times out after 80 seconds.

c:\Source\Repos\xyz\e2e>npm i cypress@5

> cypress@5.0.0 postinstall c:\Source\Repos\mpa_keps\e2e\node_modules\cypress
> node index.js --exec install

Installing Cypress (version: 5.0.0)

  ×  Downloading Cypress      51% 79s
    → Cypress Version: 5.0.0
     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/5.0.0?platform=win32&arch=x64
Error: read ECONNRESET

----------

Platform: win32 (10.0.17763)
Cypress Version: 5.0.0

@fuleinist
Copy link

This happened to us as well while deploying using GH Action.

A recent one failed due to CHECKSUM failure per below:

.../cypress@5.0.0/node_modules/cypress postinstall: Error: Corrupted download
.../cypress@5.0.0/node_modules/cypress postinstall: Expected downloaded file to have checksum: 935afbc02e98b68a270880726ea2d8db0ec1f598954e4933814ae3a9e146fb6ee56107f7f4a45fd6d22fc472d86eb45332e99d19712f21f21afbacf776ed37c3
.../cypress@5.0.0/node_modules/cypress postinstall: Computed checksum: 9171d19d882656dab2422f43e11ff5612f46ab2aae44446919880a6a736fc12f3839f2f443ffa37c6238d2231dc709992e9cc3adff3abac3c2de71b5b540a1e4
.../cypress@5.0.0/node_modules/cypress postinstall: Expected downloaded file to have size: 203317306
.../cypress@5.0.0/node_modules/cypress postinstall: Computed size: 203317306
.../cypress@5.0.0/node_modules/cypress postinstall: ----------

@bjowes
Copy link
Contributor Author

bjowes commented Sep 3, 2020

Any update on this @jennifer-shehane ?

@bjowes
Copy link
Contributor Author

bjowes commented Sep 3, 2020

Update: Installing 5.1.0 works so far, will need to test it further to see if it is just luck with the bandwidth

@lourenci
Copy link

lourenci commented Sep 3, 2020

This is happening frequently in my CI environment too:

image

@Innokentij
Copy link

Innokentij commented Sep 15, 2020

Update: Installing 5.1.0 works so far, will need to test it further to see if it is just luck with the bandwidth

is not working for me.
I dont need any proxy, just regular installation on
My logs:

PS C:\git\CZ> npm install cypress@5.1.0     
npm WARN deprecated har-validator@5.1.5: this library is no longer supported

> cypress@5.1.0 postinstall C:\git\CZ\node_modules\cypress
> node index.js --exec install

Installing Cypress (version: 5.1.0)

  ×  Downloading Cypress    
    → Cypress Version: 5.1.0
     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/5.1.0?platform=win32&arch=x64
Error: tunneling socket could not be established, cause=connect ETIMEDOUT 172.16.0.11:443

----------

Platform: win32 (10.0.18362)
Cypress Version: 5.1.0
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.12 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.12: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! cypress@5.1.0 postinstall: `node index.js --exec install`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the cypress@5.1.0 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!     C:\Users\\AppData\Roaming\npm-cache\_logs\2020-09-15T09_41_36_036Z-debug.log

@bahmutov bahmutov added the topic: installation Issue during installation or downloading Cypress label Sep 15, 2020
@ryota-murakami
Copy link
Contributor

ryota-murakami commented Nov 26, 2020

This is occurring in my project ci too after upgrade cypress@6.0 from cypress@5.6, there is install log.
https://github.com/laststance/create-react-app-typescript-todo-example-2020/runs/1453253415

wired thing is log says Installing Cypress (version: 5.6.0) despite upgraded to cypress@6.0 already.

@ryota-murakami
Copy link
Contributor

After investigation I figure out cypress@5.6.0 in a yarn.lock.
So I run rm yarn.lock and yarn install to renew yarn.lock, this resolved.

@wachunga
Copy link

wachunga commented Dec 2, 2020

At least some of these issues are likely related to 2 different versions of cypress, which is logged here: #4595

@ryota-murakami
Copy link
Contributor

@wachunga thanks about that information!

@jennifer-shehane
Copy link
Member

Closing since the original issue was resolved.

If you're getting a checksum error: Expected downloaded file to have checksum: you are experiencing this issue. #4595

@jennifer-shehane jennifer-shehane removed the stage: needs information Not enough info to reproduce the issue label Jan 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: installation Issue during installation or downloading Cypress
Projects
None yet
Development

No branches or pull requests

8 participants