Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto upload queue continuously starting from the beginning again #10572

Open
4 tasks done
AdamantUnstable opened this issue Jul 28, 2022 · 10 comments
Open
4 tasks done

Auto upload queue continuously starting from the beginning again #10572

AdamantUnstable opened this issue Jul 28, 2022 · 10 comments
Labels
bug feature: auto upload hotspot: looping/duplicates Continuously looping upload queues or duplicate uploads

Comments

@AdamantUnstable
Copy link

⚠️ Before posting ⚠️

  • This is a bug, not a question or an enhancement.
  • I've searched for similar issues and didn't find a duplicate.
  • I've written a clear and descriptive title for this issue, not just "Bug" or "Crash".
  • I agree to follow Nextcloud's Code of Conduct.

Steps to reproduce

Install latest version of Nextcloud Android (3.20.3)
Enable auto upload with existing files

Expected behaviour

Auto upload finishes. In the event of a crash auto upload resumes from last file rather than restarting from scratch.

Actual behaviour

As described by others, the app crashes prior to finishing auto upload. The behaviour that does not seem to be described by others is that every time Nextcloud reattempts auto upload it restarts the entire queue and checks each file one by one, so the upload pending list keeps resetting. Already uploaded files are not reuploaded as far as I can tell but constantly getting rechecked over and over against the server version instead of just keeping a local log of successful uploads.

If this constant restarting behaviour was fixed then the crashing wouldn't be a big deal as Nextcloud would eventually finish uploading and would then become reasonably stable.

Android version

12

Device brand and model

Samsung Note 20 Ultra

Stock or custom OS?

Stock

Nextcloud android app version

3.20.3

Nextcloud server version

24.0.1.1

Using a reverse proxy?

Yes

Android logs

No response

Server error logs

No response

Additional information

Don't have adb set up or available

@svenb1234
Copy link

This does not only happen when it crashes. My impression is that there is a "retry timer" for failed uploads, e.g. because they cause a conflict. So if one has 1000 pictures to upload which cause a conflict each picture is tried, causes an error and is thus put into the "failed uploads section". If the 1000 pictures are not finished before the "retry timer" kicks in, they are queued again for upload. This causes an endless loop.

Expected behaviour: do not retry anything while there is still something in the upload queue. Start the "retry timer" only after the active queue is empty.

@stoically
Copy link

stoically commented Nov 6, 2022

Another observation: This also seems to happen when the android app loses connection to the server. I have a nightly cron job that restarts all docker containers, and sometimes the android app then gets stuck in an endless file check loop (HTTP 204). It's not reproducible, and the retrying stops after like 1-2 hours.

Also the app itself is mostly frozen when this happens.

Nextcloud server version: 25.0.0

@Cebrain
Copy link

Cebrain commented Dec 29, 2022

In the last month i also have the feeling this problems happens more and more.
My phone runs normally fine with the auto upload but i think since upgrade to Android 13 i see the reupload and File conflict dialogs much more often.

@Killea
Copy link

Killea commented May 23, 2023

still have this issue with:
android 3.24.2 and PHP 26.0.1

@dobos
Copy link

dobos commented May 31, 2023

Same issue here, Android app 3.24.2, server running the latest docker image. Look like the upload thread (or thread pool) keeps crashing and then every time the upload counter jumps up to 5000+. I'm a new user, no historical experience but syncing 5000 images from a phone should be easy to handle. Any workarounds?

@dobos
Copy link

dobos commented May 31, 2023

Also, I'm trying to get out of the endless loop by turning autouploads off directory by directory but even if I do so, the already scheduled upload operations remain in the queue and the apps tries to upload them anyway. Then they fails and everything starts again.

@Cebrain
Copy link

Cebrain commented Jun 1, 2023

Also, I'm trying to get out of the endless loop by turning autouploads off directory by directory but even if I do so, the already scheduled upload operations remain in the queue and the apps tries to upload them anyway. Then they fails and everything starts again.

One thing i do when the error appears.
Let the app to try to upload and wait till some pictures fail (keep the upload window open or as you wrote, it restarts after switching again into the upload menu) after some times the pictures fail which was alredy uploaded. Then press the 3 Dot Menu in the Top right corner and "Clear failed uploads".
So you can sort out the failed uploads and nextcloud do not try to upload them again.

@rchovan
Copy link

rchovan commented Jun 8, 2023

This steps helped me:

  1. Force stop app Nextcloud in app manager
  2. clear cache
  3. run NC app
  4. go to upload
  5. clear finished and failed upload

so far no upload loop

@joshtrichards joshtrichards changed the title Auto upload endless loop Auto upload queue continuously starting from the begging again Nov 28, 2023
@joshtrichards joshtrichards changed the title Auto upload queue continuously starting from the begging again Auto upload queue continuously starting from the beginning again Nov 28, 2023
@joshtrichards joshtrichards added the hotspot: looping/duplicates Continuously looping upload queues or duplicate uploads label Dec 1, 2023
@distante
Copy link

As am trying to move my family to use nextcloud and this bug is causing them to reject it.

I have a 4000+ photos folder that have to be copied (not moved!) to the nextcloud server. They had the "always ask if file already exist in server" option enabled in case that the file already exists.

After a lot of uploaded files, the app is now asking what to do for each already uploaded file!

I though the upload client does a checksum check of something, but looks like it just checks namefiles?

I have no idea what to do now.

@distante
Copy link

This steps helped me:

  1. Force stop app Nextcloud in app manager
  2. clear cache
  3. run NC app
  4. go to upload
  5. clear finished and failed upload

so far no upload loop

This cancels the loop, but how can we sure that all the existing files were correctly uploaded before?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug feature: auto upload hotspot: looping/duplicates Continuously looping upload queues or duplicate uploads
Projects
None yet
Development

No branches or pull requests

9 participants