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

"Cannot set property 'err' of undefined" error occurs in place of other errors during automatic test-reruns on file save (4.12.1). #8189

Closed
threehams opened this issue Aug 5, 2020 · 6 comments · Fixed by #8193
Labels
pkg/runner This is due to an issue in the packages/runner directory type: bug

Comments

@threehams
Copy link

Current behavior:
This is a reopen of #7874, since the issue is not fixed after upgrading to 4.12.1. The behavior is the same, but the test code branch is different and this can be reproduced at least 50% of the time.

When running tests locally through cypress open by saving files (forcing a re-run), any failures occurred during the run can trigger this message:

The following error originated from your application code, not from Cypress.

  > Cannot set property 'err' of undefined

When Cypress detects uncaught errors originating from your application it will automatically fail the current test.

This behavior is configurable, and you can choose to turn this off by listening to the uncaught:exception event. Learn more

Desired behavior:
The test fails with the normal readable stack trace.

Test code to reproduce
https://github.com/primitiveconcept/ludumdare46/tree/cypress/err-of-undefined-4-12-1/client

Run npm run cy:dev for server + Cypress
Run the infostealer.spec.ts spec
Save the infostealer.spec.ts while the test is running. Note that 50% of the time, this error occurs, and 50% of the time, the test is cut short and passes when it should fail. This may or may not be caused by a separate issue.

Versions
Cypress versions: Can reproduce on 4.12.1. Cannot reproduce on 4.5.0. Other versions are unstable for various reasons on the example project.
OS: MacOS + Windows
Browser: Chrome + Electron

@todd-m-kemp
Copy link

I too have continued to experience this problem in version 4.12.1 even though it was supposed to have been fixed in this version.

@kuceb
Copy link
Contributor

kuceb commented Aug 5, 2020

thanks for letting us know, I'm looking into this (again)

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Aug 6, 2020

The code for this is done in cypress-io/cypress#8193, 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 6, 2020
@thaianalps
Copy link

I too have continued to experience this problem in version 4.12.1 even though it was supposed to have been fixed in this version.

me too

@jennifer-shehane
Copy link
Member

This will be fixed in our next release.

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Aug 20, 2020

Released in 5.0.0.

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

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