CircleCI :: Cypress Binary Download Fails
See original GitHub issueCurrent behavior:
Cypress fails to download the binary when running yarn install
on CircleCI:
yarn install v1.15.2
warning package.json: No license field
warning No license field
[1/5] Validating package.json...
warning No license field
[2/5] Resolving packages...
[3/5] Fetching packages...
info fsevents@1.2.9: The platform "linux" is incompatible with this module.
info "fsevents@1.2.9" is an optional dependency and failed compatibility check. Excluding it from installation.
[4/5] Linking dependencies...
warning " > @cypress/code-coverage@1.4.0" has unmet peer dependency "nyc@*".
warning " > @cypress/code-coverage@1.4.0" has unmet peer dependency "istanbul-lib-coverage@*".
[5/5] Building fresh packages...
error /workspace/core-products/Divi/core/node_modules/cypress: Command failed.
Exit code: 1
Command: node index.js --exec install
Arguments:
Directory: /workspace/core-products/Divi/core/node_modules/cypress
Output:
Installing Cypress (version: 3.4.0)
[03:33:58] Downloading Cypress [started]
[03:33:59] Downloading Cypress [failed]
The Cypress App could not be downloaded.
Please check network connectivity and try again:
----------
URL: https://download.cypress.io/desktop/3.4.0?platform=linux&arch=x64
Error: Corrupted download
Expected downloaded file to have checksum: 92ead24d077815fc02b8a42fba398cd9136f79fc8b6f2a07fe3f7137b365087b34039397bcda195b62db3da3e98643bf9647519e96b46eecfb243ca198d0d0c2
Computed checksum: b8f24b6c391bb66b2636764630145cf976139ec3208b795051fca3957c5ef932c4047257d6d271df1302a8c2d0eec800640beb60bceecfaabd951850d717f894
Expected downloaded file to have size: 141130568
Computed size: 148305408
----------
Platform: linux (Ubuntu Linux - 18.04)
Cypress Version: 3.4.0
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Steps to reproduce: (app code and test code)
- Run
yarn install
on CircleCI
Versions
Cypress 3.4.0
Issue Analytics
- State:
- Created 4 years ago
- Reactions:9
- Comments:13 (2 by maintainers)
Top Results From Across the Web
cypress-io/cypress - CircleCI Developer Hub
Runs all Cypress tests without recording results on the Dashboard. Installs dependencies with "npm ci", caches NPM modules and Cypress binary. 1 ...
Read more >Advanced Installation | Cypress Documentation
CYPRESS_INSTALL_BINARY, Destination of Cypress binary that's downloaded and installed ; CYPRESS_DOWNLOAD_MIRROR, Downloads the Cypress binary through a mirror ...
Read more >How to resolve "The cypress npm package is installed, but the ...
cache/Cypress - You ran 'npm install' at an earlier build step but did not persist: /root/.cache/Cypress Properly caching the binary will fix ...
Read more >cypress-io/cypress - Gitter
Properly caching the binary will fix this error and avoid downloading and unzipping Cypress. Alternatively, you can run 'cypress install' to download the ......
Read more >Debugging Pipeline Issues With Cypress - Marie Cruz
The issue that I encountered was about a missing Cypress binary. To give you a background of our build pipeline, we have a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Here is how I resolved my
Error: Corrupted download
issue on CircleCI:Following some suggestions here, I checked to see what versions of
cypress
I was dependent on usingyarn why cypress
. This showed that I indeed had 2 different versions. I then added the following to mypackage.json
to pick the version I wantedWhen I re-ran
yarn why cypress
I saw only 1 version. The build then passed.Hope this helps others who come across this issue!
@lots0logs, perhaps this is a bug in the Cypress code, however, I think the cause of the issue stems a bit from the use of
yarn
for package management. I think I’ve resolved the issue and here’s what I did:yarn.lock
file in my project and observed that I had several entries forcypress
and they pointed to different versions.cypress
as a subdependency ended up resolving to the same version of cypress (in my case 3.4.1).Outcome
I now have a single entry for
cypress
in myyarn.lock
file which resolves to the version of cypress that I’ve specified in mypackage.json
file (3.4.1 for me). Here’s what this looks like. I hope this helps: