-
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
Stack trace log (failed line number) printed in cypress run
is different from the stack trace in cypress open
#7715
Comments
it is a simple case, if your charset doesn't support Chinese please modify them to English, thanks. |
Yes, I think this may be due to the something with the code/filename being in Chinese unicode characters. We had a previous issue with the values dispalying incorrectly in the code frame that looks similar: #7507 @frankliu1776 Can you provide test code that we can run completely to see the error ourselves? I can't run the current code without the url to visit, the |
Hi Jennifer, thank you for the quick response. Yes, the way you recreate my scenario is perfect. If the issue is not related with Chinese characters, could you find a way to fix it in cypress run? 👍 |
I get the same problem (macOS 10.13.6, Cypress 4.8.0) and all of my JS files are in utf-8. The line numbers given in the terminal are always incorrect, but I can't see what the pattern is (it doesn't seem to be as simple as "off by 5" or anything like that). So they're consistently wrong, but there's no consistency to the wrongness 😃 . I would be hugely grateful for a fix to this (or even if someone knows what the pattern is to translate them to the correct numbers), as currently it can make development quite frustrating sometimes! Screenshots of just one example below. |
thanks for replying, the same issue I am facing... |
Any progress on this Issue? I am running version 5.2.0 and I am still seeing this problem. I created a simple test that will always fail. If I click the Not sure if it's relevant, but the console output refers to a Attached are screenshots |
cypress run
is different from the stack trace in cypress open
I am also facing this issue and is tremendously frustrating for the dev team. |
@jennifer-shehane any update on this? We are facing failures in CI with references to line numbers in the file that are beyond the length of the file. The relevant files are using ASCII encoding. |
Facing a similar issue with discrepancy between CI and local. I dunno if my files specify encoding at all.
|
As I run multiple |
This is a major problem with sporadic failures in our CI build. That the |
The code for this is done in cypress-io/cypress#23575, but has yet to be released. |
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
Current behavior:
./node_modules/.bin/cypress run --port 3019 --browser chrome --config testFiles=myCypressPath/cypress/test/20200426172648.js
I can get stack trace printed in terminal like:
We can see that the log indicates the failed line number is in line 24, which is not correct
cypress open
, it indicates that the failed line number is 31 which is correct:Desired behavior:
how can I get correct stack trace on ternimal? I am using some automation framework to automate cypress scripts and parse the stack trace log to get failed line number
Test code to reproduce
Versions
Cypress: 4.7.0
operating system: MacOS Catalina 10.15.5
browser: chrome 83.0.4103.97
The text was updated successfully, but these errors were encountered: