flutter_cached_network_image icon indicating copy to clipboard operation
flutter_cached_network_image copied to clipboard

FileSystemException: Cannot open file, path = 'C:\Users\User\AppData\Roaming\com.example\examole\libCachedImageData.json'

Open krll-kov opened this issue 4 years ago • 0 comments

Sometimes this error happens(Usually in release mode) with message that file is busy by some system entity.

 _File.open.<anonymous closure> (dart:io/file_impl.dart:356)#1      _rootRunUnary (dart:async/zone.dart:1436)<asynchronous suspension>#2      JsonCacheInfoRepository._saveFile (package:flutter_cache_manager/src/storage/cache_info_repositories/json_cache_info_repository.dart:191)<asynchronous suspension>

I think it will be good to wrap all file operations into try catch.

This is a very rare issue and i can not reproduce it by myself, but i have errors logging system by RunZodedGuarded and Flutter.onError and see that this happens with users of my app.

By the way i use errorWidget for all CachedNetworkImages image

krll-kov avatar Sep 30 '21 07:09 krll-kov