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

Uncaught Exceptions should clearly indicate where they originated from #825

Closed
brian-mann opened this issue Oct 26, 2017 · 8 comments
Closed
Assignees
Labels
pkg/driver This is due to an issue in the packages/driver directory type: enhancement Requested enhancement of existing feature
Milestone

Comments

@brian-mann
Copy link
Member

Currently when an uncaught exception causes a test to fail we only print the error.

This is confusing because Cypress fails the test for any kind of reason

  • maybe there was an error in the test code itself
  • maybe a command failed
  • maybe your application threw an uncaught exception

In the cases of uncaught exceptions originating from your application we should CLEARLY indicate that is from your application code.

Bonus points for also doing the same thing when test code is the culprit.

@brian-mann brian-mann added the type: enhancement Requested enhancement of existing feature label Oct 26, 2017
@brian-mann brian-mann self-assigned this Oct 26, 2017
@jennifer-shehane jennifer-shehane added stage: ready for work The issue is reproducible and in scope pkg/driver This is due to an issue in the packages/driver directory labels Oct 26, 2017
@brian-mann
Copy link
Member Author

Also we need a link to the Cypress Events to tell you how to turn this off

@jennifer-shehane
Copy link
Member

jennifer-shehane commented Nov 15, 2017

Example of an error from my application under test. The actual stack trace is below a lot of messaging. I think most people see the error being thrown from cypress_runner.js and assume it's an error in cypress_runner.js

screen shot 2017-11-15 at 1 49 24 pm

@brian-mann
Copy link
Member Author

When there are uncaught exceptions from your application...

screen shot 2017-12-04 at 12 46 15 am

@brian-mann
Copy link
Member Author

When there are uncaught exceptions from your test code...

screen shot 2017-12-04 at 12 45 57 am

@brian-mann
Copy link
Member Author

Fixed by #999

@brian-mann brian-mann added this to the 1.1.3 milestone Dec 4, 2017
@brian-mann
Copy link
Member Author

Released in 1.1.3.

@sayedit09
Copy link

Hi,
Please help .i'm getting this error
Screenshot 2019-05-20 at 10 03 14 AM

@jennifer-shehane
Copy link
Member

Hey @sayedit09, this error is coming from your application code - not Cypress. Click on the error with DevTools open and look at the stack trace to determine where this is being thrown in your application.

@cypress-io cypress-io locked as resolved and limited conversation to collaborators Jun 24, 2019
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: enhancement Requested enhancement of existing feature
Projects
None yet
Development

No branches or pull requests

3 participants