-
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 headless hangs in second spec after previous goes back in history #5475
Comments
I can confirm, this hangs forever during I had to manually close the Cypress application to get it to stop running. DEBUG logs at hang
specfile1.js it('history go', () => {
cy.visit(`https://google.com`)
cy.window().then(win => {
win.history.pushState({}, null, `/`)
});
cy.go('back');
}) specfile2.js it('history get item', () => {
cy.get('.item')
}) WorkaroundRun tests in |
Hi, just updated to the 3.5.0 as well and the same behaviour happens.
In our case, it is always hanging after the first |
Can we get an update on this? It's a blocking regression that prevents from upgrading from |
Is there any chance this will be fixed in 3.6.1? Causing issues here too. |
I think this is a broader issue than the comment suggests - HTML5 navigation in general seems to cause Cypress to hang. |
Maybe related: #5645 |
Also likely related: #5596 |
I spent a few hours debugging this - I believe it is a bug in |
Confirmed this is a bug in electron. It is still failing in Looks like we can fix this by upgrading electron. |
The code for this is done in cypress-io/cypress#5849, but has yet to be released. |
Released in |
@jennifer-shehane sorry for commenting on closed ticket. I am kind of facing similar issue running tests in docker. After the first test spec cypress hangs on forever. [34;1mcypress:server:browsers:chrome �[0mconnecting to Chrome remote interface at random port 44619 �[34m+15ms�[0m |
I meet the same error, is there any update? |
This issue will be closed to further comment as the exact issue here was resolved and tested. If you're experiencing a bug similar to this in Cypress, please open a new issue with a fully reproducible example that we can run. There may be a specific edge case with the issue that we need more detail to fix. |
Current behavior:
In headless electron (headed electron works fine), the process hangs forever when doing the below steps.
Basically, you do something like this in
a.spec.js
:and in
b.spec.js
you retrieve an elem:I know that the 2nd spec file isn't really a valid use case (since we haven't yet loaded a page), but I've wanted to create the smallest reproducible test case.
I'm not really sure what's going on, but there are several significant things that must be done:
load some page
push a new state to history
go back
window.location.go(-1)
and in the next spec (must be a different file so that Cypress runner closes & opens new window), retrieve a DOM elem.
This last step is weird because before I managed to narrow it down to this smallest reproduction, I've been doing much more in my real-world spec, and it failed only on one particular DOM retrieval. Don't have a clue, but it also reproduces when I simply query the DOM, without loading a page.
hangs, forever (?).
DEBUG=cypress:*
doesn't show anything interesting, I think --- no new messages are logged after it hangs.Desired behavior:
Should not hang.
Steps to reproduce: (app code and test code)
https://github.com/dwelle/cypress-test-tiny/tree/dwelle_hang
and run:
The url links to the branch directly. Refer to README, if need be.
Versions
3.5.0
(3.4.1
works)The text was updated successfully, but these errors were encountered: