Skip to content
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

[driver] errors thrown from test:before:run are incorrectly handled #23039

Closed
emilyrohrbough opened this issue Aug 1, 2022 · 2 comments · Fixed by #23226
Closed

[driver] errors thrown from test:before:run are incorrectly handled #23039

emilyrohrbough opened this issue Aug 1, 2022 · 2 comments · Fixed by #23226
Assignees
Labels
pkg/driver This is due to an issue in the packages/driver directory type: bug

Comments

@emilyrohrbough
Copy link
Member

emilyrohrbough commented Aug 1, 2022

Current behavior

Errors thrown from test:before:run handlers are not propagated correctly and cause inconsistent behaviors in run vs open mode.

  • in open mode: the error is reported for each test
  • in run mode: the error is swallowed, no tests start and Cypress hangs indefinitely

This failure occurs here in which the runner will catch the error here, however since the runnable has not been set the runnable (hook or test) technically hasn't officially starts which I think it causing the inconsistency with the finally handler which is in place to try to log the test results/errors and ensure the after:test:run and after:test:run:async events are emitted.

Desired behavior

When errors thrown from test:before:run handlers, reports it correctly and consistently between run/open mode without hangs.

Test code to reproduce

https://github.com/cypress-io/cypress-test-tiny/compare/verify-unhandled-err

CI job which timed out: https://ci.appveyor.com/project/cypress-io/cypress-test-tiny/builds/44331388

Cypress Version

10.3.1

Other

No response

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Aug 10, 2022

The code for this is done in cypress-io/cypress#23226, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

@cypress-bot cypress-bot bot added stage: pending release and removed stage: needs review The PR code is done & tested, needs review labels Aug 10, 2022
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Aug 15, 2022

Released in 10.5.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v10.5.0, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Aug 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pkg/driver This is due to an issue in the packages/driver directory type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants