Autoupload doesn't finish properly
- latest beta from test flight (2.17 36)
- having files in the upload queue
- expected: they are uploaded
- actual: some are uploaded but then the phone went into "screen locked mode" and since then those entries are not uploaded anymore
Maybe related to #172
cc @marinofaggiana
Hi @MorrisJobke, I don't understand, the file are in queue but don't start ?
Yep - I need to disable auto upload and upload the files manually afterwards :/ quite annoying because you first need to check which files are missing
Background Transfer Considerations
The NSURLSession class supports background transfers while your app is suspended. Background transfers are provided only by sessions created using a background session configuration object (as returned by a call to backgroundSessionConfiguration:).
With background sessions, because the actual transfer is performed by a separate process and because restarting your app’s process is relatively expensive, a few features are unavailable, resulting in the following limitations:
The session must provide a delegate for event delivery. (For uploads and downloads, the delegates behave the same as for in-process transfers.) Only HTTP and HTTPS protocols are supported (no custom protocols). Redirects are always followed. Only upload tasks from a file are supported (uploading from data objects or a stream will fail after the program exits). If the background transfer is initiated while the app is in the background, the configuration object’s discretionary property is treated as being true.
== is the iOS that decide (memory, battery, wi-fi etc) ...
P.S. the NSURLSession is the low level system for comunicate via HTTP, Apple advise against the upload/download of several file in background mode but ONLY one file of big dimension. (see drop...x system).
P.S. Next release I want introduce lock record in DB for view the files that are ready in upload queue, but this required time.
This was not limited to background only. I could leave the app open after the app was send into background while uploading and then no other files were uploaded even if the app was in the foreground.
sorry, I don't understand where is the problem ...
This is what happened:
- I had 51 files to upload (little badge on the lower left)
- I opened the app
- some files were uploaded
- the phone went into sleep mode (19 files left)
- I unlocked the phone
- the Nextcloud app had the "19" badge
- I opened the Nextcloud app
- the badge on the lower left showed 19 as well
- no upload happened - I left the app open and the phone unlocked for 15 minutes in proper wifi - even tried to disconnect and reconnect to the wifi
0 upload view on Transfer ? but 19 on badge ?
0 upload view on Transfer ? but 19 on badge ?
Yep - that was the weird thing. I disabled auto upload and the 19 vanished. Then I re-enabled it and manually added the files :/ Then kept the app open until it finished.
:/ understanding difficult
:/ understanding difficult
https://github.com/nextcloud/ios/issues/173#issuecomment-292998645 <- this is what happened. What do I need to explain again? Where do you have problems?
My problem it's know where is the problem 😄
@MorrisJobke if it happens again, terminates the Nextcloud iOS
https://support.apple.com/en-gb/HT201330
and reopen, this procedure clear the queue in memory and reload the record-upload from DB
@MorrisJobke if it happens again, terminates the Nextcloud iOS
I will do and report back.
This also happened to me once using the new beta app but I couldn't reproduce the problem, which makes me wonder how does Owncloud is doing this? because I remember back then when I was using the owncloud app, the app would upload my images after detecting a new entry in the camera roll even if the app was running in the background.
In easier words, you could also upload files automatically if the app was open in the background.
I have found a possible issue ... we will work
Little bugfix build 38
Doesn't happened anymore