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

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

Closed
tyomasson opened this issue Feb 4, 2020 · 25 comments
Labels
topic: installation Issue during installation or downloading Cypress type: duplicate This issue or pull request already exists

Comments

@tyomasson
Copy link

tyomasson commented Feb 4, 2020

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:

> cypress@3.7.0 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 node-pre-gyp@0.14.0 failed (this is probably har               mless): EPERM: operation not permitted, scandir 'C:\projects\xxx\develop\nod               e_modules\fsevents\node_modules'
npm WARN eslint-config-airbnb@17.1.0 requires a peer of eslint@^4.19.1 || ^5.3.               0 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-loader@2.1.2 requires a peer of eslint@>=1.6.0 <6.0.0 but none                is installed. You must install peer dependencies yourself.
npm WARN eslint-config-airbnb-base@13.2.0 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: fsevents@1.2.11 (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! cypress@3.7.0 postinstall: `node index.js --exec install`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the cypress@3.7.0 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)

@jennifer-shehane
Copy link
Member

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.

@cypress-bot cypress-bot bot added the stage: awaiting response Potential fix was proposed; awaiting response label Feb 4, 2020
@tyomasson
Copy link
Author

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.

@maacaro
Copy link

maacaro commented Feb 20, 2020

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 compriquote@1.0.0: No license field
[1/4] Resolving packages...
warning " > @storybook/react@5.3.13" has unmet peer dependency "babel-loader@^7.0.0 || ^8.0.0".
warning "@storybook/react > @babel/preset-flow@7.8.3" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@storybook/react > @storybook/core@5.3.13" has unmet peer dependency "@babel/core@*".
warning "@storybook/react > @storybook/core@5.3.13" 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!!!

@kylemh
Copy link

kylemh commented Mar 23, 2020

Getting the same thing for Zeit's Now, Netlify, and CircleCI: OperationCode/front-end#1076

Can install locally no problem.

Weird. It seemed to resolve itself today.

@kylemh
Copy link

kylemh commented May 21, 2020

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

@denahardian
Copy link

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

@AskMarvinV
Copy link

Got same issue when downloading the v4.6.

@lgandecki
Copy link

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

@ZwapKillrath
Copy link

ZwapKillrath commented May 29, 2020

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: cypress@4.6.0 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 cypress@4.6.0

@hmmaros
Copy link

hmmaros commented Jun 2, 2020

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

@jakedowns
Copy link

jakedowns commented Jun 19, 2020

I have the same "corruption" issue where the checksum fails, but the filesize matches. #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.

@Lavaei
Copy link

Lavaei commented Jul 28, 2020

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

@jennifer-shehane
Copy link
Member

jennifer-shehane commented Jul 28, 2020

If you're using yarn workspaces and getting some corrupt downloads, it may be this issue #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.

@cypress-bot cypress-bot bot added stage: needs information Not enough info to reproduce the issue and removed stage: awaiting response Potential fix was proposed; awaiting response labels Jul 28, 2020
@kylemh
Copy link

kylemh commented Jul 28, 2020

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.

@moezzie
Copy link

moezzie commented Aug 19, 2020

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.

@tsaiDavid
Copy link
Contributor

tsaiDavid commented Aug 24, 2020

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

@kylemh
Copy link

kylemh commented Aug 24, 2020

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).

@kylemh
Copy link

kylemh commented Sep 2, 2020

@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.

@bahmutov bahmutov added the topic: installation Issue during installation or downloading Cypress label Sep 15, 2020
@chuksgpfr
Copy link

This can be solved using yarn upgrade cypress

This issue should be closed.

PS: I'm on a Mac OS

@jennifer-shehane
Copy link
Member

Closing as duplicate of #4595

@jennifer-shehane jennifer-shehane added type: duplicate This issue or pull request already exists and removed stage: needs information Not enough info to reproduce the issue labels Jan 22, 2021
@eysaif
Copy link

eysaif commented Dec 5, 2022

I'm also getting the same issue

The Cypress App could not be downloaded.

`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.`

@Teebo
Copy link

Teebo commented Dec 29, 2022

I'm also getting the same issue

The Cypress App could not be downloaded.

`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.`

Hi, try the below.

Solution

@bipin-codes
Copy link

It might be too late, but if you are on windows.
Use git bash instead of windows cmd prompt

Download the specific binary using
https://download.cypress.io/desktop/12.17.4

export CYPRESS_INSTALL_BINARY=path_to_downloaded_cypress_zip
npm install cypress@specific_version

Should solve the issue, Thanks!

@eysaif
Copy link

eysaif commented Apr 26, 2024

tried Both same error

@bipin-codes
Copy link

Can you add bit more description and screen shots, of what exaclty you tried?

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 type: duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests