sentry-javascript: Unable to filter safari extensions
- Review the documentation: https://docs.sentry.io/
- Search for existing issues: https://github.com/getsentry/sentry-javascript/issues
- Use the latest release: https://github.com/getsentry/sentry-javascript/releases
- Provide a link to the affected event from your Sentry account
Package + Version
-
@sentry/browser -
@sentry/node -
raven-js -
raven-node(raven for node) - other:
Version:
6.2.0
Description
Chrome extensions are easy to filter out:
denyUrls: [/^chrome-extension:\/\//i]
But when I try it with safari extensions, sentry doesn’t filter it out:
denyUrls: [/safari-(web-)?extension:/]
I even tried with ignoreErrors:
ignoreErrors: [/safari-(web-)?extension:/]
but to no avail. That is extremely weird, because I thought ignoreErrors checks for match in raw error string, which 100% contains safari-extension:or safari-web-extension:. See example:
Error: {} at ClipperError@safari-extension:(//3284871F-A480-4FFC-8BC4-3F362C752446/2665fee0/commons.js:223036:10) at fromAny@safari-extension:(//3284871F-A480-4FFC-8BC4-3F362C752446/2665fee0/commons.js:223078:28) at _handleResponsePromise@safari-extension:(//3284871F-A480-4FFC-8BC4-3F362C752446/2665fee0/commons.js:202805:51) at _handleDispatchResponse@safari-extension:(//3284871F-A480-4FFC-8BC4-3F362C752446/2665fee0/commons.js:202784:32) at _handleMessage@safari-extension:(//3284871F-A480-4FFC-8BC4-3F362C752446/2665fee0/commons.js:202766:37) at safari-extension:(//3284871F-A480-4FFC-8BC4-3F362C752446/2665fee0/commons.js:202755:26) at emit@safari-extension:(//3284871F-A480-4FFC-8BC4-3F362C752446/2665fee0/topee-content.js:3507:17) at safari-extension:(//3284871F-A480-4FFC-8BC4-3F362C752446/2665fee0/topee-content.js:3313:26)
Am I doing sometihing wrong? Is there a way to filter safari extensions out?
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 25 (9 by maintainers)
It’s an error I got.
TypeError: undefined is not an object (evaluating ‘g.toString’) at safari-extension:(//260B6E24-727B-43D5-ACB5-55C5A7B2EE46/4245c0c1/Honey.safariextension/h1-vendors-main-popover-wallet.js:51:75573) at u@safari-extension:(//260B6E24-727B-43D5-ACB5-55C5A7B2EE46/4245c0c1/Honey.safariextension/h1-vendors-main-popover-wallet.js:147:37625) at safari-extension:(//260B6E24-727B-43D5-ACB5-55C5A7B2EE46/4245c0c1/Honey.safariextension/h1-vendors-main-popover-wallet.js:147:37375) at r@safari-extension:(//260B6E24-727B-43D5-ACB5-55C5A7B2EE46/4245c0c1/Honey.safariextension/h1-vendors-main-popover-wallet.js:51:77376) at safari-extension:(//260B6E24-727B-43D5-ACB5-55C5A7B2EE46/4245c0c1/Honey.safariextension/h1-vendors-main-popover-wallet.js:51:77472) at promiseReactionJob([native code])
@senky the fix is coming 😃
Thanks @trmpowell! https://github.com/getsentry/sentry-javascript/pull/3929 should fix it soon.
Ah, it looks like your PR went in after 6.12.0. We will upgrade. Thanks!
Yes, will do. I’ll get back to you when we see the event again.
Thanks, that’s helpful. Apparently the raw stack looks slightly differently, and SDK was not able to parse it correctly, which makes the
filenameandabs_pathvalues malformed (abs_pathis used for this filtering). However, to tell what went wrong, we need the raw stack in the first place. And to obtain it, we need to attach it to the event.Could you use the snippet below to configure your SDK and get back to me once you notice the same issue again? This time it should have additional data attached.
No, you need to do this only: https://github.com/getsentry/sentry-javascript/issues/3313#issuecomment-812478660
can we pass in something like
denyUrls: [/^chrome-extension:\/\//i, /safari-(web-)?extension:/],?Browser extensions can be filtered directly in the UI (which also saves your event quota), so there’s no need to change SDK config 😃