Filtering duplicated Unhandled JS Errors doesn't work with obfuscated class names on Android
Description
Our current solution to avoid duplicated errors being reported to Sentry doesn't work with obfuscated class names as we are checking the exception type against the string JavascriptException.
We have to check this as React Native passes unhandled exceptions from JS layer to the native layers. We catch and send the exception in the JS layer with JS context, the native exception doesn't provide any more useful information.
https://github.com/getsentry/sentry-react-native/blob/0b40c1bc5f73500ffaf1f573bc0b86ded189bbcd/android/src/main/java/io/sentry/react/RNSentryModuleImpl.java#L182-L192
@krystofwoldrich can you actually do instanceof with https://github.com/facebook/react-native/blob/af99a6890b84713d002fbbd872f10fe2e6304861/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/common/JavascriptException.java#L18 ?
@marandaneto I'm not sure because we are doing the check on the SentryException not on the original Exception. Is there a way to get the original in beforeSend?
@marandaneto I'm not sure because we are doing the check on the SentryException not on the original Exception. Is there a way to get the original in
beforeSend?
yes, our docs should document that https://docs.sentry.io/platforms/android/configuration/filtering/
This error doesn't look obfuscated (might be because it was symbolicated by Sentry) but is also reported twice.
Consider even using https://docs.sentry.io/platforms/android/configuration/options/#ignored-exceptions-for-type
Maybe probably easier than beforeSend.