Unhandled promise rejections will not be caught by Sentry warning not working (only logging message)
See original GitHub issueEnvironment
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…
Issue Analytics
- State:
- Created a year ago
- Comments:12 (6 by maintainers)
Top Results From Across the Web
Troubleshooting for React Native | Sentry Documentation
Due to an issue with React Native's dependencies, unhandled promise rejections might not be correctly caught by Sentry. If the promise rejection handler...
Read more >Unhandled Promise Rejections in Node.js - The Code Barbarian
js process with a non-zero exit code. This is why unhandled rejections can be so insidious. You might think you caught an error,...
Read more >Serverless Sentry - Serverless Framework: Plugins
Warn if your Lambda function is low on memory. Reports unhandled promise rejections. Catched and reports uncaught exceptions. Serverless, Sentry and as well ......
Read more >A Comprehensive Guide To Error Handling In Node.js
Errors happen in every application. Devs have to decide: do you write code to handle the error? Suppress it? Notify the user?
Read more >Using Sentry - Expo Documentation
Unless enableInExpoDevelopment: true is set, all your dev/local errors will be ignored and only app releases will report errors to Sentry. You can...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Still an issue!
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.