Re: [PhoneGap] FileTransfer error when running in background

775 views
Skip to first unread message

Shazron

unread,
Jan 8, 2013, 6:20:14 PM1/8/13
to phonegap
What iOS version were you using when it worked?


On Tue, Jan 8, 2013 at 11:59 AM, Leif Ullman <leif....@gmail.com> wrote:
I've been running into an issue using FileTransfer on iOS that cropped up as part of my upgrade to Cordova 2.2.  Previously I had been on PhoneGap 1.2 (a long time between upgrades I know).  When using the 1.2 version, I could start a filetransfer upload (using sample code from here: http://docs.phonegap.com/en/2.2.0/cordova_media_capture_capture.md.html#Capture) and it would continue to run if I returned to the home screen or if I locked the device.  Now it appears that suspending the app will cause a FileTransferError to occur with error code 3 and error message "The request timed out".  Is there a workaround for this or is background uploading no longer supported?  

--
-- You received this message because you are subscribed to the Google
Groups "phonegap" group.
To post to this group, send email to phon...@googlegroups.com
To unsubscribe from this group, send email to
phonegap+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/phonegap?hl=en?hl=en
 
For more info on PhoneGap or to download the code go to www.phonegap.com
 
To compile in the cloud, check out build.phonegap.com
 
 

Leif Ullman

unread,
Jan 8, 2013, 10:36:18 PM1/8/13
to phon...@googlegroups.com
6.0.1, but it's been working on prior versions as it's been live since spring.  

Shazron

unread,
Jan 9, 2013, 2:30:49 PM1/9/13
to phonegap
Not sure what's going on. Seems like an iOS issue to me since Cordova has no control of cutting off network access when an app is backgrounded -- it could be a iOS config issue possibly.

Leif Ullman

unread,
Jan 9, 2013, 11:54:17 PM1/9/13
to phon...@googlegroups.com
Do you have any suggestions where to look if it was an iOS config issue?  The way I started my project was with the urban airship template (https://github.com/urbanairship/phonegap-ua-push) so my settings are whatever those defaults are. 

Shazron

unread,
Jan 10, 2013, 3:19:52 PM1/10/13
to phonegap
Probably something in here: http://developer.apple.com/library/ios/#documentation/iphone/conceptual/iphoneosprogrammingguide/ManagingYourApplicationsFlow/ManagingYourApplicationsFlow.html

Looks like the limit to finish up tasks is 5 seconds, the app has to request more time -- and come to think of it, FileTransfer does not do this currently (although the CDVLocalStorage plugin in onResignActive does: https://github.com/apache/cordova-ios/blob/master/CordovaLib/Classes/CDVLocalStorage.m#L378

If you want to file an enhancement request, that would be great.

Leif Ullman

unread,
Jan 10, 2013, 4:48:18 PM1/10/13
to phon...@googlegroups.com
You got it!  

https://issues.apache.org/jira/browse/CB-2190

Thanks for providing the links as well.
Reply all
Reply to author
Forward
0 new messages