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

Win32-Arm64 Is not supported. #30252

Open
KimPlaybit opened this issue Sep 18, 2024 · 15 comments
Open

Win32-Arm64 Is not supported. #30252

KimPlaybit opened this issue Sep 18, 2024 · 15 comments
Labels
OS: windows stage: needs information Not enough info to reproduce the issue

Comments

@KimPlaybit
Copy link

KimPlaybit commented Sep 18, 2024

What would you like?

Run a web application with Cypress on a computer with Win32-Arm64 OS.

Why is this needed?

With Asus recently releasing laptops with Qualcomm CPUs, this will be more and more requested.
See The Asus Vivobook S 15.

Other

I managed to start my Web app with cypress regardless.

By adding in win32-arm64 as a valid OS in install.js and then hardcode so that "getUrl" in download.js returns "https://download.cypress.io/desktop/13.13.3?platform=win32&arch=x64". What side-effects this has is unknow.

@MikeMcC399
Copy link
Contributor

@KimPlaybit

Are you using Windows 11 24H2?

@jennifer-shehane jennifer-shehane added stage: needs information Not enough info to reproduce the issue OS: windows labels Sep 18, 2024
@KimPlaybit
Copy link
Author

KimPlaybit commented Sep 19, 2024

@KimPlaybit

Are you using Windows 11 24H2?

Yes, i am.

but i dont know if this matters?
since the problem is that "validateOS" does not support "win32-arm64" and there is no download link for windows with an ARM CPU. I am using a windows Laptop with a Qualcomm Snapdragon(R) X Elite CPU.

@MikeMcC399
Copy link
Contributor

@KimPlaybit

Thanks for providing the details of your environment!

Cypress is built for win32-x64 only.

According to https://learn.microsoft.com/en-us/windows/arm/overview the emulation changed in Windows 11 24H2, so that is relevant.

@KimPlaybit
Copy link
Author

KimPlaybit commented Sep 19, 2024

@KimPlaybit

Thanks for providing the details of your environment!

Cypress is built for win32-x64 only.

According to https://learn.microsoft.com/en-us/windows/arm/overview the emulation changed in Windows 11 24H2, so that is relevant.

Alright, but this also states that with Windows 11 24H2 supports emulation of x64 apps. wouldnt that put cypress in that category?

Thus, when i enforced that https://download.cypress.io/desktop/13.13.3?platform=win32&arch=x64 would be downloaded is not wrong. other than that side-effects might happen.

--
Tho, Prism is specificly optimized and tuned for snapdragon.

@MikeMcC399
Copy link
Contributor

@KimPlaybit

I can't be of much help here as I don't have access to the hardware you're using.

Have you installed Node.js Windows arm64 or Node.js Windows x64? Reading the Node.js docs it seems like the x64 version of Node.js might give you a better experience, however I can't really say as I can't test this.

@KimPlaybit
Copy link
Author

KimPlaybit commented Sep 19, 2024

@KimPlaybit

I can't be of much help here as I don't have access to the hardware you're using.

Have you installed Node.js Windows arm64 or Node.js Windows x64? Reading the Node.js docs it seems like the x64 version of Node.js might give you a better experience, however I can't really say as I can't test this.

At the current moment i havnt found any issues yet. I am running Node.js Windows ARM64.
If you like, i can report any issues i find.

i found this, https://learn.microsoft.com/en-us/windows/arm/arm64ec. Which suggests that Windows 11 ARM has been supporting x64 emulation for a while and that Windows 11 24h2 added "Prism", which is an optimization for Snapdragon.

windows 10 ARM however, do not support x64 emulation, might cause problems.

__

i believe i added this as a feature request. but maybe i should point that out.

@MikeMcC399
Copy link
Contributor

@KimPlaybit

i believe i added this as a feature request. but maybe i should point that out.

I understood it that way. The Cypress.io team may add a label accordingly.

In terms of using the emulation, it may simply be a question of testing and documentation.

Building Cypress for Windows arm64 would however be a major enhancement to the process and the documentation.
https://www.arm.com/developer-hub/laptops-and-desktops

@KimPlaybit
Copy link
Author

KimPlaybit commented Sep 19, 2024

@KimPlaybit

i believe i added this as a feature request. but maybe i should point that out.

I understood it that way. The Cypress.io team may add a label accordingly.

In terms of using the emulation, it may simply be a question of testing and documentation.

Building Cypress for Windows arm64 would however be a major enhancement to the process and the documentation. https://www.arm.com/developer-hub/laptops-and-desktops

Building it for Windows arm64 would be great. But to add the label to run cypress with the emulator might be a good start tho.

