Closed amakhrov closed 2 years ago
On the first glance it looks like some regex matches the file
substring there as a special delimiter :)
This issue has gone three weeks without activity. In another week, I will close it.
But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog
or Status: In Progress
, I will leave it alone ... forever!
"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀
I mean, it's still a legit issue, and keeps popping up from time to time in our project ("profile" is a part of our domain terminology, so we cannot simply rename all occurrences in the code to make Sentry SDK happy)
I confirm there are other inputs that produce unexpected results when run through https://github.com/getsentry/sentry-javascript/blob/cabb53c67ab202bb12c517f8a4aa65641cac606e/packages/browser/src/tracekit.ts#L147
Examples:
> const gecko = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i;
> gecko.exec('handleProfileResult@https://www.crunchbase.com/main.4a4119c3cdfd10266d84.js:146:1018410')
(6) ['handleProfileResult@https://www.crunchbase.com/main.4a4119c3cdfd10266d84.js:146:1018410', 'handlePro', undefined, 'fileResult@https://www.crunchbase.com/main.4a4119c3cdfd10266d84.js', '146', '1018410', index: 0, input: 'handleProfileResult@https://www.crunchbase.com/main.4a4119c3cdfd10266d84.js:146:1018410', groups: undefined]
> gecko.exec('helloHTTPMethod@https://www.crunchbase.com/main.4a4119c3cdfd10266d84.js:146:1018410')
(6) ['helloHTTPMethod@https://www.crunchbase.com/main.4a4119c3cdfd10266d84.js:146:1018410', 'hello', undefined, 'HTTPMethod@https://www.crunchbase.com/main.4a4119c3cdfd10266d84.js', '146', '1018410', index: 0, input: 'helloHTTPMethod@https://www.crunchbase.com/main.4a4119c3cdfd10266d84.js:146:1018410', groups: undefined]
Touching that regexp is going to require the due diligence (and possibly regular expressions are not the best tool for the job).
@kamilogorek could you help us here? Is this something that the Stacktrace team can pick up?
@vladanpaunovic the original issue has been already addressed here - https://github.com/getsentry/sentry-javascript/pull/4153 It just needs to be rebased on top of v7 changes and merged in.
Package + Version
@sentry/browser
@sentry/node
raven-js
raven-node
(raven for node)Version:
Description
Raw stack trace is:
Note this frame:
In Sentry it's displayed as
It's the only frame in the whole stack trace that is messed up.