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

Incorrect parsing of frames if a path is in an exception message #5498

Closed
3 tasks done
billyvg opened this issue Jul 29, 2022 · 3 comments · Fixed by #5519
Closed
3 tasks done

Incorrect parsing of frames if a path is in an exception message #5498

billyvg opened this issue Jul 29, 2022 · 3 comments · Fixed by #5519
Labels
Package: browser Issues related to the Sentry Browser SDK Type: Bug

Comments

@billyvg
Copy link
Member

billyvg commented Jul 29, 2022

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which package are you using?

@sentry/react

SDK Version

7.8.0

Framework Version

No response

Link to Sentry event

No response

Steps to Reproduce

Capturing this exception:

Sentry.captureException(new Error('NotFoundError: GET /organizations/{orgSlug}/events/ 404'))

Leads to this code in the core SDK
image

where the path in the exception message gets matched with the regex and is mistaken as a frame:

image

This then gets filtered by inbound filters as it does not match any URLs in allowUrls.

Expected Result

Frame at index 0 should not exist

image

Actual Result

image

As a workaround, I'm wrapping the pathname in quotes.

@AbhiPrasad AbhiPrasad added Package: browser Issues related to the Sentry Browser SDK Status: Backlog labels Jul 29, 2022
@AbhiPrasad
Copy link
Member

Backlogged, but we will look at this soon! Thanks for reporting!

@timfish
Copy link
Collaborator

timfish commented Aug 3, 2022

@billyvg do you have the full stack string for this error?

It looks like this is hitting the Gecko parser but this is a an error from Chrome. This suggests it was not recognised by the Chrome parser!

console.log(new Error('NotFoundError: GET /organizations/{orgSlug}/events/ 404').stack)

@billyvg
Copy link
Member Author

billyvg commented Aug 3, 2022

@timfish

Error
    at Client.requestPromise (api.tsx?7e33:554:1)
    at doDiscoverQuery (genericDiscoverQuery.tsx?33f8:328:1)
    at _GenericDiscoverQuery.eval [as fetchData] (genericDiscoverQuery.tsx?33f8:256:1)
    at _GenericDiscoverQuery.componentDidMount (genericDiscoverQuery.tsx?33f8:152:1)
    at commitLifeCycles (react-dom.development.js?f8c1:20663:1)
    at commitLayoutEffects (react-dom.development.js?f8c1:23426:1)
    at HTMLUnknownElement.callCallback (react-dom.development.js?f8c1:3945:1)
    at HTMLUnknownElement.sentryWrapped (helpers.js?aabc:85:1)
    at Object.invokeGuardedCallbackDev (react-dom.development.js?f8c1:3994:1)
    at invokeGuardedCallback (react-dom.development.js?f8c1:4056:1)
    at commitRootImpl (react-dom.development.js?f8c1:23151:1)
    at unstable_runWithPriority (scheduler.development.js?bacd:468:1)
    at runWithPriority$1 (react-dom.development.js?f8c1:11276:1)
    at commitRoot (react-dom.development.js?f8c1:22990:1)
    at performSyncWorkOnRoot (react-dom.development.js?f8c1:22329:1)
    at eval (react-dom.development.js?f8c1:11327:1)
    at unstable_runWithPriority (scheduler.development.js?bacd:468:1)
    at runWithPriority$1 (react-dom.development.js?f8c1:11276:1)
    at flushSyncCallbackQueueImpl (react-dom.development.js?f8c1:11322:1)
    at flushSyncCallbackQueue (react-dom.development.js?f8c1:11309:1)
    at scheduleUpdateOnFiber (react-dom.development.js?f8c1:21893:1)
    at dispatchAction (react-dom.development.js?f8c1:16139:1)
    at eval (useLegacyStore.tsx?cae4:37:1)
    at window._legacyStoreHookUpdate (useLegacyStore.tsx?cae4:22:1)
    at Store.callback (useLegacyStore.tsx?cae4:37:1)
    at EventEmitter.eventHandler (PublisherMethods.js?5e27:44:1)
    at EventEmitter.emit (index.js?fe27:137:1)
    at Store.trigger (PublisherMethods.js?5e27:63:1)
    at Store.onInitializeUrlState (pageFiltersStore.tsx?3b2a:102:1)
    at EventEmitter.eventHandler (PublisherMethods.js?5e27:44:1)
    at EventEmitter.emit (index.js?fe27:116:1)
    at Function.trigger (PublisherMethods.js?5e27:63:1)
    at eval (PublisherMethods.js?5e27:74:1)
    at sentryWrapped (helpers.js?aabc:85:1)

timfish added a commit to timfish/sentry-javascript that referenced this issue Aug 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: browser Issues related to the Sentry Browser SDK Type: Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants