dio
dio copied to clipboard
FileSystemException: Cannot delete file
New Issue Checklist
- [x] I have searched for a similar issue in the project and found none
Issue Info
Info | Value | |
---|---|---|
Platform Name | e.g. flutter / ios / android | flutter |
Platform Version | e.g. 1.5.0 / 12.0 / 9.0 | 2.10.0 |
Dio Version | e.g. 2.1.0 / 1.0.17 | 4.0.4 |
Issue Description and Steps
In the Crashlytics
I see next exception:
Exception: io.flutter.plugins.firebase.crashlytics.FlutterError
Exception: Unexpected api error happened: FileSystemException: Cannot delete file, path = '/data/user/0/my.app.package/app_flutter/audio/91/0.mp3' (OS Error: No such file or directory, errno = 2). Error thrown null.
._rootRunUnary (.java)
DioForNative.download._closeAndDelete (dio_for_native.dart:158)
DioForNative.download.<fn> (dio_for_native.dart:225)
I am using download method for mp3 files:
_dio.download(
'url here',
'file path here',
);
Any ideas why this can happen or how to fix it?
@wendux any help on this would be highly appreciated 🙏
reported the same thing on Sentry
I believe this has already been solved by #1393?