-
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
Tests hang when afterEach promise does not resolve with Retires enabled #21619
Comments
I was able to reproduce this with latest Cypress (9.7.0). Like you are suggesting @taylorjellsworth, there seems to be something going wrong with how we are processing the Here is a snapshot of the With the timeout, the breakpoint is never reached Thanks for posting the issue, we'll add this bug to our backlog. |
@ZachJW34 Thanks for investigating! I agree, I think a timeout of the hook should act the same as an error occurring within the hook. If it's possible, can this bug be prioritized? This is currently impacting our test suites, and if it gets stuck in the backlog we'd be forced to move off of Cypress (even though we really don't want to!) |
Maybe related to code-coverage plugin? Maybe there's an |
I was wondering if there are any updates on this? |
Hi @jennifer-shehane ! This is still causing us issues, I was wondering if anyone has started looking into it yet? |
Facing the same issue. When using cy.request().then() on It strange because if I put the logic inside one |
Similar issue here: #18502 |
@flotwig I was wondering if there's any estimate on when this will get looked at? We are still running into this issue. |
@flotwig @mjhenkes @jennifer-shehane @mschile bump. We are close to moving off of Cypress if this is not addressed |
I'd like to add that not being able to use retries also increases costs. |
Just to add to this, we appear to be hitting a similar issue, however it appears to happen regardless of retries being set. Basically, we have a test that downloads a file, and then hits a pageLoadTimeout, perhaps due to #1551 Repro’d with: |
fyi - we have moved off of Cypress completely and onto Playwright due to this issue. We would have loved to continue to use Cypress, but the lack of communication (even after asking for updates many times) on this issue was the driving force. We could not wait around forever. Hopefully this issue gets resolved at some point for those who are still dealing with it. |
This issue has not had any activity in 180 days. Cypress evolves quickly and the reported behavior should be tested on the latest version of Cypress to verify the behavior is still occurring. It will be closed in 14 days if no updates are provided. |
This issue has been closed due to inactivity. |
I faced the same issue, it would be really nice having it fixed. Now we cannot use afterEach when having retries, it's very inconvenient |
I'm also experiencing this issue with Cypress 12. Would love a fix. |
I am experiencing this in |
Current behavior
I recently noticed that our e2e tests periodically fail the first run and then randomly hang on the retry run. After outputting cypress logs via
DEBUG='cypress:*'
I found the following:test:after:run
event never gets fired when the test hang on the retry run, Thetest:after:run
event is supposed to happen after theafterEach
andafter
Mocha hooks runonMocha hook
output, which means that theafterEach
hook has startedonMocha hook end
output. This signifies theafterEach
hook has never finished. So theafterEach
hook is hanging for some reasonIt appears to me that the tests are hanging when retries are enabled and the afterEach promise does not resolve
Desired behavior
During the first retry, Cypress should reach timeout and fail. The test should not hang.
Test code to reproduce
I am unable to share test code/logs due to proprietary rights. However, I was able to reproduce a similar error where the test hangs on first retry when the done() callback is never invoked.
In cypress.json
Test Case
You'll see that the first run fails, and the retry run will end up hanging
Cypress Version
9.7.0
Other
No response
The text was updated successfully, but these errors were encountered: