I was starting my app in flight mode (no internet connection) to check if cached network images would reload automatically when I turned internet access back on. The urls are stored in firestore, so not sure if the urls were cached or not.
(Firestore does automatically update data when internet is turned back on, but cached network images are only displayed when their widgets are reloaded)
When turning internet back on this exception happened:
I/flutter (10496): โโโก EXCEPTION CAUGHT BY IMAGE RESOURCE SERVICE โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
I/flutter (10496): The following FileSystemException was thrown resolving an image codec:
I/flutter (10496): Cannot open file, path = '/data/user/0/se.myapp/cache/libCachedImageData' (OS Error: Is
I/flutter (10496): a directory, errno = 21)
I/flutter (10496):
I/flutter (10496): When the exception was thrown, this was the stack:
I/flutter (10496): #0 _File.open.<anonymous closure> (dart:io/file_impl.dart:364:9)
I/flutter (10496): (elided 13 frames from package dart:async)
I/flutter (10496): ...
I/flutter (10496):
I/flutter (10496): Path: /data/user/0/se.myapp/cache/libCachedImageData
I/flutter (10496): โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
I'm also having this issue. This is the most common error in my Firebase Crashlytics service.
Do you have any idea why or when this happens? The path in the exception is the folder where the files should be put in.
If I remember correctly the issue might happen after upgrading
cached_network_image from an old version
Den tis 5 nov. 2019 07:47Rene Floor notifications@github.com skrev:
Do you have any idea why or when this happens? The path in the exception
is the folder where the files should be put in.โ
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/renefloor/flutter_cached_network_image/issues/252?email_source=notifications&email_token=AAHZACTSZEZAQQVGBZRYGILQSEJIVA5CNFSM4I4FRZWKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDBYYQI#issuecomment-549686337,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAHZACV4UVQ47MKHFAMNSY3QSEJIVANCNFSM4I4FRZWA
.
Even I am facing this issue a lot with the new plugin update.
Same thing on version 2.0.0
Same error with:
cached_network_image: ^2.0.0
If you have a reproducable example that would be great, because I'm not sure where this is going wrong.
I also get the expeption. But when I restart the app it's working. The issue only appears sometimes.
When it's happen I get:
โโโโโโโโ Exception caught by image resource service โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
The following FileSystemException was thrown resolving an image codec:
Cannot open file, path = '/data/user/0/devnik.dev_releases/cache/libCachedImageData/31e512d0-6c49-11ea-dc7d-c3a13eec1fc5.octet-stream' (OS Error: No such file or directory, errno = 2)
When the exception was thrown, this was the stack:
#0 _File.open.<anonymous closure> (dart:io/file_impl.dart:366:9)
(elided 13 frames from package dart:async)
Path: /data/user/0/devnik.dev_releases/cache/libCachedImageData/31e512d0-6c49-11ea-dc7d-c3a13eec1fc5.octet-stream
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Why it tries to open a .octet-stream file? Its a normal image.
Someone knows a workaround to refresh the cached images if it fails ?
I also use cached_network_image: ^2.0.0
If I restart the app and the app is able to read the cached file I get (it can read the .png file instead of .octet-stream):

Debugged in flutter\flutter\packages\flutter\lib\src\painting\image_provider.dart (line: 649)
i get the same behavior as @devonik , any updates on this ?
i get the same behavior as @devonik , any updates on this ?
No solution right now. I will try to use another library cache_image. It comes with firebase support and reloading if failed
Same issue here, but I trying to download a PDF file..
I also get the expeption. But when I restart the app it's working. The issue only appears sometimes.
When it's happen I get:
โโโโโโโโ Exception caught by image resource service โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ The following FileSystemException was thrown resolving an image codec: Cannot open file, path = '/data/user/0/devnik.dev_releases/cache/libCachedImageData/31e512d0-6c49-11ea-dc7d-c3a13eec1fc5.octet-stream' (OS Error: No such file or directory, errno = 2) When the exception was thrown, this was the stack: #0 _File.open.<anonymous closure> (dart:io/file_impl.dart:366:9) (elided 13 frames from package dart:async) Path: /data/user/0/devnik.dev_releases/cache/libCachedImageData/31e512d0-6c49-11ea-dc7d-c3a13eec1fc5.octet-stream โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโWhy it tries to open a .octet-stream file? Its a normal image.
Someone knows a workaround to refresh the cached images if it fails ?
I also use
cached_network_image: ^2.0.0If I restart the app and the app is able to read the cached file I get (it can read the .png file instead of .octet-stream):
Debugged influtter\flutter\packages\flutter\lib\src\painting\image_provider.dart (line: 649)
i have same issue
did you Solve it?
Most helpful comment
I also get the expeption. But when I restart the app it's working. The issue only appears sometimes.
When it's happen I get:
Why it tries to open a .octet-stream file? Its a normal image.
Someone knows a workaround to refresh the cached images if it fails ?
I also use
cached_network_image: ^2.0.0If I restart the app and the app is able to read the cached file I get (it can read the .png file instead of .octet-stream):
Debugged in
flutter\flutter\packages\flutter\lib\src\painting\image_provider.dart (line: 649)