Picture upload freezes after two or three uploads (Android App only)

Nextcloud version: 17
Operating system and version: Client: LineageOS 190801 ; Server: Ubuntu 18.04
Apache or nginx version: nginx 1.17.7
PHP version: 7.3

.
My Android is a rooted OnePlus 5 with LineageOS and AdAway.

.
The issue you are facing:

  1. On Android, to initialize my photo “sync”, I upload of dozens/hundreds of pictures, but it seems to randomly (every 2 or 3 pictures, not more) “take a break” either at 0% or 100% of “upload in progress” (never in-between, but 95% of the time it is stuck at 0%), sometimes for a couple of minutes (I am checking the “upload log” tab)

  2. I had already unticked “battery-optimize” for NextCloud, but after a night of uploading, it uploaded only a couple of pictures_ (not a single more)_. Don’t know why. It seems it stops uploading as soon as the screen is locked. I have to manually watch it with screen unlocked all the time for things to go a bit smoothier (modulo first point above)

My server is hosted on LAN (which implies great speeds, but bandwidth does not seem to be the issue here)

I am 100% sure it is an Android App issue. I tried to upload 50 pictures using the webapp on my desktop computer, and it was almost instantaneous. No hanging, no issue, nothing.

Sometimes I am under the impression that just toggling the menu and/or scrolling unstuck things. Sometimes it doesn’t (when I am too quick at trying this trick, maybe). Maybe when it does I am just very luck to toggle the menu at the right moment.

But I really am under the impression that the UI freezes somehow. Not the whole UI (although it happened once, and I had to hide the app and show it again) but at the very least the upload list. And by doing so, it freezes the uploads too. And when I trigger a refresh by toggling the menu, everything gets unstuck. Or maybe it is something of the like.

.
Is this the first time you’ve seen this error?

Yes, but it’s the first time I am using this feature too :slight_smile:

.
Steps to replicate it:

  1. Upload dozens of pictures using the Android App (it bugs only with the app)

.
The output of your Nextcloud log in Admin > Logging:

There is nothing in here, which is consistent with the fact that the Android App has an issue, not the server.

.
The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

Ask if you need something specific. But I really think this is an Android App issue.

.
The output of your Apache/nginx/system log in /var/log/____:

Ask if you need something specific. But I really think this is an Android App issue.

I can confirm that scrolling down a couple dozen pictures unblocks the situation and allows the uploads to continue. (without that trick, the uploads are frozen every couple pictures)

Very weird bug!

This doesn’t fix the issue for me. I’ve explained my device and such on the open issue on github found here https://github.com/nextcloud/android/issues/3715

1 Like

Just curious, have you been able to discover the root cause or is this inherently a bug?

Nope. I’m not technical enough to find the issue in the code. I only found a workaround I know of, is listed here https://github.com/nextcloud/android/issues/3715#issuecomment-591972167 which is basically just scrolling the whole time it’s uploading.

1 Like

This is the same workaround I explained earlier, but that time you did say that didn’t work for you. What changed in-between for you?

I have not used the Android app recently, I don’t know if something changed…

The auto-upload (can’t remember the proper name) works fine though. I’m using this one, and manually uploading pictures from my computer instead, when I need it (but TBH I’m trying to move away from NC for pictures because some parts are broken and it is slow and doesn’t have the features I need ==> NC is unfortunately not the magical tool for every need)

I’m seeing the same behavoir while on Nextcloud 18, up-to-date Android One and Nextcloud app running on a Nokia 8.1.

Unless I constantly scroll or force refresh, the upload seems to freeze after a couple of minutes.

The counter doesn’t indicate that it’s continuing in the background. :confused:

I think I figured it out.

The Nextcloud app doesn’t seem to like having it’s notifications suppressed by Androids “Silent Notifications” feature. Once I changed this back to defaults, my phone went absolutely bananas and played the notification sound repeatedly for what I assume to be each successful upload it had made up until that point while transferring one file after the other without hesitation. Even when I set the sound to “none” for each notification category, it didn’t seem to care much and kept going ding, ding, ding, ding, ding, ding, ding, so I rebooted the fucking thing and now it’s ok.

The remaining 425 remaining files took less than 40 minutes to sync and required 0 intervention, in fact; I had a nap.

Is this worthy a bug report or does this slither its way over to the bug tracker automagically somehow?

1 Like

Same behaviour here on a Huawei Mate 20 Pro (LYA-L29) with Android version 10, Nextcloud Synchronization Client 3.11.1 (installed via F-Droid) and Nextcloud 18.0.4:

  • Synchronisation hangs the moment the app is left or the screen locks automatically.

  • Going to the uploads page and scrolling up and down a bit in the list of pending uploads re-starts the process.

So in effect, I need to “baby sit” the upload by keeping the Zploads page open and moving it slightly every 20-30 seconds to keep the upload from stopping.

The notifications hint above was interesting, though.

Tried turning notifications off for the app: no change. Tried turning notifications on again for the app: no change. Then I looked at the notifications section in the app and found this:

So I started wondering whether this is something that occurs only for versions installed from the F-Droid store.

