Auto upload not triggered
Steps to reproduce
- Set up the app to do auto uploads (e.g. use camera
DCIMfolder as suggested by default) - (Optionally) Empty list of uploads to have a good view on the newly created (auto) uploads
- Take an image (which should trigger the upload)
- 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.
My upload queue has been empty for 3 weeks now. Neither photos nor videos are getting picked up. If I create a new custom folder, these files will be uploaded eventually, but the camera photo/video folder seems to be ignored. It used to work flawlessly until 3 weeks ago. Things I tried:
- Disabling energy saving mode for nextcloud
- Updating nextcloud app to version 3.18 RC6
- Renaming the target folder on the server (so that it should see all files as missing as the folder is not there)
- Clearing cache, restarting the phone
- Checking, if the upload functionality on a different account on the same server with a different phone still works. It does.
Here some (maybe) interesting logs:
2021-11-20T10:05:45.613+0100;D;UploadsStorageManager;QUERY: (status== ? OR last_result==9 OR last_result==13 OR last_result==11 OR last_result==14 ) AND last_result!= 16 ROWID: -1
2021-11-20T10:05:45.616+0100;V;UploadsStorageManager;getUploads() got 0 rows from page 0, 0 rows total so far, last ID -1
2021-11-20T10:05:45.616+0100;V;UploadsStorageManager;getUploads() returning 0 (0) rows after reading 1 pages
---
2021-11-20T10:05:45.769+0100;V;ArbitraryDataProvider;Updating arbitrary data with cloud id: global key: media_folders value: {"imageMediaFolders":[[...]"/storage/emulated/0/DCIM/Camera",[...]],"videoMediaFolders":[]}
So, for me it seems like it looks at the right place but doesn't find any new photos or videos despite there being like 40 or 50.
I'm facing the same issue with Nextcloud client 3.18 for Android an a OnePlus Nord. I'm not sure however if the phone's make and model is of any importance here...
During the client setup, I did notice something strange. When I select the folder to watch (example /storage/emulated/0/DCIM/Camera), the folder displayed as the "source" folder reads /storage/emulated/0/DCIM. So it seems as if the parent folder of the selected folder is watched?
@ksmolder thanks for the tip; this might be a consequence of #8940 In the meantime try setting up the folder with the workaround there
For me, the last uploaded file was from November 14, no photos taken later than that have been uploaded. /storage/emulated/0/DCIM/Camera is the path in settings. Pixel phone recently updated to Android 12 - but not sure if the date of Android update was November 14.
Hello. Not sure if you managed to solve this, but for me denying and re-allowing the storage permissions fixed this issue.
@martinmoreira Could you elaborate? How did you do this?
Of course. For me it is: Android Settings / Apps & Notifications / See all Apps / Nextcloud / Permissions / Storage Then choose "Deny" And the "Allow again".
I can't believe that actually worked! Thanks @martinmoreira
For me, this workaround did work. So far I am not affected anymore. However, I do not know what triggered the problem and thus I am not sure if it will happen again. Also I do not know how I could get notified/aware of it happens again.
It does not work for me as there is no "Storage" permission to alter between deny and allow. The only permission Nextcloud requested was Calender, Camera and Contact. I'm on Android 11, OnePlus 6, OxygenOS 11.1.2.2
Looks like auto upload also stopped working on my android phone right after the 3.18 release (the date of the last uploaded picture coincides with the release of the version). My other android phone still running 3.15 continues to work fine. I will try to remove / reinstall / reconfigure 3.18 and see if it works again.
Of course. For me it is: Android Settings / Apps & Notifications / See all Apps / Nextcloud / Permissions / Storage Then choose "Deny" And the "Allow again".
This is not possible on Android 11, OneUI 4.0, Samsung S21 Ultra.
Does anybody have any idea what is causing this?
This is not possible on Android 11, OneUI 4.0, Samsung S21 Ultra.
I do not own a Samsung S21 Ultra but after a quick google search you should find it in Settings -> Privacy -> Permission Manager -> Storage
Ok, so appareantly I took a picture with my phone and it triggered the upload sequence for every upload folder. Maybe the problem lies in it not being triggered by anything?
This is not possible on Android 11, OneUI 4.0, Samsung S21 Ultra.
I do not own a Samsung S21 Ultra but after a quick google search you should find it in Settings -> Privacy -> Permission Manager -> Storage
Nextcloud is not there... To be more precise it seems like there is no normal storage permission for it.
However it is in Settings > Apps > Special access > All files access. For interest: I also found that on this setup you have to manually go and enable sync in system settings: Settings > Accounts and backup > Manage accounts > Nextcloud Idk if this makes a difference but shouldn't this be enabled by default?
Still, there must be some deep rooted problem with the autosync engine because it is not working on mobile internet connection, is only triggered by new items, etc.
Is it possible this is somehow "feature" of android instead of Nextcloud problem? It looks to me as if OS decided that I haven't opened the nextcloud client for a long time, so the permission was removed, even though it's shown as allowed. Not sure if this is it or, perhaps, this is caused by OS update... My latest OS update was sometime at start of April which is also the last time my auto upload worked. Once I removed and re-applied the permission (thanks, @martinmoreira !!!) it works flawlessly again.
@sanchosk in newer Android OSes there is a feature where app permissions, if not used, are disabled. That is a good feature actually, but I am not talking about that. Nextcloud should set these options ON by default during first launch or should periodically check against them. Also, there is the seperate question of when and how uploads are triggered.
Hello. Not sure if you managed to solve this, but for me denying and re-allowing the storage permissions fixed this issue.
I can confirm this. I just discover auto upload stop working since months. When I looked at android logs, nothing was happening when a new photo was taken.
As @martinmoreira suggests, disable storage permission for nextcloud app and re-allowing it immediately make uploads start immediately
On my Fairphone 2 running /e/ OS 1.0 (which is Android 10 on my phone) this workaround also worked but I had to
- start settings
- disable the storage permission
- leave settings
- wait a bit 15/20s
- start settings
- enable storage permission
This is still just a workaround not a bug fix.
I am still curious to get why this permission seems no more effective (does it come from Android or from Nextcloud).
I manually upload some newly taken picture files and that might trigger the whole auto upload process. Video files works but the auto upload process takes a bit longer to begin (~10mins). Maybe because phone still processing?
I'm always having troubles with background activities of different apps when they are not using Google Play Services. Looks like everything not going through Google is a third class citizen in Android.
Removing storage permission and then granting it again, also fixed an auto upload issue on a Huawei Mate 20 Pro with up to date system.
Also removing and regranting those permissions led to Nextcloud discovering lots of new folders for auto upload.
@www-flomei-de this also worked for me on my Xiaomi Poco F1! Thanks a lot!
Thanks for the workaround of reallowing the storage permission, I was going mad.
I can confirm, that with very large folders, the autouploading does not start instantly but after some minutes is did.
This still solution still doesn't work for me guys. I'm on Samsung s22 ultra. It was working on my old server that went kaputz. So I've rebuilt it, for my laptop sync'd again successfully, but Android still says no. Any ideas? Thanks
Still doesn't work.
Could you please add some information to the page with the status? E.g. Pending permissions, Indexing, etc?
This issue is so frustrating. Actually, this is the core feature, and it doesn't work.
Uploading files manually works, but configuring it with auto upload doesn't even after trying the following:
- set chmod read write access to data folder
- set samsung to enable sync
- set samsung not to let this app to sleep
- set samsung to have full access to directories on the phone.
- I've signed in with admin account from my phone, so given the admin access, it should just work. I can't see anything in the logs, it's very frustrating.
This is an issue with the App.
You can circumvent this by using FolderSync from the Play-Store which has Nextcloud-Support and syncs instantly without any issues.
The advantage to this is that you can also periodically sync folders with that one - not just when new files are detected - so that rules out any permission based issues and enforces a sync regulary.
I had the same issue, with no new pictures detected by the Nextcloud App since a few weeks. Disabling and re-enabling storage permission did solve my issue.
Hello. Not sure if you managed to solve this, but for me denying and re-allowing the storage permissions fixed this issue.
This also worked for me... it took so long to find a fix for this issue. Not that you really call this a fix, but hey...