Cypress: The Cypress App could not be downloaded (Can't install via NPM I on WINDOWS 2012)

Created on 4 Feb 2020  Â·  19Comments  Â·  Source: cypress-io/cypress

Current behavior:

Can't install any Cypress version.

I do not use a proxy, I can also download the required version via the browser and console.


STR:
When I make:

npm install cypress --save-dev

I get:

URL: https://download.cypress.io/desktop/3.7.0?platform=win32&arch=x64
Error: read ECONNRESET

Desired behavior:

The installation of the module should be successful.

Test code to reproduce

Log:

> [email protected] postinstall C:\projects\xxx\develop\node_modules\cypress
> node index.js --exec install

Installing Cypress (version: 3.7.0)

[09:45:47]  Downloading Cypress     [started]
[09:45:48]  Downloading Cypress     [failed]
[09:45:48] → The Cypress App could not be downloaded.

Does your workplace require a proxy to be used to access the Internet? If so, y               ou must configure the HTTP_PROXY environment variable before downloading Cypres               s. Read more: https://on.cypress.io/proxy-configuration

Otherwise, please check network connectivity and try again:

----------

URL: https://download.cypress.io/desktop/3.7.0?platform=win32&arch=x64
Error: read ECONNRESET

----------

Platform: win32 (6.3.9600)
Cypress Version: 3.7.0
The Cypress App could not be downloaded.

Does your workplace require a proxy to be used to access the Internet? If so, y               ou must configure the HTTP_PROXY environment variable before downloading Cypres               s. Read more: https://on.cypress.io/proxy-configuration

Otherwise, please check network connectivity and try again:

----------

URL: https://download.cypress.io/desktop/3.7.0?platform=win32&arch=x64
Error: read ECONNRESET

----------

Platform: win32 (6.3.9600)
Cypress Version: 3.7.0
npm WARN rollback Rolling back [email protected] failed (this is probably har               mless): EPERM: operation not permitted, scandir 'C:\projects\xxx\develop\nod               e_modules\fsevents\node_modules'
npm WARN [email protected] requires a peer of eslint@^4.19.1 || ^5.3.               0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of eslint@>=1.6.0 <6.0.0 but none                is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of eslint@^4.19.1 ||                ^5.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\f               sevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents               @1.2.11: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x6               4"})

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 lo               gging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2020-02-04T               07_45_59_543Z-debug.log

Versions


Cypress 3.7.0

Operating System: Windows Server 2012 R2 Standard 64-bit (6.3, Build 9600) (9600.winblue_ltsb_escrow.191014-1700)

needs information installation

Most helpful comment

I always come back to this issue and find that it's always the fact there are two instances in the lockfile. I fix it by forcing the correct version via the "resolutions" field in package.json.

All 19 comments

Does your workplace require a proxy to be used to access the Internet? Or are you behind a firewall that may prohibit your network? Please follow the guidelines in Proxy Configuration if so.

Also I see an EPERM: operation not permitted error in here. Make sure you have the proper permissions where you are installing Cypress.

My workplace doesn't require proxy and I can download cypress.zip via console.
I'm turned off firewall now and I have no result.

I know about warning EPERM it's not related to cypress, this is regular behaviour for rudiment dependencies.

I got the same error on the azure pipeline but with yarn and I was able to workaround.
log:

yarn install v1.21.1
warning package.json: No license field
warning [email protected]: No license field
[1/4] Resolving packages...
warning " > @storybook/[email protected]" has unmet peer dependency "babel-loader@^7.0.0 || ^8.0.0".
warning "@storybook/react > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@storybook/react > @storybook/[email protected]" has unmet peer dependency "@babel/core@*".
warning "@storybook/react > @storybook/[email protected]" has unmet peer dependency "babel-loader@^7.0.0 || ^8.0.0".
[4/4] Building fresh packages...
error /home/vsts/work/1/s/node_modules/cypress: Command failed.
Exit code: 1
Command: node index.js --exec install
Arguments: 
Directory: /home/vsts/work/1/s/node_modules/cypress
Output:
Installing Cypress (version: 3.7.0)

25l[12:56:22]  Downloading Cypress     [started]
[12:56:25]  Downloading Cypress     [failed]
25hThe 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.7.0?platform=linux&arch=x64
Error: Corrupted download

Expected downloaded file to have checksum: 426bc17a99e0d7fb9e254f055b7f4c81ba6f1315731248706e2c4748bd10346670d09186cfc76ce452b7f287c8c92789b30a25788d11a1bfa9313b3b944be6bf
Computed checksum: 91f12188e5c6074928f8fa659668d5e1bbd13ab353d0a6b8405310836694f02b08c8431119e45a59d2f4ff814fe243d74a5d256b6f009fa7f12b4ac1412fa640

Expected downloaded file to have size: 161801618
Computed size: 161801618

----------

Platform: linux (Ubuntu Linux - 16.04)
Cypress Version: 3.7.0
25h
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

workaround

I remove from my package.json @testing-library/cypress.
I refactored my tests.
I delete the node_modules folder rm -rf node_modules
I run yarn install
and It works!!!

Getting the same thing for Zeit's Now, Netlify, and CircleCI: https://github.com/OperationCode/front-end/pull/1076

Can install locally no problem.

Weird. It seemed to resolve itself today.

Getting this again today for 4.6.0. It seems like binaries get corrupted on some sort of random, self-resolving basis.

same issue, i can't downloading via npm or yarn stuck on 6% and im tried download for spesific version still same hmm, then im trying download another depedency working fine. and my network is good hmm.

image

Got same issue when downloading the v4.6.

not windows, but
Happening to me now with 4.6.0 and 4.4.1 on github actions :(
https://github.com/xolvio/webpack-federation-storybook-design-systems-demo/runs/709635556?check_suite_focus=true
https://github.com/xolvio/webpack-federation-storybook-design-systems-demo/runs/709620205?check_suite_focus=true

URL: https://download.cypress.io/desktop/4.6.0?platform=linux&arch=x64
Error: Corrupted download

Expected downloaded file to have checksum: f7c7fcf0cd721a077d40ded1bff3d0e237eff9062ba755b532e2b856fad335d1384331cebf0d0f7926721c86682ffaff064edf8281b81257338881f36a991e88
Computed checksum: bcdd289d4f120420223a8d7f69f5ab88d925516fc560894dea3a876980e363367b5473d9cc1775814655f754e4514f10b112fbae5a0472681306cb5467ae9e5a

Expected downloaded file to have size: 172463186
Computed size: 172463186
URL: https://download.cypress.io/desktop/4.4.1?platform=linux&arch=x64
Error: Corrupted download

Expected downloaded file to have checksum: 96726a09c3023254f0fa0b37458187a8792cbb03567100f029c2edde6bb51d6ca307cb658fecedbecb9ab376dc7fb294394c13ff655b0ed6b9f489a71192cde0
Computed checksum: c3a5a37e1b3020c612badb9f38be1facc8c0d5074f172a6669135f5dc5d60a1d1a8029f12b3dbae1ecdc2877b6c9a09b3a92ff8b0e87a57fcc96b326772086ea

Expected downloaded file to have size: 171207794
Computed size: 171702596

----------

Platform: linux (Debian - 9.11)
Cypress Version: 4.4.1

v.4.6.0 also gives me the headache regarding the same error
Tried deleting node_modules, clear cache etc.
still the same

1370 verbose stack Error: [email protected] postinstall: `node index.js --exec install`
1370 verbose stack Exit status 1
1370 verbose stack     at EventEmitter.<anonymous> (C:\Users\adminlufq\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
1370 verbose stack     at EventEmitter.emit (events.js:311:20)
1370 verbose stack     at ChildProcess.<anonymous> (C:\Users\adminlufq\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
1370 verbose stack     at ChildProcess.emit (events.js:311:20)
1370 verbose stack     at maybeClose (internal/child_process.js:1021:16)
1370 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
1371 verbose pkgid [email protected]

Im getting the same error for 4.7.0 version even though the proxy is configured.

I have the same "corruption" issue where the checksum fails, but the filesize matches. https://github.com/cypress-io/cypress/issues/7761

For no reason at all, after trying to go back to 3.8.3, and then re-downloading 4.8.0, it worked. amazing. Lost about 8+ hours to this.

I get this error always when 99% of packaged download successfully!
The only thing I've changed recently is npm.

If you're using yarn workspaces and getting some corrupt downloads, it may be this issue https://github.com/cypress-io/cypress/issues/6789.

The original issue opened did not involve a corrupted download however, but it seems like most of the comments are referencing corrupted download issues.

I always come back to this issue and find that it's always the fact there are two instances in the lockfile. I fix it by forcing the correct version via the "resolutions" field in package.json.

Thanks @kylemh
This fixed the issue for me.
In my case i had @vue/cli-plugin-e2e-cypress (which has Cypress as a dependency) and a separate entry for Cypress in my package.json.

I would have guessed that npm/yarn would figure a out a good way to satisfy the requirements with just one version of Cypress, but i could see, like you said, there were two entries for different versions in the lockfile.

I always come back to this issue and find that it's always the fact there are two instances in the lockfile. I fix it by matching the resolutions field.

Thanks @kylemh - that worked for me as well. We were having issues with our build on CircleCi

cc @dmi3y

If you see where the conflicting dependency is coming from, I urge y'all to go to those packages and open an issue asking that Cypress be listed as a _peerDependency_ (or devDependency if they've simply made a mistake).

@jennifer-shehane based on emoji reacts and my own personal experience, I feel like this issue can be closed if there were a better error during installation. Something to indicate that the dev likely has multiple instances listed in their lockfile.

This can be solved using yarn upgrade cypress

This issue should be closed.

PS: I'm on a Mac OS

Was this page helpful?
0 / 5 - 0 ratings