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

Cypress 13.6.0+ Hanging During Run #28459

Closed
hrapulya opened this issue Dec 5, 2023 · 22 comments
Closed

Cypress 13.6.0+ Hanging During Run #28459

hrapulya opened this issue Dec 5, 2023 · 22 comments

Comments

@hrapulya
Copy link

hrapulya commented Dec 5, 2023

Current behavior

While running test through Cypress App
npx cypress open
the specs execution is hanging without any error and need to stop it and re-run it again, spinner is rolling:
Screenshot 2023-12-05 at 13 51 12

Note: there was no changes in this spec and it was running ok with Cypress 12

Chrome:
Version 119.0.6045.199

Desired behavior

No response

Test code to reproduce

no response

Cypress Version

13.6.0

Node version

v18.17.0

Operating System

macOS 14.1.2 Sonoma, Apple M2

Debug Logs

No response

Other

No response

@hrapulya
Copy link
Author

hrapulya commented Dec 5, 2023

Seems the issue happens in Chrome Browser, as Electron works as expected

@ItsWasteD
Copy link

I think I had almost the same issue. It worked with cypress 13.5.1 and when I upgraded to 13.6.0 some specs stopped working on Edge. With Chrome the still work as expected. For me it was within cy.stub() that it startet "hanging" not sure what the issue is tho.

It showed me that the test was still running and the spinning wheel as in the screenshot could be seen. But in the cypress runner there was no "active step" still executing.

@jennifer-shehane
Copy link
Member

@hrapulya @ItsWasteD There's an issue open with 13.6.0 hanging when you pull focus away from the window. Let me know if this is what is happening in your case... We haven't been able to reproduce it though, so it would be really really helpful to provide a way to reproduce it. #28392

@jennifer-shehane jennifer-shehane added stage: needs information Not enough info to reproduce the issue v13.6.0 🐛 labels Dec 5, 2023
@ItsWasteD
Copy link

Hmm for me it doesnt seem to have to do with the window focus. Or let me be more specific I could reproduce the same behaviour with pulling away the focus but for me the problem also occurs even with window focus. I'm trying to stub a confirm() inside an iframe. That also seems to work but after all the steps inside the test are finished it still shows that the test is running a step. And I only have this problem with Edge, in Chrome everything works as expected.
Pasted image 20231206135538
Sadly I cant provide a reproducible example. I tried to create a page with an iframe that has a button with a confirm() inside but there the tests worked normally.

@JarekSuchocki
Copy link

JarekSuchocki commented Dec 6, 2023

@hrapulya @ItsWasteD There's an issue open with 13.6.0 hanging when you pull focus away from the window. Let me know if this is what is happening in your case... We haven't been able to reproduce it though, so it would be really really helpful to provide a way to reproduce it. #28392

@jennifer-shehane We have exact same thing. Only in Chrome browser, when you get out of cypress runner window it hangs without any errors.

@Ollisteka
Copy link

Ollisteka commented Dec 8, 2023

Cypress 10.10.0 and 13.6.0 cypress run also hang on Chrome 120. It was working fine on Chrome 119

image
image

@kdp88
Copy link

kdp88 commented Dec 8, 2023

I am seeing the same behavior in jenkins

| Cypress:  13.5.1
│Browser: Chrome 120 (headless)
│Node Version:   v18.19.0 (/usr/bin/node)

i am running DEBUG=cypress* npx cypress run and seeing a lot of

CreatePlatformSocket() failed: Address family not supported by protocol (97)

would this indicate chrome crashing ?

@psibean
Copy link

psibean commented Dec 13, 2023

I've been able to reproduce this locally 99% of the time on 13.6.0 and 13.6.1, it isn't the same as the focus issue, as I also experienced that problem separately from this one.

Happens on both MacOS 14.1.2 and 14.2. M1

Cypress 13.6.0 and 13.6.1 both presented this issue for me.

I tried all of the following and various combinations there of:

cypress cache clear
cypress install
/Users/abignell/Library/Caches/Cypress/13.6.0/Cypress.app --smoke-test --ping=101
rm -rf node_modules
yarn install
cypress cache path # and clearing

As well as clearing the App Data under Developer Tools > View App Data.

Nothing works. There's an extremely small chance doing all of the above will allow me to run one test, but then the focus bug happens and prevents the test from running, and then re-running the test puts it back where it doesn't run at all.

The smoke test didn't show any errors or warnings, while starting Cypress and Chrome, no warnings or errors, even with ELECTRON_ENABLE_LOGGING set to true, everything was fine, but Cypress would hang indefinitely and not even start the spec execution.

I reverted back to the last known working version we had, 13.3.3 and it worked right away.

I then updated to 13.5.1 and it also worked immediately.

Updating back to 13.6.0, the issue presented itself straight away, going back to 13.5.1 works.

So something in 13.6.0 has caused this problem.

Edit: So far 13.5.1 has been one of the better experiences I've had had since migrating from v10 to v12 and then v13

Edit: I should also note I am running in an arm64 context. When running Chrome via cypress and checking the version, it shows it is definitely the arm64 version of the browser.

@droca
Copy link

droca commented Dec 15, 2023

My team and me are experiencing the same issues mentioned above on cypress 13.6.X, MacOS ventura 13.6.3.
Downgrading to 13.5.1 did the trick for now.

@jennifer-shehane jennifer-shehane changed the title Cypress 13 Hanging During Run Cypress 13.6.0+ Hanging During Run Jan 4, 2024
@jennifer-shehane
Copy link
Member

We're still looking for a way to reproduce this hanging, seperate from the focus hang issue if anyone can provide a reproducible example.

@psibean
Copy link

psibean commented Jan 12, 2024

We're still looking for a way to reproduce this hanging, seperate from the focus hang issue if anyone can provide a reproducible example.

I think "reproducible" will be difficult, however I am able to reproduce this 100% of the time on my work mac and project. Is there anything I can do or provide that would be helpful? Is there a way I can run Cypress itself in debug mode from within node_modules, I suppose I could hook into it via the vscode debugger. Would there be any areas in particular that I should put breakpoints? In the terminal output, it seems to make some spec specific requests (like to the cypress server, not as part of my test), and then just hangs.

If you point me to the code that starts a spec run when the "re-run" button is pressed from the command pane, I can debug this and provide more insight. I'm just not familiar with the Cypress codebase itself.

@ItsWasteD
Copy link

For me its the same thing as @psibean I can't really provide a reproducible example because we are testing applications that we develop inside another very big webapplication (a document management system) that is developed by a third party. I couldn't find a way to reproduce it outside of this application. If there is another way I can help I will try.

@waterkamp
Copy link

waterkamp commented Jan 18, 2024

Hi all,

I just started with Cypress Component Testing v13.6.3.

  1. I have a simple HelloWorld Component Test. (only cy.mount(HelloWorldComponent); )
  2. I start Cypress Component Testing in Watch (Headed) mode with Chrome v120
  3. It hangs at cy.mount(HelloWorldComponent) -> no errors anywhere!
  4. I stop the tests manually
  5. Run it again and - it works!
  6. When I do a change within the Component and the watcher kicks in I have the same hanger at cy.mount() again.

I have no problems to run the HelloWorldComponent test with:

  • Edge v120
  • Electron v114

Hope this helps a little bit.

Would be nice to find a solution to fix it to be able to run the test with Chrome.

@ariep
Copy link

ariep commented Feb 8, 2024

Our project seems to experience this problem as well: we run cypress tests in a docker container as part of our CI pipeline. With 13.5, our tests succeed. Any attempt to upgrade cypress to 13.6 results in one particular test hanging (page load timeout).

This is an open source project, but the pipeline outputs are not publicly visible. The project structure is complex so it would not be particularly easy to extract an independent reproducing example, but if this would help a cypress maintainer to pinpoint this bug I can attempt to do so.

@psibean
Copy link

psibean commented Feb 8, 2024

Our project seems to experience this problem as well: we run cypress tests in a docker container as part of our CI pipeline. With 13.5, our tests succeed. Any attempt to upgrade cypress to 13.6 results in one particular test hanging (page load timeout).

Just to check here, your spec actually runs, and then the page load hits a timeout, or?

This issue pertains to a spec not even starting, it hangs on the "Your tests are loading..." and never progresses. Screenshot attached.

image

Lets say I have a spec file named "example.tests.ts", the last output in the Cypress terminal is this:

GET /__cypress/tests?p=cypress/integration/path/to/spec/file/example.tests.ts 200 3794.367 ms - -

@jennifer-shehane where is this request made in the Cypress code? With this information I could debug the problem and provide more insight.

@ItsWasteD
Copy link

Our project seems to experience this problem as well: we run cypress tests in a docker container as part of our CI pipeline. With 13.5, our tests succeed. Any attempt to upgrade cypress to 13.6 results in one particular test hanging (page load timeout).

Just to check here, your spec actually runs, and then the page load hits a timeout, or?

This issue pertains to a spec not even starting, it hangs on the "Your tests are loading..." and never progresses. Screenshot attached.

image

Lets say I have a spec file named "example.tests.ts", the last output in the Cypress terminal is this:

GET /__cypress/tests?p=cypress/integration/path/to/spec/file/example.tests.ts 200 3794.367 ms - -

Thats not what happens for me. My first comment in this Issue resembles what happens to me. Suddenly the test doesn't continue even tho there wasn't an error or anything. Also it doesn't show the currently running command inside the test.

@psibean
Copy link

psibean commented Feb 8, 2024

Thats not what happens for me. My first comment in this Issue resembles what happens to me. Suddenly the test doesn't continue even tho there wasn't an error or anything. Also it doesn't show the currently running command inside the test.

And ah yeah, my bad. It's hard to tell from the OP as their screenshot doesn't show whether or not the test was running. But the title does say "during run", so maybe I've got the wrong issue. 👍🏻

@jennifer-shehane
Copy link
Member

Could you all try to update to 13.6.6 and let us know if you're still experiencing this issue? We fixed an issue in 13.6.5 with some hanging situations that were introduced in 13.6.0 and we want to understand if this has also resolved this issue. Thank you!

@jennifer-shehane jennifer-shehane added stage: awaiting response Potential fix was proposed; awaiting response and removed stage: needs information Not enough info to reproduce the issue labels Feb 26, 2024
@ItsWasteD
Copy link

@jennifer-shehane I updated to 13.6.6 and all the tests I tried worked fine. I will update you if there are any problems but for now at least for me that issue seems solved.

@droca
Copy link

droca commented Feb 27, 2024

I got a laptop upgrade from an intel processor one to an apple silicon m2 one and I cannot reproduce the issue that I was experiencing before.
In this new m2 macbook, running Sonoma 1.4.3.1, running cypress 13.6.4 and 13.6.6 worked perfectly and I couldn't reproduce the issue.

Could it be that the issue is focused on older, intel processor macbooks?

@jennifer-shehane
Copy link
Member

Going to close this as resolved and monitor any more comments left here.

@jennifer-shehane jennifer-shehane removed the stage: awaiting response Potential fix was proposed; awaiting response label Feb 27, 2024
@psibean
Copy link

psibean commented May 21, 2024

I've since bumped up to 13.9.0, and so far things seem fine in regards to the hanging / freezing experience I was having with 13.6.2. I can see all kinds of various fixes since then that might have been the cause (for example, the extension being disabled / unavailable).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants