-
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
Improve Uncaught Errors #1761
Comments
Guess this is the same issue I have... causes tests to fail.
|
I've just spent an hour getting to know Cypress intimately to track down the error I was getting. Spoiler: turns out the error was that electron doesn't currently support optional catch binding in try {
...
} catch {
...
} The error I was receiving was:
This doesn't contain anything useful for tracking down what is causing the error since there's After much exploration through the devtools I landed here: This gave me the information I needed - the file, line number and column number of the syntax error. From then it only took a few more seconds to track down the actual syntax incompatibility. The issue here seems to be that the source, lineno and colno information are being explicitly dropped here: cypress/packages/driver/src/cy/errors.coffee Lines 29 to 30 in 55b352a
cypress/packages/driver/src/cy/errors.coffee Lines 39 to 44 in 55b352a
Because the error (argument 5) exists, the other details are discarded, which leads to a less-than-optimal debugging experience. As far as I can tell, there's no way for me to extract these details with any cypress hooks, for example by the time it hits the Suggestion: add |
The code for this is done in cypress-io/cypress#3930, but has yet to be released. |
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
on
Uncaught Errors
err.stack
, e.g syntax error, construct a better errorThe text was updated successfully, but these errors were encountered: