Skip to content
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

Unexpected error when computing Gecko stack traces #89

Open
BenoitZugmeyer opened this issue Feb 11, 2022 · 1 comment
Open

Unexpected error when computing Gecko stack traces #89

BenoitZugmeyer opened this issue Feb 11, 2022 · 1 comment

Comments

@BenoitZugmeyer
Copy link

By reviewing TraceKit code, I found an issue where the stack trace computation fails in certain condition. Keep in mind that I didn't observe an actual error matching this condition.

See the code in question:

                } else if (i === 0 && !parts[5] && !_isUndefined(ex.columnNumber)) {
                    // ...
                    stack[0].column = ex.columnNumber + 1;
                }

The issue is, if i === 0, then the stack array is always empty, so accessing its first element returns undefined, and stack[0].column throws TypeError: Cannot set properties of undefined.

This piece of code is only used in Gecko if the first line doesn't contain any column number. You can see the tests failing if you remove the column number here for example.

Now, because this has been an issue for a long time and nobody reported it, I'm not sure if this should be fixed or if this particular condition could be removed altogether. It seems that Sentry chose the latter.

@niemyjski
Copy link
Collaborator

Thanks for reporting this issue, we appreciate it. Any chance you'd be willing to submit a pr with a second modified test and a fix. I wish sentry would help the community by contributing back fixes.

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

No branches or pull requests

2 participants