@kslen @Anonynain @Boggle247: Did you install from Google Play store, or F-Droid, or side load?

Looks to me that your issue might be related to installing via F-Droid in favor of Google Play, though I can only speculate based on the screenshot. I have no insight outside of this. :slight_smile:

@greve I install from fdroid. This issue on github was recently closed and supposedly fixed. I haven’t tried the new app version yet to test. Mainly because it takes a while for the new version to hit fdroid. Issue 3715 on the nextcloud Android app on github. Here is the merge request with the changes https://github.com/nextcloud/android-library/pull/424

Hi!

I installed the app from F-Droid store

Envoyé depuis ProtonMail mobile

-------- Message d’origine --------
On 10 mai 2020 à 14:40, Georg Greve via Nextcloud community < noreply@nextcloud.com > a écrit :

So it seems everyone who saw this issue installed from F-Droid.

I was curious, so I deleted the F-Droid version and installed the one from the Google Play store.

The App went somewhat nuts because many pictures were already on the server [1] but otherwise the issue of the app stopping largely seemed to disappear.

Only exception: The App is reporting a lot of sync conflicts [1] and eventually seems to get hung up on those notifications. I let it run over night and the Uploads count was down to 150 files. So it seems it got a lot more done but eventually got stuck on the “sync conflict” notification.

Odd observation: When I looked at it again a few minutes later the count was up to 1000 again. I definitely did not take a 1000 pictures while sleeping.

And while this is all happening on local network, which is comparatively fast, it seems too fast to be real when jumping through the list. So it doesn’t actually seem to be doing anything.

Also, I do not understand the “Sync conflict” notification: When I select it, I’m just being dropped back into the Uploads section of the App to watch the ongoing sync without any ability to decide anything.

So, in essence, 36 hours after starting the sync from the phone the sync is still not complete. While I have a good number of pictures and videos on the phone, a full backup of the entire phone and all apps (including all pictures and videos) to a Samba share over the same network takes around 4 hours. So it is not a network speed issue.

I could of course be entirely wrong, but from my experience it seems there are two, or three things going wrong here:

  • Inability to issue notifications can block the app entirely, which occurs regularly when installed from F-Droid: (lack of inability to issue) notifications should just never block the app.
    Note: The app is rather noisy. Personally I’d prefer to only know when something has not worked - otherwise it should just remain quiet or at most provide a status notification whether it is fully synced up (or how many files are missing). Bonus points for making it configurable, but a less noisy notification mechanism that cannot block the underlying function of the app itself would go a long way to increasing the functionality of the app.

  • There is something broken about the sync conflict mechanism/notification. Just getting dropped back into the Uploads section of the app without any chance to do anything is really odd user experience. If the app is notifying, even blocking, asking the user to intervene, there should be something for the user to do.

  • [1] Ideally there should never be the need to intervene on the sync - except in rare cases. The number of notifications and requests for intervention on sync conflict, as well as the defaults set, surprised me. My naive expectation for a sane default would have been: “If the file name is identical, and the file has the same SHA256 hash, assume it is the same file - so just record as ‘already synced’.” If the hash value is good enough as the unique identifier for IPFS, it is probably good enough for this case, as well.

Not sure how many tickets that would translate to and where they would best be filed (app vs library) but happy to help with that in case this needs further detailing. Otherwise my sincere thanks to the developers for all their hard work so far and for picking this up.

Not sure whether this is accidentally referring to the wrong ticket, but this commit basically just increases the maximum number of total connections and maximum number of total connections per host from 8 to 64.

Depending on the app design that may help with having more connections in parallel, potentially making things faster, or it may increase the number of things that can get stuck together before the whole app gets stuck, but I am not sure I understand how it would address the underlying issue, tbh.

Have seen this a couple more times today, by the way.

The counter counts down into the low hundreds only to jump back to 999 while the file list is doing all sorts of changes rapidly. I’ll give it a little more time and observe.

Update:

I set the screen to not switch itself off, which after a couple of “let’s start from 1000” loops finally managed to finish. Had approximately 1000 “manual intervention” messages at the Upload screen then, which I simply never saw before because they were hidden under the 1000 files waiting for upload.

When resolving a single one, it started the whole game again on the remaining 999.

So I cleared all of them (if there is a conflict, my assumption is the file is already on server) and now it is quiet and asleep again. Hope I’m not missing any pictures, though - and that uncertainty is a bit unsettling.

In any case I’ll keep using this for the time being and see how it behaves going forward.

Here’s issue 3715 on the android app https://github.com/nextcloud/android/issues/3715 it’s about hanging on uploading multiple files. At the bottom the approved fix is the above mention merge request 424.

Whether it actually solves the issue for everyone idk.

1 Like

Is this still an issue for some?

I’m a new user of nextcloud. I don’t know if this was solved between 2020 and 2023, but I’m experiencing this exact problem and I don’t see any solution except it would have been “solved with software update”.

Should I report a bug ?

1 Like

After many failed trials in the past couple of days , I plugged in my charger this morning and all the 200 pictures left synced without any intervention.

This is after a phone firmware update, it worked on a remote network.

I have no idea what happened, likely related to the phone firmware update…