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 stops execution (hangs) entering infinite loop on element focus within test #28746
Comments
I've been looking at this. It appears there's a situation where an uncaught exception is thrown in an infinite loop. It does happen in 12.0 and 13.6.3, so doesn't appear to be a recent regression. Thanks so much for the reproduction! I'm sure we'll be able to track something down. |
Narrowed down the bug in this repo: https://github.com/jennifer-shehane/Cypress-Bug Cypress gets stuck in a loop firing the focus event. You can add a debugger here and observe it: https://github.com/cypress-io/cypress/blob/bump-testing-library/packages/driver/src/cy/focused.ts#L47 |
@REZ-bdoty This infinite hanging happens whenever you click to focus on that 'URL' input. You could skip that action for now in your tests if you want to perform other tests outside of that focus/click behavior until a fix it out. |
I'm trying to help/close this issue. I found out @jennifer-shehane repo doesn't hang in headless mode with--browser firefox, but hangs with --browser electron. Could it be related only to electron? Where should I start looking? edit: Tried with latest version and it doesn't hang anymore, but a fix for the issue wasn't mentioned in the ChangeLog of any of the new versions. Maybe someone should investigate what changes between the versions might have resolved the issue. |
I couldn't get the repro project to run anymore, it runs into an error. If the error is not present on the most recent version of Cypress, we can close this. |
I will see if the latest version fixes the issue in our main project. To run the local server; change directory to WYSIWYG and run |
This continues to reproduce with versions 13.6.5, 13.6.6, and 13.7.0. |
Current behavior
When running a test and interacting with elements in shadow dom Cypress will hang on execution.
In open mode this is hit or miss. Sometimes it will work. Other times it will stop execution.
In headless mode this will happen every time (Debug.log is in attached project).
This happens in every browser.
This happens in Cypress 12.x and 13.x
Desired behavior
Cypress executes all tests in open and/or headless mode.
Test code to reproduce
Example project file has Readme.md.
Cypress-Bug.zip
Cypress Version
13.6.3
Node version
20.11.0
Operating System
Windows 10 22H2 (OS Build 19045.3803)
Debug Logs
cy_debug.log is in the attached project.
Other
IncludeShadowDom is set to true in cypress.config.ts.
The text was updated successfully, but these errors were encountered: