-
Notifications
You must be signed in to change notification settings - Fork 53
Parse Node stacktraces correctly for filenames with spaces #47
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
Conversation
@@ -6,24 +6,15 @@ module.exports = function(config) { | |||
|
|||
// Check out https://saucelabs.com/platforms for all browser/platform combos | |||
var customLaunchers = { | |||
slIOS9: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sauce Labs removed iOS9 from this part of their product.
// version: '10.2' | ||
// }, | ||
slAndroid4: { | ||
slIOS10: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…but iOS10 now works ✨
// platform: 'macOS 10.12', | ||
// version: '10.2' | ||
// }, | ||
slAndroid4: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Android 4 was removed too.
@@ -46,7 +46,7 @@ | |||
"karma-opera-launcher": "^1.0.0", | |||
"karma-phantomjs2-launcher": "^0.5.0", | |||
"karma-safari-launcher": "^1.0.0", | |||
"karma-sauce-launcher": "^1.1.0", | |||
"karma-sauce-launcher": "^2.0.2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Upgrading this dependency fixed this problem which I was also able to see locally: https://travis-ci.org/stacktracejs/error-stack-parser/builds/566016807#L620
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and works as expected after the change.
Description
If a filename has spaces in it, it throws off the tokenization of the stackframe, resulting in an incorrect
StackFrame
object. The filename is reported as everything after the space, e.g.Parsing this error…
Results in this at
stackframe[0]
:The fix is a little clunky I'll admit – the neatest thing would be to find a regex to supply instead of the
split(/\s+/)
call, which would only split on spaces that did not occur with parentheses, but I couldn't come up with one.Motivation and Context
Reported on this repo #46 and now Bugsnag's users are seeing it bugsnag/bugsnag-js#586.
How Has This Been Tested?
Added a test case which fails before the fix is applied.
Types of changes
Checklist:
node_modules/.bin/jscs -c .jscsrc error-stack-parser.js
passes without errorsnpm test
passes without errors