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

BaseCacheManager.getFile (package:flutter_cache_manager/src/cache_manager.dart:120:11) #216

Closed
yxwandroid opened this issue Jul 30, 2019 · 11 comments

Comments

@yxwandroid
Copy link

image

@renefloor
Copy link
Contributor

What's the problem? Does the app crash or do you not want this to get printed in the logs?

@hillelcoren
Copy link

Is there a way to hide these sorts of errors (also 404s)?

@yrom
Copy link

yrom commented Aug 23, 2019

@renefloor The exception thrown by method BaseCacheManager.getFile was unhandled as expected.

@JulianHorst
Copy link

+1, we're having the same issue occurring on many of our sessions. We don't fully grasp what this leads to currently.

Non-fatal Exception: java.lang.Exception
Connection closed while receiving data
BaseCacheManager.getFile (cache_manager.dart:120)
CachedNetworkImageState._animatedWidget (cached_image_widget.dart:270)

@Gi-lo
Copy link

Gi-lo commented Aug 28, 2019

Furthermore, we are not quite sure how and where we should handle it correctly.

@yrom
Copy link

yrom commented Aug 29, 2019

I found this issue was happend in this case: the CachedNetworkImageState rebuild with a new image url, for e.g., in a fastscrolling listview, and then the underlying Stream of getting file for the old url in StreamBuilder has been unsubscribed, but that Stream may throw an exception, the unhandled exception.
The getFile stream should be cancelled, not unsubscribed.

@dungnv2602
Copy link

Any update on this issue? Seeing this error on console all the time is really annoying.

@babang1da
Copy link

same problem

@FCMHUB
Copy link

FCMHUB commented Sep 6, 2019

Same...

@charleshan
Copy link

@yrom's pull request fixes the problem for me.

Here's a temporary solution until the pull request gets merged or until further discussion.

dependencies:
  cached_network_image: ^1.1.1
  flutter_cache_manager: ^1.1.1

dependency_overrides:
  flutter_cache_manager:
    git:
      url: https://github.com/yrom/flutter_cache_manager
      ref: feature/close-stream-on-cancel

@renefloor
Copy link
Contributor

duplicate of #273

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

Successfully merging a pull request may close this issue.

10 participants