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

Failure during cypress verify --smoke-test: code 3221225781 in Windows #4625

Closed
jennifer-shehane opened this issue Jul 1, 2019 · 31 comments
Closed
Labels
cli OS: windows prevent-stale mark an issue so it is ignored by stale[bot] topic: installation Issue during installation or downloading Cypress type: bug

Comments

@jennifer-shehane
Copy link
Member

jennifer-shehane commented Jul 1, 2019

NOTE If the code after running Cypress with DEBUG:cypress* is NOT 3221225781, but you are seeing a similar error - see this issue instead: #4624

Current behavior:

Running cypress open, cypress run or cypress verify results in the error below. Specifically when running with DEBUG:cypress* logs set, the makeError portion prints the code: 3221225781.

cypress verify
...
cypress:cli Smoke test failed: { Error: Command failed: ..\Cypress.exe --smoke-test --ping=259

    at makeError (..cypress\node_modules\execa\index.js:172:9)
    at Promise.all.then.arr (..\cypress\node_modules\execa\index.js:277:16)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
  code: 3221225781,
  stdout: '',
  stderr: '',
  failed: true,
  signal: null,
  cmd: '..Cypress.exe --smoke-test --ping=259',
  timedOut: false,
 ?  Verifying Cypress can run ..\Cypress
   ? Cypress Version: xxx
Cypress failed to start.

This is usually caused by a missing library or dependency.

The error below should indicate which dependency is missing.

https://on.cypress.io/required-dependencies

If you are using Docker, we provide containers with all required dependencies installed.
----------

Command failed: ..\Cypress.exe --smoke-test --ping=259
----------

Platform: xxx
Cypress Version: xxx

previous comments from @brian-mann

It appears there is more information from Electron regarding this here: electron/electron#3570

Electron is exiting with exit code 3221225781

There are a bunch of issues over at Electron's github indicating this. I scanned through them but didn't really see any actionable steps. We really need to be able to reproduce this on our own machines so we can iterate on the problem.

A quick google pulls up a bunch of results here: https://www.google.com/search?q=electron+3221225781&oq=electron+3221225781&aqs=chrome..69i57j69i60l2.1334j0j4&sourceid=chrome&ie=UTF-8

I would suggest any/all of you read through those and try out some of the workarounds there. If any work, please report them back here and we'll see what changes we need to make.

@JohnnyFun
Copy link

JohnnyFun commented Sep 12, 2019

I was running into this. I cleared all cypress cache at: C:\Users\<user>\AppData\Local\cypress. I also re-installed the cypress package: npm uninstall cypress --save-dev followed by npm install cypress --save-dev. Good to go.

@amitguptagwl
Copy link

amitguptagwl commented Sep 20, 2019

I have setup a cypress repo on jenkins machine. We run npm install every time. Every time it fails with following error;

It looks like this is your first time using Cypress: 3.4.1

[?25l[15:46:57]  Verifying Cypress can run /home/username/.cache/Cypress/3.4.1/Cypress [started]
[15:47:29]  Verifying Cypress can run /home/username/.cache/Cypress/3.4.1/Cypress [failed]
[?25hCypress verification timed out.

This command failed with the following output:

/home/username/.cache/Cypress/3.4.1/Cypress/Cypress --smoke-test --ping=236
----------
Command failed: /home/username/.cache/Cypress/3.4.1/Cypress/Cypress --smoke-test --ping=236
----------

If I run the npm install again, it passes.

@vyadh
Copy link

vyadh commented Mar 11, 2020

If you're trying to get this working in a Windows Docker image, something that shows the same error number, then see cypress-io/cypress-docker-images#261 for a possible (if not so great) solution.

@scrumvisualize
Copy link

scrumvisualize commented Aug 13, 2020

I have installed Cypress 4.12.1 version in Windows 10 Home OS. While running the 'cypress open' command from command prompt, below error displays:

C:\Project\work>C:\Project\work\node_modules\.bin\cypress open

image

  • OS : Windows 10 Home, 64 bit operating system
  • RAM: 4 GB
  • Node version: v12.18.3
  • Cypress version: 4.12.1

I have also cleared the cache from AppData\Local\Cypress\Cache and uninstalled the version >> npm uninstall cypress --save-dev , then installed again, but still I am getting the same error. What else should i need to proceed further ?

I have uninstalled the latest version again and switch to older version is 4.11.0, but I am getting the same error.

@MithilaPinagapani
Copy link

MithilaPinagapani commented Aug 27, 2020

having the same cypress verification issue. Tried deleting the cache memory from Appdata and tried installation again but still facing the same error.
1
2
3
4

@scrumvisualize
Copy link

Yes, I have managed to resolved the problem by uninstalling, clearing the cache and then installed the cypress version again.
Steps:
1.First I have installed the latest version.
2.Then the above problem occurred.
3.Uninstalled the latest version by, npm uninstall cypress --save-dev
4.Clear the cache from the AppData\Local\Cypress\Cache
5.Restart my laptop and then installed the latest version again.

@MithilaPinagapani
Copy link

so if we install the latest version it does have the problem for most of the persons who are trying to install? Anyways thanks for the reply an I will try doing the same thing

@scrumvisualize
Copy link

From the github thread I could see some of the people are getting the same error. Not sure about the reason. Give a try, even I have tried 3 or 4 times and installed an old version 4.10.0 as the issue was not solved in first instance.

@MithilaPinagapani
Copy link

I tried doing the installation with the older version, but no use :( still facing the same issue.

@JohnnyFun
Copy link

Fwiw, I'm running these versions and it works great:

  • node: 14.7.0
  • npm: 6.14.4
  • cypress: 5.0.0
  • win10 10.0.19041

You can try blowing away node_modules and C:\Users\<user>\AppData\Local\cypress and re-running npm i with those versions or close to it.

@mannawar
Copy link

mannawar commented Sep 16, 2020

I also faced the same as below:

Cypress.exe --smoke-test --ping=649

----------

Command timed out after 30000 milliseconds:

Workaround- It is due to not installing correctly cypress or maybe broken installation. Simple work around in my case npm install --save-dev cypress

Thanks.

@sharadsamant12
Copy link

sharadsamant12 commented Sep 16, 2020

After an update, the cypress getting an issue while running
Command timed out after 30000 milliseconds:

Workaround after update-

  1. Copy the JSON file from following path AppData\Local\Cypress\Cache(older version folder) and paste in newly created AppData\Local\Cypress\Cache(updated version folder)
  2. Delete the cypress older folder from the Cache
  3. Run the .\node_modules.bin\cypress open command

@bjowes
Copy link
Contributor

bjowes commented Oct 24, 2020

I got this error too when trying to run Cypress in travis CI on a Windows host. Solved it by running npm install cypress again after the npm ci call.
Would it help if a make a small reproducible repo?

@jennifer-shehane jennifer-shehane added topic: installation Issue during installation or downloading Cypress OS: windows labels Nov 3, 2020
@jennifer-shehane
Copy link
Member Author

It seems this only occurs in Windows, from looking at the comments. @bjowes Yes, a reproducible repo would be ideal. Thanks.

@jennifer-shehane jennifer-shehane changed the title Failure during cypress verify --smoke-test: code 3221225781 Failure during cypress verify --smoke-test: code 3221225781 in Windows Nov 3, 2020
@bjowes
Copy link
Contributor

bjowes commented Nov 4, 2020

@jennifer-shehane - please see https://github.com/bjowes/cypress-4625-repro

I run it on Travis-CI to execute Cypress on Windows. The repo is setup for it (.travis.yml file in place).

When putting this together, I noticed that it works fine with 5.5.0, so I worked myself backwards to the first failing version, which is 5.3.0. It fails the smoke test with the specific code of this issue.
There are three branches - main, cypress-5-4-0 and cypress-5-5-0. The main branch fails while the others pass.

The only difference between the branches is the cypress version installed.

Even if this seems to be resolved from 5.4.0, I presume it would still be of interest to find the actual root cause.

@Vi1234sh12
Copy link

Annotation 2021-02-12 142929

anyone can you help for this problem how to fix it or any another method can I fellow

@sharadsamant12
Copy link

Annotation 2021-02-12 142929

anyone can you help for this problem how to fix it or any another method can I fellow

@Vi1234sh12
Hello Vishal,
Copy your "binary_state.json" file from the previous version 6.3.0 and paste it into the 6.4.0 version. Then restart your Cypress application.

@Vi1234sh12
Copy link

Annotation 2021-02-12 142929
anyone can you help for this problem how to fix it or any another method can I fellow

@Vi1234sh12
Hello Vishal,
Copy your "binary_state.json" file from the previous version 6.3.0 and paste it into the 6.4.0 version. Then restart your Cypress application.

How do I find where a file is located ?

@sharadsamant12
Copy link

Annotation 2021-02-12 142929
anyone can you help for this problem how to fix it or any another method can I fellow

@Vi1234sh12
Hello Vishal,
Copy your "binary_state.json" file from the previous version 6.3.0 and paste it into the 6.4.0 version. Then restart your Cypress application.

How do I find where a file is located ?

In your local
Check following path
C:\Users\vishal\AppData\Local\Cypress\Cache\6.3.0

@Vi1234sh12
Copy link

After an update, the cypress getting an issue while running
Command timed out after 30000 milliseconds:

Workaround after update-

  1. Copy the JSON file from following path AppData\Local\Cypress\Cache(older version folder) and paste in newly created AppData\Local\Cypress\Cache(updated version folder)
  2. Delete the cypress older folder from the Cache
  3. Run the .\node_modules.bin\cypress open command

I Follow all this steps but again show me same error

@sharadsamant12
Copy link

After an update, the cypress getting an issue while running
Command timed out after 30000 milliseconds:
Workaround after update-

  1. Copy the JSON file from following path AppData\Local\Cypress\Cache(older version folder) and paste in newly created AppData\Local\Cypress\Cache(updated version folder)
  2. Delete the cypress older folder from the Cache
  3. Run the .\node_modules.bin\cypress open command

I Follow all this steps but again show me same error

did you restart visual studio after update cypress?

@Vi1234sh12
Copy link

Vi1234sh12 commented Feb 12, 2021 via email

@Vi1234sh12
Copy link

Thank you so much @sharadsamant12 for helping me and solve this error. now it's working
Screenshot (558)
Screenshot (559)
Screenshot (560)

@Jarroslav
Copy link

I have had the same issue. Solved it just by commented GUI in .zshrc
screen
After that, the command npx cypress verify has run successfully and I able to run my tests (headless)

@iamghulamnabi
Copy link

iamghulamnabi commented Jun 17, 2021

Hi, I was facing same issue. So I have find a solution for you. It will work for all of you. You also don't need to uninstall anything , Try this one . It is the in last of page.
Clearing Cache by Terminal of it.
Screenshot_23

@jpratt2
Copy link

jpratt2 commented Nov 26, 2021

for me this was the solution:
npm install --save-dev

@NAMU1105
Copy link

I was running into this. I cleared all cypress cache at: C:\Users\<user>\AppData\Local\cypress. I also re-installed the cypress package: npm uninstall cypress --save-dev followed by npm install cypress --save-dev. Good to go.

well, I have nothing on C:\Users\<user>\AppData\Local\cypress.

Anyone face same issue? :(

@JohnnyFun
Copy link

@NAMU1105 did you npm uninstall cypress --save-dev followed by npm install cypress --save-dev?

@NAMU1105
Copy link

NAMU1105 commented Feb 6, 2022

@NAMU1105 did you npm uninstall cypress --save-dev followed by npm install cypress --save-dev?

Yes, I did.
And What I was trying to say was that
I don't have a cypress folder in C:\Users<user>\AppData\Local\ folder.
(Maybe because I'm using WSL2)

Anyway, I cleaned the cache in WSL2.
However, the cypress verification is still not working.

@AlaaDq
Copy link

AlaaDq commented Apr 1, 2022

hello
you can fix the problem by just running the following commands
npm cache clean --force
npm cahce verify

@nagash77 nagash77 added the prevent-stale mark an issue so it is ignored by stale[bot] label Apr 3, 2023
@jennifer-shehane
Copy link
Member Author

Since this issue hasn't had activity in a while, we'll close the issue until we can confirm this is still happening. Please comment if there is new information to provide concerning the original issue and we'd be happy to reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli OS: windows prevent-stale mark an issue so it is ignored by stale[bot] topic: installation Issue during installation or downloading Cypress type: bug
Projects
None yet
Development

No branches or pull requests