-
-
Notifications
You must be signed in to change notification settings - Fork 220
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
Not all errors are caught by Sentry on Flutter Web #1891
Comments
A bit of clarification that did not fit in the previous comment by format: This is verified only on Flutter Web. Other platforms are not tested. I am not sure as to WHY this is happening, only that I observed this kind of behavior. As per the Flutter documentation, Sentry does what it should at first blick. I did, however find a relevant SDK issue: flutter/flutter#129595 The easiest workaround I found was to also provide a FlutterError callback as seen here: var currentOnError = FlutterError.onError;
FlutterError.onError = (details) {
debugPrint('**** FlutterError.onError invoked for:');
FlutterError.presentError(details);
if (currentOnError != null) {
currentOnError(details);
}
}; A quick win could be an update to docs, README and the onboarding wizard to let Flutter web users know about this? |
Thank you @daniel-v, highly appreciated! |
@daniel-v yeah documenting it sounds good, we have a flutter troubleshooting section at sentry-docs to which we can add the workaround |
Platform
Flutter Web
Obfuscation
Disabled
Debug Info
Disabled
Doctor
Flutter doctor
Version
7.16.1
Steps to Reproduce
Follow the instructions of setting Sentry up on its
Expected Result
Callback errors such as the code sample below is caught by Sentry and reported.
Actual Result
Sentry does not capture the error and never reports it.
Are you willing to submit a PR?
Yes
The text was updated successfully, but these errors were encountered: