Skip to content

chore: fix pre-release download for win32-arm64 #31836

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

Merged

Conversation

MikeMcC399
Copy link
Contributor

@MikeMcC399 MikeMcC399 commented Jun 6, 2025

Additional details

Attempting to install the Cypress binary from the pre-release npm package

https://cdn.cypress.io/beta/npm/14.5.0/win32-x64/develop-ec252f8601d9cec4543085667c7e03ecdab8e82f/cypress.tgz

on the GitHub runner

windows-11-arm

fails with

cypress:cli URL: https://cdn.cypress.io/beta/binary/14.5.0/win32-arm64/develop-ec252f8601d9cec4543085667c7e03ecdab8e82f/cypress.zip
    Error: Failed downloading the Cypress binary.
Response code: 404
Response message: Not Found

Cypress does not build for win32-arm64 and so there is no such binary available.

This PR changes the URL selection for pre-releases of Cypress running on win32-arm64 to download the corresponding win32-x64 Cypress binary instead.

Steps to test

After this PR is merged, install the generated pre-release package into:

https://github.com/MikeMcC399/cypress-example-kitchensink/tree/use/windows-11-arm-beta

Review the results of workflow:

https://github.com/MikeMcC399/cypress-example-kitchensink/actions/workflows/chrome.yml

How has the user experience changed?

Users will be able to follow the Cypress documentation instructions Install pre-release version successfully also on Windows Arm-based PCs.

PR Tasks

cc: @AtofStryker

@cypress-app-bot
Copy link
Collaborator

@MikeMcC399
Copy link
Contributor Author

@AtofStryker

Since it's not possible to test this before merging, I did at least test a manual patch in

https://github.com/MikeMcC399/cypress-example-kitchensink/tree/use/windows-11-arm-beta-patched

with the successful result in

https://github.com/MikeMcC399/cypress-example-kitchensink/actions/runs/15472230351

Logs