@alexsch01
Copy link
Contributor

alexsch01 commented Sep 19, 2024

For the time being, I wonder if the Cypress team can redirect https://download.cypress.io/desktop/13.13.3?platform=win32&arch=arm64 to the win32-x64 version

@MikeMcC399
Copy link
Contributor

MikeMcC399 commented Sep 20, 2024

With the disclaimer that running Cypress on Windows arm64 is unsupported, undocumented and untested:

  1. Try Node.js Windows x64, as the documentation os.arch() says:

Returns the operating system CPU architecture for which the Node.js binary was compiled. Possible values are 'arm', 'arm64', 'ia32', 'loong64', 'mips', 'mipsel', 'ppc', 'ppc64', 'riscv64', 's390', 's390x', and 'x64'.

  1. I don't think that making the CDN server deliver x64 when arm64 has been requested is a good thing to start doing. Use Advanced Installation, for instance in a Windows PowerShell terminal, and try the following to provide a workaround on the client-side:
$env:CYPRESS_DOWNLOAD_PATH_TEMPLATE='${endpoint}/win32-x64/cypress.zip'
$env:DEBUG='cypress:cli*'
npm install cypress --save-dev --ignore-scripts
npx cypress install --force

followed by

npx cypress verify
npx cypress open

to confirm.

Instead of install cypress, install cypress@latest or install cypress@<version> like install [email protected] will also be accepted.

@saschanaz
Copy link

saschanaz commented Sep 30, 2024

Not sure that's feasible if cypress is installed through dev-dependencies. Some overriding method like an env variable CYPRESS_ARCH=x64 would be nice. Okay, actually the core problem is, as briefly mentioned by OP, install.js outright bans win32-arm64 via validateOS(). Once there's a way to skip that, the download path template should work.

@MikeMcC399
Copy link
Contributor

MikeMcC399 commented Oct 7, 2024

A possible way forward would be to patch Cypress locally to allow downloading and installing a Cypress win32-x64 binary on win32-arm64 so that it could run in emulation mode. The Cypress documentation instructions on References > Troubleshooting > Patch Cypress describe how to add a patch to the installation process.

It would be good to have win32-arm64 runners available to test in CI, for instance to be able to test the https://github.com/cypress-io/cypress-example-kitchensink repo on Windows on Arm (WoA).

There is some work going on to provide such runners, however it seems that win32-arm64 runners are not yet generally available as free runners hosted on GitHub or on CircleCI.

GitHub Actions

CircleCI

@jennifer-shehane
Copy link
Member

You could use patch-package to update your Cypress for now to bypass the OS validation for now. That's our recommendation.

@Hig4tower
Copy link

I have a new Surface laptop with snapdragon CPU and i try to setup my angular packages via "npm i" with the same result as mentioned above:

npm error command failed npm error command C:\Windows\system32\cmd.exe /d /s /c node index.js --exec install npm error The Cypress App could not be installed. Your machine does not meet the operating system requirements. npm error npm error https://on.cypress.io/guides/getting-started/installing-cypress#system-requirements npm error npm error ---------- npm error npm error Platform: win32-arm64 (10.0.26100) npm error Cypress Version: 13.16.0

I have tried node.js for x64 and arm aswell as forcing the installation without resolving the issue.
Is there anything new upcoming to have ARM support?

I cant deal with patch-package since its a restricted angular project.

@AdnanVanni
Copy link

Solution for Cypress Installation Issue on Windows 11 (Surface Laptop)
If you're facing issues installing Cypress on your Surface Laptop running Windows 11, particularly with ARM architecture, you can resolve this by manually downloading and setting up Cypress. Follow these steps:

Steps to Resolve the Issue
Download the Cypress ZIP File:

Go to the Cypress Continuous Integration Documentation and download the appropriate Cypress version ZIP file (e.g., 13.17.0).
Extract the ZIP File:

After downloading, extract the contents of the ZIP file to a folder on your PC.
Move the Extracted Folder:

Move the extracted Cypress folder to the following directory on your PC:

C:\Users{username}\AppData\Local\Cypress\Cache\13.17.0
Make sure to replace {username} with your actual Windows username.

Run Cypress Commands:

You should now be able to execute the following Cypress commands:
To open the Cypress UI:

npx cypress open
To run tests in headless mode:

npx cypress run
By moving the extracted Cypress folder to the correct directory, Cypress will function properly, avoiding the installation issues commonly seen with ARM-based systems like Windows 11 Surface Laptops.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OS: windows stage: needs information Not enough info to reproduce the issue
Projects
None yet
Development

No branches or pull requests

7 participants