Closed mjhenkes closed 1 year ago
I believe this issue is a bug in the user's application and not a bug in Cypress. I can reproduce this outside of Cypress like so:
https://secure.vidyard.com/user/sign_in
in Chrome/graphql
request, choose Block request URL
The user code gets hung up in an infinite loop in a function called setupAdvancedSearch
. There's a component that, when mounted, calls setupAdvancedSearch
. It expects a certain search input to exist. If it doesn't, it waits a tick, then recursively calls itself, probably expecting the search input to eventually render. The problem is that the search input never renders on the error page that's triggered by that request failing, so the function infinitely calls itself and hangs up the browser.
There's nothing we can do in Cypress to prevent this. It needs to be fixed in the app code.
Current behavior
Given the following tests, cypress will hang the browser when cy.reload is called. This didn't happen for me immediately but it did happen on a refreh.
Desired behavior
No hangs.
Test code to reproduce
Private repo, as me for access. https://github.com/mjhenkes/cypress-intercept-reload-hang
Cypress Version
12.7.0
Node version
18
Operating System
macos
Debug Logs
No response
Other
Internal slack link: https://cypressio.slack.com/archives/C9KG9TQBX/p1677775559454759?thread_ts=1677617269.109309&cid=C9KG9TQBX