Baseflow / Baseflow/flutter_cached_network_image
FormatException: Unexpected end of input (at character 1)^
- Dominant language
- Dart
- Stars
- 2.6k
- Forks
- 731
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 1
Description
```
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)#7 JsonCacheInfoRepository.open (package:flutter_cache_manager/src/storage/cache_info_repositories/json_cache_info_repository.dart:41)#8 CacheStore._getCacheDataFromDatabase (package:flutter_cache_manager/src/cache_store.dart:110)
```
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

Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.