-
-
Notifications
You must be signed in to change notification settings - Fork 342
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
Unhandled promise rejections are not logged to sentry #1942
Comments
@jennmueng can you have a look at it? |
@Arhane thanks for the report.
can you provide a minimal reproducible example? it worked on our end. |
@marandaneto @Arhane We wanted to avoid polyfilling the global promise instance inside the SDK in fear of compatibility issues with older versions of React Native...but now that I've given it some more thought it might be a good solution out as RN hasn't really changed anything regarding Promises for a while although maybe a third party SDK shouldn't have the behavior of polyfilling commonly used global feature. Will need to think this one through. |
@marandaneto I will try to make a demo. @jennmueng I know, this isn't the best solution, but it seems more user-friendly, than version-matching. I agree, that third party SDK shouldn't polyfill the promise. I guess, we can hide it behind some flag? Like |
I have the same issue. I did match the versions, but that doesn't help.
Also, setting |
@pors What version of the SDK are you running, which version RN, is this on iOS/Android/Both, and are you running Hermes? |
|
I have the same issue with:
Please issue an urgent fix. Thanks! |
hey, mind testing out the latest release that includes this fix? https://github.com/getsentry/sentry-react-native/releases/tag/3.2.11 |
Just tested the latest version (3.2.11) and it works. Tested with this code
and Sentry.init
|
thanks, the reason is probably described here @Arhane https://docs.sentry.io/platforms/react-native/troubleshooting/#unhandled-promise-rejections |
My feature request is connected to the bug #1077.
I've tried the solution from docs, but it didn't work out for me. So I found another solution with polyfilling existing Promise in React Native.
I've used this package
Inside the
react-native-promise-rejection-utils
package polyfills the existing promise. You can check it out hereSo I propose changing the method, removing the check for the promise version and using the package
react-native-promise-rejection-utils
or polyfill directly without relaying on this package.I think this solution is better in many ways:
_checkPromiseVersion
can be removedThe text was updated successfully, but these errors were encountered: