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

errorListener not catching all errors #912

Open
kirill-21 opened this issue Jan 5, 2024 · 2 comments
Open

errorListener not catching all errors #912

kirill-21 opened this issue Jan 5, 2024 · 2 comments

Comments

@kirill-21
Copy link

kirill-21 commented Jan 5, 2024

PathAccessException: Cannot delete file, path = 'C:\Users\7636~1\AppData\Local\Temp\libCachedImageData\a1ae03b0-5abe-1dd1-8533-276b5a6910cc.png' (OS Error: Отказано в доступе., errno = 5); 
#0      _checkForErrorResponse (dart:io/common.dart:55)
#1      _File._delete.<anonymous closure> (dart:io/file_impl.dart:315)<asynchronous suspension>
#2      ForwardingFileSystemEntity.delete (package:file/src/forwarding/forwarding_file_system_entity.dart:66)<asynchronous suspension>
#3      CacheStore._removeCachedFile (package:flutter_cache_manager/src/cache_store.dart:187)<asynchronous suspension>
PathNotFoundException: Cannot delete file, path = 'C:\Users\7636~1\AppData\Local\Temp\libCachedImageData\2ed44830-61ef-1dd1-8533-276b5a6910cc.png' (OS Error: Не удается найти указанный файл., errno = 2); 
#0      _checkForErrorResponse (dart:io/common.dart:55)
#1      _File._delete.<anonymous closure> (dart:io/file_impl.dart:315)<asynchronous suspension>
#2      ForwardingFileSystemEntity.delete (package:file/src/forwarding/forwarding_file_system_entity.dart:66)<asynchronous suspension>
#3      CacheStore._removeCachedFile (package:flutter_cache_manager/src/cache_store.dart:187)<asynchronous suspension>
Exception: Invalid image data; #0      _futurize (dart:ui/painting.dart:6950)
#1      ImageDescriptor.encoded (dart:ui/painting.dart:6764)
#2      instantiateImageCodecWithSize (dart:ui/painting.dart:2307)
#3      FileImage._loadAsync (package:flutter/src/painting/image_provider.dart:1598)<asynchronous suspension>
FormatException: Unexpected character (at character 1)                                                                           ...^; 
#0      _ChunkedJsonParser.fail (dart:convert-patch/convert_patch.dart:1383)
#1      _ChunkedJsonParser.parseNumber (dart:convert-patch/convert_patch.dart:1250)
#2      _ChunkedJsonParser.parse (dart:convert-patch/convert_patch.dart:915)
#3      _parseJson (dart:convert-patch/convert_patch.dart:35)
#4      JsonDecoder.convert (dart:convert/json.dart:610)
#5      JsonCodec.decode (dart:convert/json.dart:216)
#6      jsonDecode (dart:convert/json.dart:155)
#7      JsonCacheInfoRepository._readFile (package:flutter_cache_manager/src/storage/cache_info_repositories/json_cache_info_repository.dart:143)<asynchronous suspension>
#8      JsonCacheInfoRepository.open (package:flutter_cache_manager/src/storage/cache_info_repositories/json_cache_info_repository.dart:40)<asynchronous suspension>
#9      CacheStore._getCacheDataFromDatabase (package:flutter_cache_manager/src/cache_store.dart:112)<asynchronous suspension>
FileSystemException: writeFrom failed, path = 'C:\Users\1\AppData\Roaming\com.swiftsoft\ExLoader\libCachedImageData.json' (OS Error: Недостаточно места на диске., errno = 112); 
#0      _checkForErrorResponse (dart:io/common.dart:55)
#1      _RandomAccessFile.writeFrom.<anonymous closure> (dart:io/file_impl.dart:884)<asynchronous suspension>
#2      JsonCacheInfoRepository._saveFile (package:flutter_cache_manager/src/storage/cache_info_repositories/json_cache_info_repository.dart:191)<asynchronous suspension>
FormatException: Unexpected character (at character 10837)...40823130,"length":1451183,"_id":36}]{"url":"https://data.exloader.net/im...

Hi, i've added an errors listener as mentioned in the update-log:
image
but it does not catch all errors and still throw a lot of stuff to PlatformDispatcher.instance.onError/FlutterError.onError callbacks.

@muhib349
Copy link
Contributor

muhib349 commented Jan 5, 2024

Can you please tell me how I can reproduce this issue?

@kirill-21
Copy link
Author

Have no idea, these are automatically send to server from users when they have this errors, personally, I've never faced this problems myself, but there are too many of this logs on the server

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

No branches or pull requests

2 participants