You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Start a download that runs approx. longer than 30s.
Background the app (i.e. home button, open other app)
Be on battery (no cable) for quicker fails. Also iPhones fail quicker than iPads. YMMV.
What is expected to happen?
The download continues until it's done
What does actually happen?
The download fails
The file is not created
neither success nor error handlers are called
Information
This seems to be a common issue for background tasks on cordova. Hence the existence of the background mode plugin, which doesn't work any more with modern OSes. See also Android doze.
I thought it might not apply because i see several references to backgroundTaskID etc. in the code, which the general docs about background execution talk about. But I'm too unfamiliar with iOS dev to really tell.
I thought the "background fetch" capability would solve this, but nope. Might need a specific implementation to work.
At the very least, the error callback should fire.
For now I guess I'll have to add a hint: "Please don't close the app while download is running"... (or remember that I had started a download, an then onforeground check if it is still running, check if the file is there... oof, heuristic headaches)
Environment, Platform, Device
I think only iOS, Android needs more testing.
Version information
cordova 11.0.0
cordova-ios 6.2.0
current dev version of this plugin 7ba6fa3 (but also 5ed73ae)
cordova-plugin-file 7.0.0 (but also 5.0.0)
Xcode 13.1
iOS 15.4.1, 16(.1 iirc), 12.3.1 (I think. It looks like that one has just trained itself for longer exec times, sigh)
Checklist
I searched for existing GitHub issues
I updated all Cordova tooling to most recent version
I included all the necessary information above
The text was updated successfully, but these errors were encountered:
Could be a duplicate of #321 but note that this is primarily not about request time-outs (in the http or network sense) and not related to file size, only execution time.
Bug Report
Problem
Reproduce:
What is expected to happen?
What does actually happen?
Information
backgroundTaskID
etc. in the code, which the general docs about background execution talk about. But I'm too unfamiliar with iOS dev to really tell.Environment, Platform, Device
I think only iOS, Android needs more testing.
Version information
Checklist
The text was updated successfully, but these errors were encountered: