nextcloud / android

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

Auto upload not triggered #9320

Closed christianlupus closed 10 months ago

christianlupus commented 2 years ago

Steps to reproduce

  1. Set up the app to do auto uploads (e.g. use camera DCIM folder as suggested by default)
  2. (Optionally) Empty list of uploads to have a good view on the newly created (auto) uploads
  3. Take an image (which should trigger the upload)
  4. Wait a few minutes for the app to detect the newly created file

Expected behaviour

After some time (in the range of 5-10 min) the app should at least register an upload in the uploads section. Depending on the settings (only via WiFi for example), the upload will take place immediately, be queued, or be stalled.

Actual behaviour

The upload is never queued. It should have created anything in the list (be it stalled, queued, in progress, or done in the meantime). In fact, there is nothing logged at all.

I suspect that the detection of new files somehow fails.

Can you reproduce this problem on https://try.nextcloud.com?

As no upload is triggered, no network is involved. => Not tested

Environment data

Android version: 10

Device model: Dogee S96 Pro

Stock or customized system: Stock

Nextcloud app version: 3.18.0 RC6

Nextcloud server version: 22.2.3

Reverse proxy: Apache

Logs

Web server error log

Not network related

Nextcloud log (data/nextcloud.log)

Not network related

App logs

When making a photo and looking at the logs within the app, there is no line logged within a few minutes after the photo.

Unfortunately, the logs only go back until today morning, so older logs seem to have been rolled out. I cannot compare with a time where things were working.

NOTE: Be super sure to remove sensitive data like passwords, note that everybody can look here! You can use the Issue Template application to prefill some of the required information: https://apps.nextcloud.com/apps/issuetemplate

Additional information

This seems to be a regression, as it used to work until recently. I was on holiday and during part of it the auto uploads were still working as intended. Sometime around Nov 06th it suddenly stopped working. I am not sure about the exact point in time as my network connection was a bit hairy and I was not always able to use the NC server accordingly. So there was build a big list of outstanding uploads over these days. At some point, this list just did not get any longer.

007hacky007 commented 1 year ago

Seems like an issue with the more fine-grained file permissions on latest Androids.

Probably not limited just to this. Because on older Androids (Android 9) there are no fine-grained permissions and it also does not work there.

Older version 3.19.1 works fine for me though.

BLu85 commented 1 year ago

v3.25.0: AutoUpload for Camera and Video folders does not work. The Camera folder, on both local and server side, has 6k+ pictures. On the local folder there are some more pictures and these should be detected and auto uploaded, but this does not happen.

I tried the workarounds posted here (remove and give storage permission to the Nextcloud app, activate the "sync files" in settings - account - nextcloud, create a custom folder, take a pic, rename the remote folder). App is unusable as it also consumes a lot of battery (God knows what it is doing in the background, rather than just stay in idle waiting for the charge to be connected, as it is set in the Auto Upload settings). This issue on the AutoUpload feature has been around for months if not years. It would be nice to have it fixed. At the end of the day, is it not the main task this app should do (i.e. auto upload and keep files in sync)?

Any help or suggestion is appreciated. Thanks

P.s.: I tried to set up a tmp folder with few pics and those got detected and auto uploaded correctly. Could it be that the App gives up when there are too many pics in a folder?

Osmodia666 commented 1 year ago

v3.25.0: AutoUpload for Camera and Video folders does not work. The Camera folder, on both local and server side, has 6k+ pictures. On the local folder there are some more pictures and these should be detected and auto uploaded, but this does not happen.

I tried the workarounds posted here (remove and give storage permission to the Nextcloud app, activate the "sync files" in settings - account - nextcloud, create a custom folder, take a pic, rename the remote folder). App is unusable as it also consumes a lot of battery (God knows what it is doing in the background, rather than just stay in idle waiting for the charge to be connected, as it is set in the Auto Upload settings). This issue on the AutoUpload feature has been around for months if not years. It would be nice to have it fixed. At the end of the day, is it not the main task this app should do (i.e. auto upload and keep files in sync)?

Any help or suggestion is appreciated. Thanks

P.s.: I tried to set up a tmp folder with few pics and those got detected and auto uploaded correctly. Could it be that the App gives up when there are too many pics in a folder?

Same Problem here. Upload works in 1 of 100 cases. Do the devs even care? This Problem is around for Months, or even Years?

NicolasGoeddel commented 1 year ago

This Problem is around for Months, or even Years? It's years!

I already switched to FolderSync which works totally fine with syncing data to Nextcloud. The only thing that does not work is to automatically create a folder structure (year/month) from the modified/created data extracted from the pictures' and videos' EXIF data which is a bummer, because I really like that functionality and seemingly only the Nextcloud app itself has that feature.

psychedelicu commented 1 year ago

I'm done with this app definitely. I have tried 2 weeks to find a fix for it to make it work. Dear developers, go to McDonald's!

007hacky007 commented 1 year ago

I'm done with this app definitely. I have tried 2 weeks to find a fix for it to make it work. Dear developers, go to McDonald's!

Did you try older version as suggested in my previous post? 3.19.1 works fine on both old Android 9 and on newest Android. It's syncing photos just fine...

NicolasGoeddel commented 1 year ago

Did you try older version as suggested in my previous post? 3.19.1 works fine on both old Android 9 and on newest Android. It's syncing photos just fine...

Downgrades are not supported by Google Play.

007hacky007 commented 1 year ago

Did you try older version as suggested in my previous post? 3.19.1 works fine on both old Android 9 and on newest Android. It's syncing photos just fine...

Downgrades are not supported by Google Play.

Uh. Just uninstall your current version, manually download apk of the 3.19.1 release here https://github.com/nextcloud/android/releases/tag/stable-3.19.1 and install it.

romecas commented 1 year ago

On a Samsung S21 Ultra running version 3.25.0, i fixed the auto upload problem by re-adding the folder for auto upload. So Nextcloud - settings - Auto upload - Unselect "trouble folder" - then select again.

Sem060923 commented 1 year ago

Recently I ran into the same problem, the automatic uploading of files to the server stopped working. For me, the problem was solved successfully. In the phone settings, set "Does not save battery power" Settings - Applications - Nextcloud - Battery - Battery Saving

Blisk commented 1 year ago

I noticed that Nextcloud is the biggest consumer of battery it is top on the list. It drains the battery very fast.

joshtrichards commented 10 months ago

I'm going to close this issue for the following reasons:

If auto-uploads are not being triggered for you, please open a dedicated issue with the complete info about your situation.

Also, please check your Uploads tab to see the status of uploads. Ones queued but blocked for power reasons will show up there, for example. If your media files aren't even showing up in the queue at all that's also of interest, but an entirely different root cause most likely. Again, dedicated issues and let's work through thing one-by-one.

In addition, if you want to be even more helpful:

Thank you all for your feedback. I know dealing with and reporting bugs takes time and energy- often just as much as tracking down the cause and fixing them does.

BLu85 commented 10 months ago

Hi @joshtrichards

Thanks for commenting on this issue.

I think a couple of reasons for this thread to be so silent is because some people have switched to using other apps (FolderSync) or because have stopped using Nextcloud App (like myself). Furthermore, only 2 versions have been released in 1 year, hence I am still waiting for the next one to be released before commenting again saying if it has sorted or not the AutoUpload.

The AutoUpload is an essential feature for this App, not optional (like the image cropping for example). It should always work. In my specific case: I have 4 Nextcloud users. The AutoUpload feature works well on 2 phones, it doesn't work on the other 2. Settings are the same.

I haven't seen many comments from the developers on this thread asking for debug help or general info to tackle the problem. I am sure they have been working on it, but until now we (the users on this thread) haven't been involved much. We are all happy to contribute to solve it.

You suggested, for those still affected from this problem, to open a dedicated issue about the AutoUpload. Mine was opened months ago and still hasn't seen an answer from the devs. Here it is #11741. I personally don't think that this proliferation of tickets will help to sort the problem. But if this is the way to gather the attention of the devs to tacke and solve it, then I'll open one more. I really hope that this feature will be solved once for all so that we can go back at happily using our Nextcloud App.

Thanks, Luca

Blisk commented 10 months ago

As I see now, the major problem is that Nextcloud for Android is the biggest consumer of battery. I get constantly message that Nextcloud use a battery and it is on the top of battery drainers. And then it kills nextcloud service. I don't get that from Snapchat or Viber or anything like that. So it must be a bad app for Android, nothing else.

mnalis commented 9 months ago

I uninstalled and reinstalled the app as I could not longer live with annoying https://github.com/nextcloud/android/issues/11903 and was hoping the reinstall might fix it, however after reinstall and setting up autoupload folders it no longer detected pics nor autoupload anything.

I've check all battery optimization was disabled, all permissions were granted, tried removing/adding storage permission, looked at all special permissions (no "all storage" there for my android 10), adding and removing folders from autoupload, trying all settings on them, rebooting... But no luck -- even after adding folder for autosync and taking picture nothing was queued in Uploads at all. Trying to pull-to-refresh it manually didn't work either.


I was just about to give up for good when I stumbled on this reddit thread -- and indeed, under Settings / User & accounts / Next cloud option Sync files was off! Why, after fresh install ?! All other apps had their sync set to on...

Anyway I've turned it on now and the spinner has been rotating for dozen minutes now. But there are some 10k pictures so I guess that has to take some time, and I am hopeful it might work afterwards.

Android 10 / EMUI 12.

Update: It worked! I let the nextcloud account sync spinner spin overnight and sure enough in the morning it has syncing spinner has stopped and indicated all is synced. I then tried previous hints (remove and re-add folder for autoupload), added a picture, and it has started queuing and syncing again!

Dedsd commented 8 months ago

is your camera folder on an SD card by any chance?

I had the same problem last month the last time I posted. I suspect it was an issue related to sd card permissions or something weird happening with android not granting permission for the sd card cause other folder on the internal memory were auto uploading.

I resolved it by installing an new sd card setup auto-upload with the new sd card took a photo to ensure it would upload. Then I Removed the new sd card and re-inserted the old one, setup auto-upload again and it started working. I am still uncertain why it stopped working and why it would not start.

Hello @meldarionqeusse

I'm using an micro sd card, what did you do?

meldarionqeusse commented 8 months ago

As I explained I tried auto upload with a new SD card and it worked. I suspect cause the new SD card had few photos on it only. Then I re inserted my old SD card which has 3 years of photos on it configured folders again on nextcloud and after while it started syncing.

I think if you have lots of photos it might take a an hour. Also make sure you don't have battery saving modes enabled. I noticed that my phone was not syncing as soon as I take a photo but would start syncing a few minutes after I plug it in at night to charge cause stamina mode gets disabled.

poltpolt commented 8 months ago

NC 28 and years later the bug still exists on all my family members phones, what a shame, i always admired nextcloud but having this bug present for years is just shameful

MarizanneVis commented 5 months ago

Also just adding on to this as the issue is still present for me after implementing every fix I could find online and in this thread. Also adding, FolderSync and Syncthing really aren't good alternatives because they 1) can't sync the root directory of the phone, and 2) can't detect media folders like nextcloud, so it's a massive task to try and backup all folders with media for every client.

This really is the single feature I still need from NextCloud to allow me to get off Google.

mnalis commented 5 months ago

@MarizanneVis (and everyone else adding _"me too"_s) it would be much more helpful if you listed exactly what you tried (if accompanied with screenshots or screencasts, even better!), and exactly was the result was for each of the things you tried. Also, which versions of NC, on server and client, as well as Android version (and manufacturer/model - because of manufacturer specific issues) would be extremely helpful. Ideally by filing new bug template and adding link to this similar issue (instead of adding comment to closed issue).

Saying "I tried all fixes I could find" and "They didn't work" is a school example of how not to report bugs. Nice background article on how and why: "How to Report Bugs Effectively".

Please note that I'm not saying that to be mean to you :heart: (nor do I target you specifically here - it applies to everyone, including myself!), but to improve chances of bug actually being determined and solved (or workaround provided).

Without good quality bug reports full of specific data (which do take some time and effort to write, I know!) there is probably no chance of the bug ever being successfully reproduced, much less fixed. And only users with this elusive problem can provide such bug reports. (Note that even with good bug reports there is guarantee that the bug will be fixed, but it is a prerequisite for a chance of it being fixed - and probably required several different good bug reports to isolate unrelated variables).