Skip to content

Test case for broken stack trace when path has parenthesis - #154

Merged
HazAT merged 2 commits into
getsentry:masterfrom
descriptinc:parenthesis-bug
Nov 12, 2019
Merged

HazAT merged 2 commits into
getsentry:masterfrom
descriptinc:parenthesis-bug

Conversation

@marcello3d

Copy link
Copy Markdown
Contributor

When our electron app has a parenthesis in the name, we get bad stack traces that don't SourceMap properly.

I was able to fix part of the problem with #153 but that only helps with browser errors.

Errors in the main process seem to be parsed elsewhere (maybe by the stack-trace module?).

In any case, this PR doesn't solve the bug, just provides a test for it.

@timfish

timfish commented Feb 1, 2019

Copy link
Copy Markdown
Collaborator

From this quick test, it looks like this might be fixable in stack-trace by making the first capturing group of the regex less greedy.

So this line:

var lineMatch = line.match(/at (?:(.+)\s+\()?(?:(.+?):(\d+)(?::(\d+))?|([^)]+))\)?/);
// would become
var lineMatch = line.match(/at (?:(.+?)\s+\()?(?:(.+?):(\d+)(?::(\d+))?|([^)]+))\)?/);

@marcello3d

Copy link
Copy Markdown
Contributor Author

That's what I found as well, but when I tried to write tests on the repo against the bug I wasn't able to get it working. :-(

I'm also not sure if there are regressions with that change.

@timfish

timfish commented Feb 2, 2019 •

Copy link
Copy Markdown
Collaborator

I submitted a PR with this fix.

@HazAT

HazAT commented Mar 21, 2019

Copy link
Copy Markdown
Member

This will be fixed one we move to 5.x of the @sentry/core SDKs

@HazAT

HazAT commented Nov 8, 2019

Copy link
Copy Markdown
Member

I will close this since we released new major bump with using 5.x SDKs

@HazAT HazAT closed this Nov 8, 2019
@timfish

timfish commented Nov 11, 2019

Copy link
Copy Markdown
Collaborator

@HazAT I think this PR was a test case to ensure that the stack-trace was fixed so it should have been merged after the v5 update.

@HazAT HazAT reopened this Nov 12, 2019
@HazAT

HazAT commented Nov 12, 2019 •

Copy link
Copy Markdown
Member

OK so good to merge now, lol :)
Thx!

@HazAT
HazAT merged commit 567ab73 into getsentry:master Nov 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants