Firebase crash report because of "Connection closed before full header was received"
🐛 Bug Report
This packages have some trouble when download multiple images on the same view.
This bug is evident when use this config on your app to log the error on Firebase Crashlytics:
FlutterError.onError = FirebaseCrashlytics.instance.recordFlutterFatalError;
So, how can we care of it to avoid those crashs ?
Fatal Exception: io.flutter.plugins.firebase.crashlytics.FlutterError: Connection closed before full header was received. Error thrown Instance of 'aA'.\
at .#0 FirebaseCrashlytics.recordError (package:firebase_crashlytics/src/firebase_crashlytics.dart:119:22)
at .#1 FirebaseCrashlytics.recordFlutterError (package:firebase_crashlytics/src/firebase_crashlytics.dart:141:12)
at .#2 FirebaseCrashlytics.recordFlutterFatalError (package:firebase_crashlytics/src/firebase_crashlytics.dart:156:12)
at .#3 FirebaseCrashlytics.recordFlutterFatalError (package:firebase_crashlytics/src/firebase_crashlytics.dart:154:3)
at .#4 FlutterError.reportError (package:flutter/src/foundation/assertions.dart:1184:14)
at .#5 ImageStreamCompleter.reportError (package:flutter/src/painting/image_stream.dart:733:20)
at .#6 new MultiImageStreamCompleter.<anonymous closure> (package:cached_network_image/src/image_provider/multi_image_stream_completer.dart:32:7)
at .#7 _RootZone.runBinaryGuarded (dart:async/zone.dart:1598:10)
at .#8 _BufferingStreamSubscription._sendError.sendError (dart:async/stream_impl.dart:358:15)
at .#9 _BufferingStreamSubscription._sendError (dart:async/stream_impl.dart:376:7)
at .#10 _BufferingStreamSubscription._addError (dart:async/stream_impl.dart:280:7)
at .#11 _SyncStreamControllerDispatch._sendError (dart:async/stream_controller.dart:778:19)
at .#12 _StreamController._addError (dart:async/stream_controller.dart:656:7)
at .#13 _StreamController.addError (dart:async/stream_controller.dart:610:5)
at .#14 _AsyncStarStreamController.addError (dart:async-patch/async_patch.dart:227:16)
at .#15 _SuspendState._handleException (dart:async-patch/async_patch.dart:564:20)
at .#16 _SuspendState._createAsyncCallbacks.thenCallback (dart:async-patch/async_patch.dart:344:7)
at .#17 _RootZone.runUnary (dart:async/zone.dart:1653:54)
at .#18 _FutureListener.handleValue (dart:async/future_impl.dart:147:18)
at .#19 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:766:45)
at .#20 Future._propagateToListeners (dart:async/future_impl.dart:795:13)
at .#21 Future._completeWithValue (dart:async/future_impl.dart:566:5)
at .#22 Future._asyncCompleteWithValue.<anonymous closure> (dart:async/future_impl.dart:639:7)
at .#23 _microtaskLoop (dart:async/schedule_microtask.dart:40:21)
at .#24 _startMicrotaskLoop (dart:async/schedule_microtask.dart:49:5)
at .#25 _startMicrotaskLoop (dart:async/schedule_microtask.dart:44:1)
My environment
environment:
sdk: ">=2.18.0 <3.0.0"
flutter: "3.3.0"
Expected behavior
Do not crash
Reproduction steps
Create a page with a lot of images and open this page. Some of those images will not be loaded
Configuration
Version: cached_network_image: ^3.2.2
Platform:
- [x] :iphone: iOS
- [x] :robot: Android
The same issue facing with multiple devices. Customer can not visible images sometimes in the grid.
Have a similar issue in crashlytics, but non-fatal
I'm facing the same issue
any solution to this issue?
any updates?
Any update yet?
For those who are getting these crash as fatal crash. https://medium.com/@rishyash8/flutter-firebase-crash-report-because-of-connection-closed-before-full-header-was-received-7ace6e84bc5d
any updates ???
@Rishyash
For those who are getting these crash as fatal crash. https://medium.com/@rishyash8/flutter-firebase-crash-report-because-of-connection-closed-before-full-header-was-received-7ace6e84bc5d
By doing this you're ignoring this exceptions and not logging them into Firebase Crashlytics. I think we need, with this issue, is a resolution to not throw an exception and loads the image correctly.
@Rishyash
For those who are getting these crash as fatal crash. https://medium.com/@rishyash8/flutter-firebase-crash-report-because-of-connection-closed-before-full-header-was-received-7ace6e84bc5d
By doing this you're ignoring this exceptions and not logging them into Firebase Crashlytics. I think we need, with this issue, is a resolution to not throw an exception and loads the image correctly.
https://medium.com/@rishyash8/how-to-load-network-image-in-flutter-with-retry-functionality-837db9809662 this might help
any updates ???
https://medium.com/@rishyash8/how-to-load-network-image-in-flutter-with-retry-functionality-837db9809662