sentry-react-native: Unhandled promise rejections will not be caught by Sentry warning not working (only logging message)
Environment
How do you use Sentry? Sentry SaaS (sentry.io)
Which SDK and version? @sentry/react-native@3.4.3
Steps to Reproduce
Run the app.
Expected Result
There should be one of these logs from https://github.com/getsentry/sentry-react-native/blob/f916f2b3afbb9884f9037b8486539ca6cc8b327c/src/js/integrations/reactnativeerrorhandlers.ts#L141:
Unhandled promise rejections will not be caught by Sentry. Read about how to fix this on our troubleshooting page.Unhandled promise rejections will be caught by Sentry.Unhandled promise rejections will not be caught by Sentry. Read about how to fix this on our troubleshooting page.
Actual Result
No message in logs.
Replacing:
logger.warn("Unhandled promise rejections will not be caught by Sentry. Read about how to fix this on our troubleshooting page.");
by
setTimeout(() => console.warn("Unhandled promise rejections will not be caught by Sentry. Read about how to fix this on our troubleshooting page."), 0);
solves the issue (setTimeout and console instead of logger are both required). Maybe the logger is not yet ready at this timeā¦
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 17 (8 by maintainers)
Not yet, and not in the coming days. Maybe you should close the issue and I will update you when I will have time to check.
Still an issue!
Ok. With dev client build (using Expo) I can see the logs.