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
Error: Cannot parse given Error object #549
Comments
That's interesting, would you be able to publish a mini-project to Github that demonstrates this issue so I could try to reproduce it? Also, it might be useful to add It seems to me that something somewhere throws a string (or some other junk), that's not a proper You could also add a |
Hi Again @jan-molak - I did manage to diagnose the problem and fix it as it was actually in my own code but I thought I'd give you a reproducible example anyway as I think this might still be a bug. It happens when a rejected What that looks like in the report is this: But thanks for your pointers! |
Ah right, I see, so the issue is when custom code throws stuff that's not an |
Hey @jan-molak! Having some good success migrating my 1.x project with the assistance of the excellent new handbook: Upgrading to Serenity/JS 2.0😄
One thing that's cropped up that I think might be a bug is an exception that's thrown
Error: Cannot parse given Error object
at.Object.ErrorStackParser$$parse [as parse]()(node_modules/error-stack-parser/error-stack-parser.js:35) .ErrorStackParser.parse()(node_modules/@serenity-js/core/src/io/ErrorStackParser.ts:13) .ErrorRenderer.renderError()(node_modules/@serenity-js/serenity-bdd/src/stage/crew/serenity-bdd-reporter/reports/ErrorRenderer.ts:21)
. I've googled this and have found mention of this error in this comment but I'm not invokingnew Error()
anywhere in my code. One interesting thing is that the page does contain some text with "Error: " in it, but I wouldn't have expected that to trip anything up. For completeness I've enclosed the json file that got produced in that test run here (sorry if it's a bit on the long side!):The text was updated successfully, but these errors were encountered: