-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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 takes forever to complete / hangs during tests #9350
Comments
I might have a similar issue. For me it hangs in CI but also when i run the test locally with a headless browser. It seems to work fine when i run it with "open". I've also noticed that it runs fine with when i ran it with ".only", finally i just skipped another pretty insignificant test and it works now. No idea what is going on tbh. I do use route2 / intercept in the test and i noticed sometimes that it worked when i removed the cy.wait([alias]) stuff. I don't have the time to try to do a reproduction atm but i just want to ping here if more people have the same issue. Ps. I've also updated from 5.x to 6.0 to see if that helped but same issue. |
Same issue in our case. Updating to 6 triggered most of the time infinite hangs (more than 1 day before we killed it). We are in early adoption of Cypress and we do not have complex tests. No usage of Here our output (without errors to be spotted):
Reverting to Cypress 5.4 (our previous version) seems to fix the issue. |
Can you provide a reproducible example? It's likely very specific to the tests and how they are written. We'll need that in order to investigate. Here are some tips for providing a Short, Self Contained, Correct, Example and our own Troubleshooting Cypress guide. Thanks! |
We use https://github.com/TheBrainFamily/cypress-cucumber-preprocessor to write our tests in Gherkin, and we do some cookie preservation using before hooks. This is the only things I really see which could be specific to our tests. However, this was already the case in the 5.X implementation. Is there any way to have logs to understand where it is really hanging? |
FYI I do cookie preserving to, will see if i can manage to create a reproduction but have a lot to do atm and will live with some skipped tests for now. |
if this is only happening in |
I've been having similar issues, really weird behaviour for jenkins+docker+cypress combination. |
My issue went away when I used electron instead of chrome inside docker container |
We use electron in Docker and it reproducing anyway. The only thing that I can say for now, that it gets reproduced in most of the cases when we run all the tests (it's more than 500) if running 3,14,101 then don't encounter the issue. |
Waw. 500? I'm just running approx under 50 cases. |
Can anyone provide a reproducible example? Right now there doesn't seem to be enough information to reproduce the problem on our end. We'll have to close this issue if we can't reproduce it. This does not mean that your issue is not happening - it just means that we do not have a path to move forward. Please comment in this issue with a reproducible example. |
I can't really provide a reproducible example. We were able to resolve our issues by distributing the tests to more Jenkins nodes. So far we just had one and ran 2-3 cypress instances in parallel. Sometime it worked, sometimes it crashed without a good hint. |
I observed the similar issue today, where Cypress hangs forever in headless mode. It took sometime to figure out a test which was causing the issue. When I disabled the test, it worked fine. Basically the test checks that after logout, I should not go back to home page, by clicking back or forward button. I'm not sure which step was causing issue, but after disabling this test, everything worked fine. homePage_PO.logout() cy.log('press back button') cy.log('press forward button') |
Can confirm this is happening for us as well. Using Cypress 8.7.0 in Azure Devops. |
I ran into this problem after upgrading from 8 to 9.5.4 |
Confirming we're running into this as well with upgrading from 3 to 9.5.4. Tests that weren't failing before we deleted a lot of useless ones are now failing consistently, they're handing on trying to load the first test, but the rest of the suite will pass without issue. It makes no sense.
|
If any of you are still experiencing this issue, can you please run with |
Just FYI, this is what this issue looks like for me in Buildkite:
Note a large gap with apparently no activity between the tests reporting as passing Environment info:
Upgraded to Cypress 9.7.0 and same issue. |
A hang regarding this may have been handled in Cypress 10.11.0 |
Having exactly the same issue, at least according to github actions timestamps we have cypress pausing for several minutes between Tried upgrading to cypress 11.1.0 and this has not changed anything. |
Note that I switched from electron to chrome and now it seems to run much quicker and the delays seem to be gone. |
See this behaviour with version 12 now, on the slow connection a test hangs forever on the default blank page. Running in Chrome. |
Is it the same as #8206, or are there meaningful differences between the two? |
In order to give our engineers the best chance at recreating your problem, please create a reproducible example using a fork of Cypress Test Tiny. This gives us the best chance of seeing exactly what you are seeing and being able to investigate effectively. If we don't receive a way to exhibit this behavior we won't be able to move forward and will have to close this issue until we can reproduce this problem. |
Unfortunately we have to close this issue due to inactivity. |
We are facing the same issue. The testcase gets stuck in a machine ( we have 14 ) ,Is there a option to see what is the current state of test in cypress cloud ? |
We are also facing the same issue. Using the current cypress ver 13.7.3. |
Current behavior
When running my tests on my CI (Jenkins) tests takes more than an hour to complete (possibly never completing)
They run fine on my macOS. I have just updated from version 5 to 6 to test if that could solve anything, but the same error happens.
When I go in and inspect the Console Output from the current job (that runs my deployment and cypress tests), it is just stuck here:
The whole output is this:
Screenshots of htop on machine where test is hanging:
Versions
Version 6 (latest)
The text was updated successfully, but these errors were encountered: