flutter_cached_network_image icon indicating copy to clipboard operation
flutter_cached_network_image copied to clipboard

Crashlytics fatal error: Connection reset by peer

Open AndrewKatyushin opened this issue 2 years ago • 4 comments

🐛 Bug Report

Firstly, thank you for the wonderful package Secondly, my problem)

We are using CacheNetworkImage in our application and recently we had several Crashlytics crashes with description " Connection reset by peer". It is look like this issue https://github.com/flutter/flutter/issues/112706. Screenshot 2022-12-01 at 16 04 48

The application has screen with list of products and screen with detail information about product. Both of screens use CacheNetworkImage. I don't know why but fatal error occurs on detail screen and have tried to reproduce the crash but i wouldn't be lucky. I can guess that it happens because MultiImageStreamCompleter doesn't cancel a subscription codec.listen((event). Possibly the error occurs when the subscription is still alive but _listeners is empty. In this case MultiImageStreamCompleter can't handle an exception in reportError function:

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

May be need to call cancel method in __maybeDispose for the subscription? Like it is done with _chunkSubscription?

Devices: Samsung, Xiaomi, Huawei, Vivo Platforms: Android 8, 10, 11, 12

AndrewKatyushin avatar Dec 01 '22 14:12 AndrewKatyushin

same issue , any soulution ?

NamBuiDanh2001 avatar Feb 21 '23 02:02 NamBuiDanh2001

same issue , any soulution ?

only if package will be changed, i think the package has to cancel codec.listen((event) in __maybeDispose

AndrewKatyushin avatar Feb 21 '23 07:02 AndrewKatyushin

Same

app-arianamini avatar Mar 29 '23 12:03 app-arianamini

have the same issue

AshishDoubleDotts avatar Nov 08 '23 07:11 AshishDoubleDotts