nextcloud / android

📱 Nextcloud Android app
https://play.google.com/store/apps/details?id=com.nextcloud.client
GNU General Public License v2.0
4.09k stars 1.74k forks source link

Changing settings does not affect already queued upload jobs #2018

Open W-Hamra opened 6 years ago

W-Hamra commented 6 years ago

Actual behaviour

The preference of whether uploading should be done over only Wifi or allow mobile data is stored into every queued job, instead of getting polled from the folder preferences. If a job is already queued, it will get queued using the initial settings that were set during its creation. Any changes to the settings after that are ignored.

Expected behaviour

-A job belonging to the autoupload of a certain folder should poll the current settings of that folder to know how to proceed, not insist on using the settings that existed during the job creation.

Steps to reproduce

-Have the Camera folder set to autoupload using Wifi only. -Turn off Wifi -Take a bunch of photos. -You notice they are in the queue, but waiting for Wifi to upload -Go to Camera autoupload preferences, switch off the "wifi only" option, to allow mobile data uploads. -The queued jobs would still wait for Wifi. -Taking a new photo will instantly upload over mobile data. But already queued ones will wait indefinetly till Wifi is turned on.

Workaround: Move the files to a temp folder. Force rescan, all jobs will fail as files are now missing. Copy the files to their original folder (moving for some reason didn't work, does the app keep inodes or something?), the App will now recreate the upload jobs using new settings. Once upload completes, delete temp folder.

Environment data

Android version: 7

Device model: Samsung Note 8

Stock or customized system: Stock, December security update.

Nextcloud app version: 2.0.0

Nextcloud server version: 12.0.4

AndyScherzinger commented 6 years ago

@W-Hamra thanks for reporting this issue, can you give 3.0.0 RC1+ a try since I think this has been fixed for the next release.

mario commented 6 years ago

Nop, nobody touched this.

On Mon, 22 Jan 2018 at 09:17, Andy Scherzinger notifications@github.com wrote:

@W-Hamra https://github.com/w-hamra thanks for reporting this issue, can you give 3.0.0 RC1+ a try since I think this has been fixed for the next release.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/nextcloud/android/issues/2018#issuecomment-359352806, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAWsq2hW2Lqohhr2EZ6eFKiSVzznZ9Vks5tNEQdgaJpZM4Rl1t6 .

AndyScherzinger commented 6 years ago

Oh, okay. I thought you or @tobiasKaminsky added a check for wifi/charging etc. before doing the actual upload.

mario commented 6 years ago

Well it is indeed there but it relies on stored values. Doesnt query the synced folder prefs

On Mon, 22 Jan 2018 at 09:21, Andy Scherzinger notifications@github.com wrote:

Oh, okay. I thought you or @tobiasKaminsky https://github.com/tobiaskaminsky added a check for wifi/charging etc. before doing the actual upload. My mistake.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/nextcloud/android/issues/2018#issuecomment-359353525, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAWsnrFm9IZnzyi_xdpM4eHl7fWEzDzks5tNEUTgaJpZM4Rl1t6 .

tobiasKaminsky commented 6 years ago

I remember that there was a discussion about this, but I cannot find it. The question is: what is the expected behaviour? Shall queued jobs obey the current preferences or the preferences on creation time?

I would go for "obey current preferences", but this is more a gut feeling...

AndyScherzinger commented 6 years ago

I'd also go for obey to the current preferences since that is what the users see, anything else what need to be remembered by the user (impossible).

mario commented 6 years ago

I can do this for 3.1.

AndyScherzinger commented 6 years ago

Imho that would be awesome @mario and I'd also vote for 3.1 (as in not 3.0)

tobiasKaminsky commented 6 years ago

Yes, please 3.1 :-)

W-Hamra commented 6 years ago

Thanks a lot guys :)