flutter_cached_network_image icon indicating copy to clipboard operation
flutter_cached_network_image copied to clipboard

FormatException: Unexpected end of input (at character 1)^

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

FormatException: Unexpected end of input (at character 1)^; #0      _ChunkedJsonParser.fail (dart:convert-patch/convert_patch.dart:1405)#1      _ChunkedJsonParser.close (dart:convert-patch/convert_patch.dart:523)#2      _parseJson (dart:convert-patch/convert_patch.dart:41)#3      JsonDecoder.convert (dart:convert/json.dart:506)#4      JsonCodec.decode (dart:convert/json.dart:157)#5      jsonDecode (dart:convert/json.dart:96)#6      JsonCacheInfoRepository._readFile (package:flutter_cache_manager/src/storage/cache_info_repositories/json_cache_info_repository.dart:144)<asynchronous suspension>#7      JsonCacheInfoRepository.open (package:flutter_cache_manager/src/storage/cache_info_repositories/json_cache_info_repository.dart:41)<asynchronous suspension>#8      CacheStore._getCacheDataFromDatabase (package:flutter_cache_manager/src/cache_store.dart:110)<asynchronous suspension>

As i've just mentioned here: https://github.com/Baseflow/flutter_cached_network_image/issues/656, i'll be good to wrap all file/json operations into try catch to avoid creating unhandled errors. Unfortunately, i can not reproduce this issue but it happens with users of my application.

By the way i use errorWidget for all CachedNetworkImages image

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