Run npx cypress install
2025-06-05T16:25:13.[7](https://github.com/MikeMcC399/cypress-example-kitchensink/actions/runs/15472230351/job/43559291540#step:6:8)50Z cypress:cli:cli cli starts with arguments ["C:\\hostedtoolcache\\windows\\node\\22.14.0\\arm64\\node.exe","C:\\a\\cypress-example-kitchensink\\cypress-example-kitchensink\\node_modules\\cypress\\bin\\cypress","install"]
2025-06-05T16:25:13.751Z cypress:cli NODE_OPTIONS is not set
2025-06-05T16:25:13.751Z cypress:cli:cli program parsing arguments
2025-06-05T16:25:14.241Z cypress:cli parsed cli options {}
2025-06-05T16:25:14.241Z cypress:cli installing with options {}
2025-06-05T16:25:14.242Z cypress:cli Using CYPRESS_CACHE_FOLDER from environment variable
2025-06-05T16:25:14.242Z cypress:cli Using CYPRESS_CACHE_FOLDER from environment variable
Note: Overriding Cypress cache directory to: $HOME/.cache/Cypress

      Previous installs of Cypress may not be found.

2025-06-05T16:25:14.244Z cypress:cli detecting arch { osPlatform: 'win32', osArch: 'arm64' }
⚠ Warning: You are installing a pre-release build of Cypress.

Bugs may be present which do not exist in production builds.

This build was created from:
  * Commit SHA: ec252f[8](https://github.com/MikeMcC399/cypress-example-kitchensink/actions/runs/15472230351/job/43559291540#step:6:9)601d9cec4543085667c7e03ecdab8e82f
  * Commit Branch: develop
  * Commit Timestamp: 2025-06-05T13:56:28.000Z
2025-06-05T16:25:14.245Z cypress:cli detected platform win32 architecture arm64 combination

2025-06-05T16:25:14.245Z cypress:cli overriding to download win32-x64 pre-release binary instead
2025-06-05T16:25:14.245Z cypress:cli version in package.json is 14.5.0, version to install is https://cdn.cypress.io/beta/binary/14.5.0/win32-x64/develop-ec252f8601d[9](https://github.com/MikeMcC399/cypress-example-kitchensink/actions/runs/15472230351/job/43559291540#step:6:10)cec4543085667c7e03ecdab8e82f/cypress.zip
2025-06-05T16:25:14.246Z cypress:cli Using CYPRESS_CACHE_FOLDER from environment variable
2025-06-05T16:25:14.246Z cypress:cli Using CYPRESS_CACHE_FOLDER from environment variable
2025-06-05T16:25:14.246Z cypress:cli using environment variable CYPRESS_CACHE_FOLDER $HOME/.cache/Cypress
2025-06-05T16:25:14.246Z cypress:cli Using CYPRESS_CACHE_FOLDER from environment variable
2025-06-05T16:25:14.246Z cypress:cli Using CYPRESS_CACHE_FOLDER from environment variable
2025-06-05T16:25:14.246Z cypress:cli using environment variable CYPRESS_CACHE_FOLDER $HOME/.cache/Cypress
2025-06-05T16:25:14.246Z cypress:cli Using CYPRESS_CACHE_FOLDER from environment variable
2025-06-05T16:25:14.246Z cypress:cli Using CYPRESS_CACHE_FOLDER from environment variable
2025-06-05T16:25:14.246Z cypress:cli using environment variable CYPRESS_CACHE_FOLDER $HOME/.cache/Cypress
2025-06-05T16:25:14.252Z cypress:cli Reading binary package.json from: C:\a\cypress-example-kitchensink\cypress-example-kitchensink\$HOME\.cache\Cypress\beta-14.5.0-develop-ec252f86\Cypress\resources\app\package.json
2025-06-05T16:25:14.253Z cypress:cli no binary installed under cli version
2025-06-05T16:25:14.253Z cypress:cli checking local file C:\a\https:\cdn.cypress.io\beta\binary\14.5.0\win32-x64\develop-ec252f8601d9cec4543085667c7e03ecdab8e82f\cypress.zip cwd C:\a\cypress-example-kitchensink\cypress-example-kitchensink
2025-06-05T16:25:14.253Z cypress:cli preparing to download and unzip version  https://cdn.cypress.io/beta/binary/14.5.0/win32-x64/develop-ec252f8601d9cec4543085667c7e03ecdab8e82f/cypress.zip to path C:\a\cypress-example-kitchensink\cypress-example-kitchensink\$HOME\.cache\Cypress\beta-14.5.0-develop-ec252f86
Installing Cypress (version: https://cdn.cypress.io/beta/binary/14.5.0/win32-x64/develop-ec252f8601d9cec4543085667c7e03ecdab8e82f/cypress.zip)

[STARTED] Task without title.
2025-06-05T16:25:14.258Z cypress:cli version is already an url https://cdn.cypress.io/beta/binary/14.5.0/win32-x64/develop-ec252f8601d9cec4543085667c7e03ecdab8e82f/cypress.zip
2025-06-05T16:25:14.258Z cypress:cli needed Cypress version: https://cdn.cypress.io/beta/binary/14.5.0/win32-x64/develop-ec252f8601d9cec4543085667c7e03ecdab8e82f/cypress.zip
2025-06-05T16:25:14.258Z cypress:cli source url https://cdn.cypress.io/beta/binary/14.5.0/win32-x64/develop-ec252f8601d9cec4543085667c7e03ecdab8e82f/cypress.zip
2025-06-05T16:25:14.258Z cypress:cli downloading cypress.zip to "C:\Users\RUNNER~1\AppData\Local\Temp\cypress-2384.zip"
2025-06-05T16:25:14.260Z cypress:cli Downloading package {
  url: 'https://cdn.cypress.io/beta/binary/14.5.0/win32-x64/develop-ec252f8601d9cec4543085667c7e03ecdab8e82f/cypress.zip',
  proxy: null,
  downloadDestination: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\cypress-2384.zip'
}
2025-06-05T16:25:14.694Z cypress:cli expected checksum 34416c518724d3a285329823d212e9cda2006f0ba15fbfebd7aa2868f750aed6b312d7[10](https://github.com/MikeMcC399/cypress-example-kitchensink/actions/runs/15472230351/job/43559291540#step:6:11)846b7aeb56df97e82859c2f0d91d17bed4c4c6438357bf8e9ea86ddb
2025-06-05T16:25:14.694Z cypress:cli expected file size 209186069
2025-06-05T16:25:19.219Z cypress:cli downloading finished
2025-06-05T16:25:19.220Z cypress:cli verifying checksum and file size
2025-06-05T16:25:19.931Z cypress:cli downloaded file has the expected checksum and size ✅
2025-06-05T16:25:19.932Z cypress:cli verified
2025-06-05T16:25:19.932Z cypress:cli finished downloading file: C:\Users\RUNNER~1\AppData\Local\Temp\cypress-2384.zip
[SUCCESS] Task without title.
[STARTED] Task without title.
2025-06-05T16:25:19.935Z cypress:cli:unzip unzipping from C:\Users\RUNNER~1\AppData\Local\Temp\cypress-2384.zip
2025-06-05T16:25:19.935Z cypress:cli:unzip into C:\a\cypress-example-kitchensink\cypress-example-kitchensink\$HOME\.cache\Cypress\beta-14.5.0-develop-ec252f86
2025-06-05T16:25:19.940Z cypress:cli:unzip zipFile entries count 26279
2025-06-05T16:25:19.941Z cypress:cli:unzip unzipping with node.js (slow)
2025-06-05T16:25:19.942Z cypress:cli:unzip calling Node extract tool C:\Users\RUNNER~1\AppData\Local\Temp\cypress-2384.zip { dir: 'C:\\a\\cypress-example-kitchensink\\cypress-example-kitchensink\\$HOME\\.cache\\Cypress\\beta-14.5.0-develop-ec252f86', onEntry: [Function: tick] }
2025-06-05T16:26:[11](https://github.com/MikeMcC399/cypress-example-kitchensink/actions/runs/15472230351/job/43559291540#step:6:12).987Z cypress:cli:unzip node unzip finished
2025-06-05T16:26:11.989Z cypress:cli:unzip unzip completed { yauzlMs: 5, unzipMs: 52048 }
[SUCCESS] Task without title.
[STARTED] Task without title.
2025-06-05T16:26:11.990Z cypress:cli removing zip file C:\Users\RUNNER~1\AppData\Local\Temp\cypress-2384.zip
2025-06-05T16:26:[12](https://github.com/MikeMcC399/cypress-example-kitchensink/actions/runs/15472230351/job/43559291540#step:6:13).013Z cypress:cli finished installation in C:\a\cypress-example-kitchensink\cypress-example-kitchensink\$HOME\.cache\Cypress\beta-14.5.0-develop-ec252f86
[SUCCESS] Task without title.

You can now open Cypress by running one of the following, depending on your package manager:

- npx cypress open
- yarn cypress open
- pnpm cypress open

https://on.cypress.io/opening-the-app

@jennifer-shehane
Copy link
Member

@MikeMcC399 Yah, we're aware that it's not that testable ahead of time, but figure the worst that can happen is that it still doesn't work. :/

@MikeMcC399
Copy link
Contributor Author

@jennifer-shehane

Yah, we're aware that it's not that testable ahead of time, but figure the worst that can happen is that it still doesn't work. :/

Thanks for your optimism! The worst that can happen here is that the PR screws up downloading all pre-release software. Plan B would be to revert it, if it causes a catastrophic failure. (I'm not really expecting that to be necessary!)

At the moment I've been seeing also corrupt download messages for the pre-release package. It seems to be sporadic:

npm warn tarball tarball data for cypress@https://cdn.cypress.io/beta/npm/14.5.0/win32-x64/develop-ec252f8601d9cec4543085667c7e03ecdab8e82f/cypress.tgz (sha512-NbsyKOBy+XedwuTn0z8HUBhRo6uiSfUFK7+fO68tdC16Fa1QtGy/fbMey6K8YQUDyRa2UtVJhYFBsStrlPabXQ==) seems to be corrupted. Trying again.

Same for the latest pre-release based on 76eb083. The first time I tried it, I got a checksum error and the second time it worked. Don't quite know what's going on there!

Copy link
Contributor

@AtofStryker AtofStryker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MikeMcC399 is it possible to add a unit test for this here?

@MikeMcC399

This comment was marked as resolved.

@MikeMcC399
Copy link
Contributor Author

MikeMcC399 commented Jun 6, 2025

@AtofStryker

Unit test is added and is passing

https://app.circleci.com/pipelines/github/cypress-io/cypress/71291/workflows/1e9d30e2-51f6-42d0-b475-61e439a1bb43/jobs/2928263

-----------------------------------------------------------------------------------------------------
/lib/tasks/install / ._getBinaryUrlFromBuildInfo / overrides win32-arm64 to win32-x64 for pre-release
-----------------------------------------------------------------------------------------------------
      ✓ overrides win32-arm64 to win32-x64 for pre-release

@AtofStryker AtofStryker merged commit 4450d3b into cypress-io:develop Jun 6, 2025
70 of 72 checks passed
Copy link
Contributor

@AtofStryker AtofStryker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thought I approved this beforehand before hitting the merge button. Either way everything looked good and approved on my end

@MikeMcC399 MikeMcC399 deleted the issue-31831-win32-arm-pre-release branch June 6, 2025 18:48
@MikeMcC399
Copy link
Contributor Author

Successfully tested with

npm install https://cdn.cypress.io/beta/npm/14.5.0/win32-x64/develop-4450d3be74d72f61169a117bbc0bffef8d1d58fa/cypress.tgz

in

https://github.com/MikeMcC399/cypress-example-kitchensink/tree/use/windows-11-arm-beta

with environment:

  • Cypress pre-release 14.5.0 4450d3b
  • Chrome 133.0.6943.127
  • GitHub Actions runner windows-11-arm
  • Windows 11 Enterprise 10.0.22631 (23H2)
  • CPU "Cobalt 100"
  • Architecture arm64

and workflow log on:

https://github.com/MikeMcC399/cypress-example-kitchensink/actions/runs/15506415439/job/43661850087

Logs

2025-06-07T09:17:22.140Z cypress:cli detecting arch { osPlatform: 'win32', osArch: 'arm64' }
⚠ Warning: You are installing a pre-release build of Cypress.

Bugs may be present which do not exist in production builds.

This build was created from:
  * Commit SHA: 4450d3be74d72f61169a117bbc0bffef8d1d58fa
  * Commit Branch: develop
  * Commit Timestamp: 2025-06-06T18:25:31.000Z

2025-06-07T09:17:22.141Z cypress:cli detected platform win32 architecture arm64 combination
2025-06-07T09:17:22.141Z cypress:cli overriding to download win32-x64 pre-release binary instead
2025-06-07T09:17:22.141Z cypress:cli version in package.json is 14.5.0, version to install is https://cdn.cypress.io/beta/binary/14.5.0/win32-x64/develop-4450d3be74d72f61169a117bbc0bffef8d1d58fa/cypress.zip

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

Successfully merging this pull request may close these issues.

404 error attempting pre-release binary install on Windows ARM
4 participants