Baseflow / flutter_cache_manager

Generic cache manager for flutter
https://baseflow.com
MIT License
739 stars 427 forks source link

OS Error: No such file or directory, errno = 2 #383

Open programmer-mht opened 2 years ago

programmer-mht commented 2 years ago

🐛 Bug Report

FileSystemException: Cannot delete file, path = '/var/mobile/Containers/Data/Application/A293AAB5-BBED-44AD-8745-4473AEEE9FAD/Library/Caches/***AppCache/2144cf90-f178-11ec-a12a-35675c75ae1e.file' (OS Error: No such file or directory, errno = 2)
    _File._delete.<fn> (dart:io/file_impl.dart:283)
    _rootRunUnary (dart:async/zone.dart:1434)
    ForwardingFileSystemEntity.delete (package:file/src/forwarding/forwarding_file_system_entity.dart:66)
    CacheStore._removeCachedFile (package:flutter_cache_manager/src/cache_store.dart:190)

Reproduction steps

On test devices, the problem was not detected. Information obtained from crash analytics. After mapping user events with this error, no dependencies were found

Configuration

Version: Flutter 3.0.1 Tools • Dart 2.17.1 • DevTools 2.12.2

Platform:

test0terter0n commented 2 years ago

@programmer-mht hat same issue on some android devices! Non-fatal Exception: io.flutter.plugins.firebase.crashlytics.FlutterError: FileSystemException: Cannot delete file, path = '/data/user/0/[***]/311ba150-f11e-11ec-8ce2-29c3984eb3ac.jpg' (OS Error: No such file or directory, errno = 2). Error thrown null. at ._rootRunUnary(.java) at ForwardingFileSystemEntity.delete(forwarding_file_system_entity.dart:66) at CacheStore._removeCachedFile(cache_store.dart:190)

adelarsq commented 1 year ago

Same problem with some devices. This error was from a Galaxy S10+, but occurs with many others:

Fatal Exception: io.flutter.plugins.firebase.crashlytics.FlutterError: FileSystemException: Cannot delete file, path = '/data/user/0/br.com.ourcompany/cache/mycache/fab2cc30-3db5-11ed-b035-158479eb1e47.jpg' (OS Error: No such file or directory, errno = 2). Error thrown null.
       at ._rootRunUnary(.java)
       at ForwardingFileSystemEntity.delete(forwarding_file_system_entity.dart:66)
       at CacheStore._removeCachedFile(cache_store.dart:190)

Related: https://github.com/Baseflow/flutter_cache_manager/pull/370

serraojoao commented 11 months ago

is this issue still open? is t here any updates or workarrounds to it? thanks!

adelarsq commented 11 months ago

@serraojoao Waiting for https://github.com/Baseflow/flutter_cache_manager/pull/370. No workaround besides this so far.