Skip to content
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

HTTP Exception with status code 500 causing Fatal Exception #809

Closed
1 of 2 tasks
Dkrinker opened this issue Dec 25, 2022 · 1 comment
Closed
1 of 2 tasks

HTTP Exception with status code 500 causing Fatal Exception #809

Dkrinker opened this issue Dec 25, 2022 · 1 comment

Comments

@Dkrinker
Copy link

🐛 Bug Report

Looking for some help trouble shooting this.

The following error is being reported in Crashlytics.

Fatal Exception: FlutterError
HttpException: Invalid statusCode: 500, uri = http://10.37.1.72:8735/api/v1/images/9539e80-653-4e5e-80cc-0f43db5d3c22. Error thrown Instance of 'ErrorDescription'.

Crashlytics Keys Info

flutter_error_exception
HttpException: Invalid statusCode: 500, uri = http://10.37.1.72:8735/api/v1/images/9e539e80-6f53-4e5e-80cc-0f43db5d3c22

flutter_error_reason
thrown HttpException: Invalid statusCode: 500, uri = http://10.37.1.72:8735/api/v1/images/9e539e80-6f53-4e5e-80cc-0f43db5d3c22. Error thrown Instance of 'ErrorDescription'.

Q: What does it mean when it says "Error thrown Instance of 'ErrorDescription'"?

Unfortunately, I do not have access to this site where the issue is happening.

Here is the Stack Trace

Fatal Exception: FlutterError
0 ??? 0x0 FirebaseCrashlytics.recordError+ 119 (firebase_crashlytics. dart:119)
1 ??? 0x0 FirebaseCrashlytics.recordFlutterError+ 145 (firebase_crashlytics.dart:145)
2 ??? 0x0 FirebaseCrashlytics.recordFlutterFatalError + 158 (firebase_crashlytics.dart:158)
3 ??? 0x0 FlutterError. reportError + 1184 (assertions.dart: 1184)
4 ??? 0x0 ImageStreamCompleter.reportError + 733 (image_stream.dart:733)
5 ??? 0x0 new MultiImageStreamCompleter. + 32 (multi_image_stream_completer.dart:32)
6 ??? 0x0 -AsyncStarStreamController.addError(dart:async)
7 ??? 0x0 new MultiImageStreamCompleter. + 25 (multi_image_stream_completer. dart:25)

It seems like the error is being raised here (in multi_image_stream_controller.dart line 32).

onError: (dynamic error, StackTrace stack) {
reportError(
context: ErrorDescription('resolving an image codec'),
exception: error,
stack: stack,
informationCollector: informationCollector,
silent: true,
);

Apparently, there are no listeners in the ImageStreamCompleter reportError handler so it calling the FlutterError.reportError (in assertions.dart line 1184)

if (!handled) {
FlutterError.reportError(_currentError!);
}

Where it fails the assertion verifying the passed arguments?

static void reportError(FlutterErrorDetails details) {
assert(details != null);
assert(details.exception != null);
onError?.call(details);
}

Flutter Information

[✓] Flutter (Channel stable, 3.3.10, on macOS 13.1 22C65 darwin-x64, locale en-US)
• Flutter version 3.3.10 on channel stable at xxx
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 135454af32 (10 days ago), 2022-12-15 07:36:55 -0800
• Engine revision 3316dd8728
• Dart version 2.18.6
• DevTools version 2.15.0

[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 14C18
• CocoaPods version 1.11.3

Would appreciate any insight.

Expected behavior

Reproduction steps

Configuration

Version: 1.x

Using cached_network_image: ^3.2.3

Platform:

  • 📱 iOS
  • 🤖 Android
@Dkrinker
Copy link
Author

Never mind. It is not failing on the assertion, it looks like it is calling the Flutter error handler and Crashlytics is reporting a fatal error.

It seems like I need to update the handler to check the "silent" property and ignore these when set, otherwise forward to the Crashlytics error handler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant