File tree Expand file tree Collapse file tree 4 files changed +13
-10
lines changed Expand file tree Collapse file tree 4 files changed +13
-10
lines changed Original file line number Diff line number Diff line change 11# Changelog
22
3+ ## Unreleased
4+
5+ ### Fixes
6+
7+ - Capture Future errors for Flutter Web automatically ([ #1143 ] ( https://github.com/getsentry/sentry-dart/pull/1143 ) )
8+
39## 6.16.1
410
511### Fixes
Original file line number Diff line number Diff line change @@ -60,11 +60,6 @@ class FlutterErrorIntegration extends Integration<SentryFlutterOptions> {
6060 final mechanism = Mechanism (
6161 type: 'FlutterError' ,
6262 handled: true ,
63- data: {
64- if (flutterErrorDetails.isNotEmpty)
65- 'hint' :
66- 'See "flutter_error_details" down below for more information'
67- },
6863 );
6964 final throwableMechanism = ThrowableMechanism (mechanism, exception);
7065
Original file line number Diff line number Diff line change @@ -52,7 +52,13 @@ mixin SentryFlutter {
5252
5353 final platformDispatcher = PlatformDispatcher .instance;
5454 final wrapper = PlatformDispatcherWrapper (platformDispatcher);
55- final isOnErrorSupported = wrapper.isOnErrorSupported (flutterOptions);
55+
56+ // Flutter Web don't capture [Future] errors if using [PlatformDispatcher.onError] and not
57+ // the [runZonedGuarded].
58+ // likely due to https://github.com/flutter/flutter/issues/100277
59+ final isOnErrorSupported = flutterOptions.platformChecker.isWeb
60+ ? false
61+ : wrapper.isOnErrorSupported (flutterOptions);
5662
5763 // first step is to install the native integration and set default values,
5864 // so we are able to capture future errors.
Original file line number Diff line number Diff line change @@ -56,8 +56,6 @@ void main() {
5656 final throwableMechanism = event.throwableMechanism as ThrowableMechanism ;
5757 expect (throwableMechanism.mechanism.type, 'FlutterError' );
5858 expect (throwableMechanism.mechanism.handled, true );
59- expect (throwableMechanism.mechanism.data['hint' ],
60- 'See "flutter_error_details" down below for more information' );
6159 expect (throwableMechanism.throwable, exception);
6260
6361 expect (event.contexts['flutter_error_details' ]['library' ], 'sentry' );
@@ -92,8 +90,6 @@ void main() {
9290 final throwableMechanism = event.throwableMechanism as ThrowableMechanism ;
9391 expect (throwableMechanism.mechanism.type, 'FlutterError' );
9492 expect (throwableMechanism.mechanism.handled, true );
95- expect (throwableMechanism.mechanism.data['hint' ],
96- 'See "flutter_error_details" down below for more information' );
9793
9894 expect (event.contexts['flutter_error_details' ]['library' ], 'sentry' );
9995 expect (event.contexts['flutter_error_details' ]['context' ],
You can’t perform that action at this time.
0 commit comments