-
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
No stack traces in cypress run
and inconsistent from cypress open
#823
Comments
Have you tried running the tests with |
(Incidentally—just upgraded to v1.0.2, to keep this issue accurate...) |
Cypress does not print a stack trace when the error originated from itself (since it throws hundreds of different error messages). There's no way there's an unexpected identifier in Cypress itself so I'd be curious why its thinking the error came from itself... I believe this is actually an uncaught exception from your application. I'd have to investigate why Cypress is not immediately printing the stack trace which would point you to your application. We probably should upgrade the error message to also be much clearer that its from your app as opposed to something else. Lastly, if my assumptions are correct you can use the The docs for that are here: https://docs.cypress.io/api/cypress-api/custom-commands.html#Syntax |
Also the actual underlying problem is likely due to your application using newer ES**** code that's available in Chrome 62 but is not available in Electron 53 (which is really Chromium 53). |
Opened an issue here to update the errors to indicate where they originated. #825 This is still separate from the stack trace problem - Cypress always displays the stack trace on any error that it itself did not throw. I'm not sure why its not being displayed here. |
Yeah I did assume the error was from my app and that that was the cause—I was more filing this as the error is quite vague (and not super helpful—although the other errors I've encountered in Cypress have been very helpful!) Do you know any easy way to boot up the electron browser myself to see if I can find the error that way? The payload from that |
aha... I've got it. Thanks for your help. Shall I close this issue? |
You can use the Electron browser by switching to it in the GUI (which you already did) It runs headlessly by default from |
Released in |
Is this a Feature or Bug?
Bug
Current behavior:
Using a Nuxt app and
cypress run
from the command line, the tests linked below show anUncaught SyntaxError: Unexpected identifier
with no stack trace, but work perfectly when usingcypress open
Commenting out
cy.visit
seems to fix the error, but obviously the tests still fail which suggest to me it's an error when processing the page however I don't know how to find out any further than that without any clues.Desired behavior:
The behaviour in
open
andrun
should be the same, but also primarily there should be stack traces to debug syntax errors.How to reproduce:
Basic versions of the tests and results shown here: https://gist.github.com/samtgarson/dadd2d760c7701c8ab0c2ee8e89bd9a4
I can't share the entire repo but if you have no idea where to begin I can try to recreate with a basic example.
Test code:
Above
Additional Info (images, stack traces, etc)
Above
The text was updated successfully, but these errors were encountered: