flutter_cache_manager icon indicating copy to clipboard operation
flutter_cache_manager copied to clipboard

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

Open programmer-mht opened this issue 3 years ago • 4 comments

🐛 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:

  • [ ] :robot: Android 12, 11, 9, 10
  • [ ] :iphone: iOS 15.3, 14.8.1, 15.4.1, 15.5, 12.5.5

programmer-mht avatar Jun 24 '22 11:06 programmer-mht

@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)

test0terter0n avatar Jun 24 '22 13:06 test0terter0n

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

adelarsq avatar Sep 27 '22 21:09 adelarsq

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

serraojoao avatar Jul 31 '23 15:07 serraojoao

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

adelarsq avatar Jul 31 '23 18:07 adelarsq