fluttercommunity / fluttercommunity/flutter_downloader
Issue while Opening the file
- Dominant language
- Kotlin
- Stars
- 940
- Forks
- 561
- Avg merge
- 1h 18m
- Merged PRs (30d)
- 1
Description
When Opening the file throws error.
java.lang.IllegalArgumentException: Failed to find configured root that contains /data/data/com.example.example/cache/SubaruOutbackOnStreetAndDirt.mp4
The, directory where the file exist is only "data/com.example.example/cache/SubaruOutbackOnStreetAndDirt.mp4" but when opening the file it prints extra "data" in the path
**To Reproduce*
```
await FlutterDownloader.open(taskId: taskID)
```
Steps to reproduce the behavior:
1. Use FlutterDownloader.open(taskId: '$String') method
**Expected behavior**
Should open the existed file, but throws exception.
**Log**
The full log is :
E/MethodChannel#vn.hunghd/downloader( 4630): Failed to handle method call
E/MethodChannel#vn.hunghd/downloader( 4630): java.lang.IllegalArgumentException: Failed to find configured root that contains /data/data/com.example.example/cache/SubaruOutbackOnStreetAndDirt.mp4
E/MethodChannel#vn.hunghd/downloader( 4630): at androidx.core.content.FileProvider$SimplePathStrategy.getUriForFile(FileProvider.java:825)
E/MethodChannel#vn.hunghd/downloader( 4630): at androidx.core.content.FileProvider.getUriForFile(FileProvider.java:450)
E/MethodChannel#vn.hunghd/downloader( 4630): at vn.hunghd.flutterdownloader.IntentUtils.buildIntent(IntentUtils.kt:19)
E/MethodChannel#vn.hunghd/downloader( 4630): at vn.hunghd.flutterdownloader.IntentUtils.validatedFileIntent(IntentUtils.kt:36)
E/MethodChannel#vn.hunghd/downloader( 4630): at vn.hunghd.flutterdownloader.FlutterDownloaderPlugin.open(FlutterDownloaderPlugin.kt:369)
E/MethodChannel#vn.hunghd/downloader( 4630): at vn.hunghd.flutterdownloader.FlutterDownloaderPlugin.onMethodCall(FlutterDownloaderPlugin.kt:66)
E/MethodChannel#vn.hunghd/downloader( 4630): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:267)
E/MethodChannel#vn.hunghd/downloader( 4630): at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:292)
E/MethodChannel#vn.hunghd/downloader( 4630): at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:319)
E/MethodChannel#vn.hunghd/downloader( 4630): at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12)
E/MethodChannel#vn.hunghd/downloader( 4630): at android.os.Handler.handleCallback(Handler.java:959)
E/MethodChannel#vn.hunghd/downloader( 4630): at android.os.Handler.dispatchMessage(Handler.java:100)
E/MethodChannel#vn.hunghd/downloader( 4630): at android.os.Looper.loopOnce(Looper.java:232)
E/MethodChannel#vn.hunghd/downloader( 4630): at android.os.Looper.loop(Looper.java:317)
E/MethodChannel#vn.hunghd/downloader( 4630): at android.app.ActivityThread.main(ActivityThread.java:8674)
E/MethodChannel#vn.hunghd/downloader( 4630): at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#vn.hunghd/downloader( 4630): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
E/MethodChannel#vn.hunghd/downloader( 4630): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:886)
I/flutter ( 4630): Failed to open downloaded file. Reason: Failed to find configured root that contains /data/data/com.example.example/cache/SubaruOutbackOnStreetAndDirt.mp4
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.