pichillilorenzo/flutter_inappwebview_examples

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

abdulahath opened this issue · 1 comments

  • 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.

Suddenly now it's working.