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

[ ios only ] flutter: Failed to open downloaded file. Reason: not found task corresponding to given task id #6

Closed
2 tasks done
abdulahath opened this issue Jan 13, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@abdulahath
Copy link

  • I have read the Getting Started section
  • I have already searched for the same problem

Environment

Technology Version
Project Example Name
Flutter version 3.3.10
Plugin version 6.0.0-beta.22
Android version
iOS version 12.4 & 16.2 simulator
macOS version 12.6.2
Xcode version 14.2

Device information: ios simulator 12.4 & 16.2

Description

Expected behavior:

I am trying to implement the download feature using flutter_downloader 1.10.1 for my flutter inappwebview app. I referred the [inappwebview download example] & flutter_downloader official github example. After many trial & errors, finally my flutter webview app can download any file.

For opening the downloaded files automatically after the download completed, i wrote a code mentioned below (See the full code of myWebViewWidget.dart to understand the below code's usage)

Future.delayed(Duration(seconds: 3), () { FlutterDownloader.open(taskId: taskId); });

Current behavior:

However the downloaded files are opening only on the android phones.( tested on physical phones android 6, 10,11). But on the ios simulators (ios 12.4 , ios 16.2 ) downloaded files are not opening and giving an error message on console regarding the "opening of downloaded file".

flutter: Failed to open downloaded file. Reason: not found task corresponding to given task id

refer the gist file of ios 12.4 & gist file of ios 16.2 for full console messages regarding the opening of downloaded file.

refer the attached images of Error screenshots

  1. ios 12.4
  2. ios 16.2

More than that when i open the downloaded file through the ios simulator in-built "Files" app

on ios 12.4 , it's says an error that "The file doesn't exists". Refer the screenshot of error
on ios 16.2 , it's openable & also copy,move,share also possible.

Steps to reproduce

refer my full codes at gist.

@abdulahath abdulahath added the bug Something isn't working label Jan 13, 2023
@abdulahath abdulahath changed the title [ ios only ] Flutter Downloader couldn't open the file after download [ ios only ] flutter: Failed to open downloaded file. Reason: not found task corresponding to given task id Jan 19, 2023
@abdulahath
Copy link
Author

Suddenly now it's working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant