nextcloud / android

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

Autoupload doesn't (autoupload) #8285

Open InfamousUser opened 3 years ago

InfamousUser commented 3 years ago

Steps to reproduce

  1. Install fresh Nextcloud app on Android
  2. Add one or two autoupload folders (custom) with the following: only "also upload existing files" checked, original file kept in original folder, if file exists -> rename new version.
  3. Make sure it is turned on.
  4. Wait

Expected behaviour

App should automatically upload the selected data.

Actual behaviour

App does not automatically upload the selected data, manual upload, on the other hand, works. Upload menu is empty, nothing is attempting to be uploaded. I do get notifications about other media folders being detected, but no feedback regarding the selected autoupload.

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

Environment data

Android version: 14

Device model: Google Pixel 7 Pro

Stock or customized system: stock

Nextcloud app version: 3.27.0

Nextcloud server version: 28.0.2

Reverse proxy:

Logs

Web server error log

Insert your webserver log here

Nextcloud log (data/nextcloud.log)

Insert your Nextcloud log here

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

talesam commented 3 years ago

I'm having the same problem autoupload doesn't work, it doesn't send images to the server.

InfamousUser commented 3 years ago

Well that's a fail, I hope they give this autoupload a revamp soon, it's riddled with bugs.

tobiasKaminsky commented 3 years ago

Maybe this is Android 11 related? @talesam @madboykiller do you also have 11?

talesam commented 3 years ago

I'm using the DEV version and the auto-ship works and the app doesn't eat all the battery on the phone.

talesam commented 3 years ago

Maybe this is Android 11 related? @talesam @madboykiller do you also have 11?

Android 10

WarmChocolateCake commented 3 years ago

Adding some "me too" information...

I'm on Android 10, with NC Client version 3.15.1, connected to NC Server 20.0.7 (running on a Raspberry Pi 4). Autoupload is only set to monitor the "DCIM" folder on an "external" microSD card I have 2x autoload entries - one for photos, the other for videos - both are pointing to the same "DCIM" folder Autoupload is set to only upload with unmetered wifi, existing files, and use subfolders.

(I'm also using DAVx5 to sync CardDAV & CalDAV from the same phone to the same server)

The Autoupload appears to work for a while, then "jams" and doesn't appear to upload any more photos. However, sometimes it will upload some recent photos but miss earlier ones. Rebooting the phone then appears to reset something and Autoupload will then catch up with all the missing photos.

Often (everytime?) when I've rebooted the phone, after it has synchronised. I'll get a "file upload conflict" and it's a photo that appears to have correctly uploaded. So it appears that autoupload sends something to the server, but maybe doesn't cleanly complete the transfer and then that holds up the rest silently?

Using the filename of the photo that was conflicting today, I see the following in NC Server /data/nextcloud.log:

{"reqId":"UXvjRnmWRSJyf0kkD3yd","level":1,"time":"2021-05-06T21:16:51+01:00","remoteAddr":"192.168.6.24","user":"steve","app":"no app in context","method":"HEAD","url":"/remote.php/webdav/Photos/2021/05/20210506_205020.jpg","message":"Deprecated event type for {\"[object] (OCP\\SabrePluginEvent)\":{\"*statusCode\":200,\"*message\":\"\",\"*server\":{\"[object] (OCA\\DAV\\Connector\\Sabre\\Server)\":{\"tree\":\"[object] (OCA\\DAV\\Connector\\Sabre\\ObjectTree)\",\"*baseUri\":\"/remote.php/webdav/\",\"httpResponse\":\"[object] (Sabre\\HTTP\\Response)\",\"httpRequest\":\"[object] (Sabre\\HTTP\\Request)\",\"sapi\":\"[object] (Sabre\\HTTP\\Sapi)\",\"*plugins\":[],\"transactionType\":null,\"protectedProperties\":{\"...\":\"Over 20 items, aborting normalization\"},\"debugExceptions\":false,\"resourceTypeMapping\":[],\"enablePropfindDepthInfinity\":true,\"xml\":\"[object] (Sabre\\DAV\\Xml\\Service)\",\"*listeners\":{\"...\":\"Over 20 items, aborting normalization\"},\"*wildcardListeners\":[],\"*listenerIndex\":[],\"*logger\":null}},\"Symfony\\Contracts\\EventDispatcher\\EventpropagationStopped\":false}}: null","userAgent":"Mozilla/5.0 (Android) Nextcloud-android/3.15.1","version":"20.0.7.1"} {"reqId":"UXvjRnmWRSJyf0kkD3yd","level":1,"time":"2021-05-06T21:16:51+01:00","remoteAddr":"192.168.6.24","user":"steve","app":"no app in context","method":"HEAD","url":"/remote.php/webdav/Photos/2021/05/20210506_205020.jpg","message":"Deprecated event type for {\"[object] (OCP\\SabrePluginEvent)\":{\"*statusCode\":200,\"*message\":\"\",\"*server\":{\"[object] (OCA\\DAV\\Connector\\Sabre\\Server)\":{\"tree\":\"[object] (OCA\\DAV\\Connector\\Sabre\\ObjectTree)\",\"*baseUri\":\"/remote.php/webdav/\",\"httpResponse\":\"[object] (Sabre\\HTTP\\Response)\",\"httpRequest\":\"[object] (Sabre\\HTTP\\Request)\",\"sapi\":\"[object] (Sabre\\HTTP\\Sapi)\",\"*plugins\":{\"...\":\"Over 20 items, aborting normalization\"},\"transactionType\":\"head\",\"protectedProperties\":{\"...\":\"Over 20 items, aborting normalization\"},\"debugExceptions\":false,\"resourceTypeMapping\":[],\"enablePropfindDepthInfinity\":true,\"xml\":\"[object] (Sabre\\DAV\\Xml\\Service)\",\"*listeners\":{\"...\":\"Over 20 items, aborting normalization\"},\"*wildcardListeners\":[],\"*listenerIndex\":[],\"*logger\":null}},\"Symfony\\Contracts\\EventDispatcher\\EventpropagationStopped\":false}}: null","userAgent":"Mozilla/5.0 (Android) Nextcloud-android/3.15.1","version":"20.0.7.1"} {"reqId":"UXvjRnmWRSJyf0kkD3yd","level":0,"time":"2021-05-06T21:16:51+01:00","remoteAddr":"192.168.6.24","user":"steve","app":"webdav","method":"HEAD","url":"/remote.php/webdav/Photos/2021/05/20210506_205020.jpg","message":{"Exception":"Sabre\\DAV\\Exception\\NotFound","Message":"File with name Photos/2021/05/20210506_205020.jpg could not be located","Code":0,"Trace":[{"file":"/usr/share/webapps/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":81,"function":"getNodeForPath","class":"OCA\\DAV\\Connector\\Sabre\\ObjectTree","type":"->"},{"file":"/usr/share/webapps/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpGet","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/usr/share/webapps/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":474,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/usr/share/webapps/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":262,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/usr/share/webapps/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpHead","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/usr/share/webapps/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":474,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/usr/share/webapps/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":251,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/usr/share/webapps/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":319,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/usr/share/webapps/nextcloud/apps/dav/appinfo/v1/webdav.php","line":84,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/usr/share/webapps/nextcloud/remote.php","line":167,"args":["/usr/share/webapps/nextcloud/apps/dav/appinfo/v1/webdav.php"],"function":"require_once"}],"File":"/usr/share/webapps/nextcloud/apps/dav/lib/Connector/Sabre/ObjectTree.php","Line":173,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Android) Nextcloud-android/3.15.1","version":"20.0.7.1"} {"reqId":"zZkHhJpXue7R7tu2WU7F","level":0,"time":"2021-05-06T21:19:46+01:00","remoteAddr":"192.168.6.24","user":"steve","app":"guests","method":"HEAD","url":"/remote.php/webdav/Photos/2021/05/20210506_205020.jpg","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (Android) Nextcloud-android/3.15.1","version":"20.0.7.1"} {"reqId":"zZkHhJpXue7R7tu2WU7F","level":0,"time":"2021-05-06T21:19:46+01:00","remoteAddr":"192.168.6.24","user":"steve","app":"contacts","method":"HEAD","url":"/remote.php/webdav/Photos/2021/05/20210506_205020.jpg","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (Android) Nextcloud-android/3.15.1","version":"20.0.7.1"} {"reqId":"zZkHhJpXue7R7tu2WU7F","level":0,"time":"2021-05-06T21:19:46+01:00","remoteAddr":"192.168.6.24","user":"steve","app":"files_ sharing","method":"HEAD","url":"/remote.php/webdav/Photos/2021/05/20210506_205020.jpg","message":"/appinfo/app.php is deprecated, us \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (Android) Nextcloud-android/3.15.1","version":"20.0.7.1"} {"reqId":"zZkHhJpXue7R7tu2WU7F","level":1,"time":"2021-05-06T21:19:46+01:00","remoteAddr":"192.168.6.24","user":"steve","app":"no app in context","method":"HEAD","url":"/remote.php/webdav/Photos/2021/05/20210506_205020.jpg","message":"Deprecated event type for {\"[object] (OCP\\SabrePluginEvent)\":{\"*statusCode\":200,\"*message\":\"\",\"*server\":{\"[object] (OCA\\DAV\\Connector\\Sabre\\Server)\":{\"tree\":\"[object] (OCA\\DAV\\Connector\\Sabre\\ObjectTree)\",\"*baseUri\":\"/remote.php/webdav/\",\"httpResponse\":\"[object] (Sabre\\HTTP\\Response)\",\"httpRequest\":\"[object] (Sabre\\HTTP\\Request)\",\"sapi\":\"[object] (Sabre\\HTTP\\Sapi)\",\"*plugins\":[],\"transactionType\":null,\"protectedProperties\":{\"...\":\"Over 20 items, aborting normalization\"},\"debugExceptions\":false,\"resourceTypeMapping\":[],\"enablePropfindDepthInfinity\":true,\"xml\":\"[object] (Sabre\\DAV\\Xml\\Service)\",\"*listeners\":{\"...\":\"Over 20 items, aborting normalization\"},\"*wildcardListeners\":[],\"*listenerIndex\":[],\"*logger\":null}},\"Symfony\\Contracts\\EventDispatcher\\EventpropagationStopped\":false}}: null","userAgent":"Mozilla/5.0 (Android) Nextcloud-android/3.15.1","version":"20.0.7.1"} {"reqId":"zZkHhJpXue7R7tu2WU7F","level":1,"time":"2021-05-06T21:19:46+01:00","remoteAddr":"192.168.6.24","user":"steve","app":"no app in context","method":"HEAD","url":"/remote.php/webdav/Photos/2021/05/20210506_205020.jpg","message":"Deprecated event type for {\"[object] (OCP\\SabrePluginEvent)\":{\"*statusCode\":200,\"*message\":\"\",\"*server\":{\"[object] (OCA\\DAV\\Connector\\Sabre\\Server)\":{\"tree\":\"[object] (OCA\\DAV\\Connector\\Sabre\\ObjectTree)\",\"*baseUri\":\"/remote.php/webdav/\",\"httpResponse\":\"[object] (Sabre\\HTTP\\Response)\",\"httpRequest\":\"[object] (Sabre\\HTTP\\Request)\",\"sapi\":\"[object] (Sabre\\HTTP\\Sapi)\",\"*plugins\":{\"...\":\"Over 20 items, aborting normalization\"},\"transactionType\":\"head\",\"protectedProperties\":{\"...\":\"Over 20 items, aborting normalization\"},\"debugExceptions\":false,\"resourceTypeMapping\":[],\"enablePropfindDepthInfinity\":true,\"xml\":\"[object] (Sabre\\DAV\\Xml\\Service)\",\"*listeners\":{\"...\":\"Over 20 items, aborting normalization\"},\"*wildcardListeners\":[],\"*listenerIndex\":[],\"*logger\":null}},\"Symfony\\Contracts\\EventDispatcher\\EventpropagationStopped\":false}}: null","userAgent":"Mozilla/5.0 (Android) Nextcloud-android/3.15.1","version":"20.0.7.1"}

I see something in there that looks like the photo can't be found... yet it (eventually) synchronised successfully (and conflicted...).

Hope that there's some useful information in there! :)

github-actions[bot] commented 3 years ago

This bug report did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!

InfamousUser commented 3 years ago

Just close it, I cba with these reports anymore, so much time wasted arguining with bots and opening closed issues, if nobody wants to fix these issues for years then forget it.

WarmChocolateCake commented 3 years ago

It's still an issue for me, so I'd prefer to keep it open. Sometimes it works fine, sometimes it uploads some photos and then stops...

I see loads of "depreciated" errors in my log above and something about "over 20 items"... I'm sure I had 1 photo to upload...

theing commented 3 years ago

I have the same behavior. My server is on an embedded device in my home for my personal use, with WI-FI and without any SSL protection but this is not a problem. The auto-upload service stopped to work a couple of months ago, that means that when the device is connects to the wi-fi the upload service notification did not appear and nothing is uploaded, while when I try to share a file manually it is correctly updated.
Logging th OwnCloud library with a logcat I see something like an error: 6-14 19:37:14.591 20366 2433 E ReadFolderRemoteOperation: at com.owncloud.android.lib.common.OwnCloudClient.executeMethod(OwnCloudClient.java:219) I do not know if this is the cause of the problem but everything else works correctly and if I'm not wrong, when I share something manually, no folder are read locally, but the file is streamed, directly to the remote server, while when the upload service starts it has to read some folder to check if new files were added. I do not know exactly when, but I'm sure that recently my Android phone was update by Samsung to Android 11 and I know that Google changed several things in the external memory management, I tried to delete the application data and cache to check for folder mismatching, but nothing changed. Thank, you.

InfamousUser commented 3 years ago

For me it did not work correctly for like 3-4 major Android versions, don't think it matters which one.

WarmChocolateCake commented 3 years ago

Just wondering whether @AndyScherzinger can comment on this issue?

AndyScherzinger commented 3 years ago

@WarmChocolateCake sure thing, while I can't add much value with a comment at the moment due to personal time constraints regarding spending time on this matter. So here we go:

So due to time constraints. If anybody having the problem you all described and could work on a fix/PR than we would definitely support you in any way possible. Not a satisfying answer I am afraid but the best I can do (personally) at this moment.

theing commented 3 years ago

Last week something happened. As many routers my router has two different entries , one for the 5Ghz and one for the old protocol 2.4Ghz. Obviously the cloud is reachable on both channels. Due to a range problem in order to reach my network from the garage, I changed the connection of my mobile phone from the 5Ghz band entry to the 2.4GHz band entry and Nexcloud started to sync again. I exclude it was a range problem before, because I tested it at a couple of meters, from the same router, and the cloud was always reachable, but before the switch It was not able to auto-upload anything, I don't know if it is a casual instance, but the Nexcloud auto-upload runs properly now. Hope this helps.

thenickname commented 3 years ago

@WarmChocolateCake sure thing, while I can't add much value with a comment at the moment due to personal time constraints regarding spending time on this matter. So here we go:

* wrongly shown/detected conflicts (as in false positive) have been reported numerous times. Since I haven't worked on that area I can't guess what might go wrong here, but due to the number of reports there is very likely something wrong with the actual implementation.

* Auto Upload for media files on sd card are known to be a volatile thing. This is due to the way is has been implemented. The "standard" auto upload (as in folders shown in the auto upload screen, deteced by the app) are based on querying Android's media index which as it turned out is flaky at best for sd card data. So we only "see" files Android itself detects and puts into its index. Using custom folders in auto upload instead of the suggested auto detected folder might work (can't say). This is a tricky area since most (or all?) devs I know contributing to the3 app are using devices that don't have an sd card (and thus don't have/see such problems). Reboot as mentioned do help, since that might trigger Androids media indexing and also reboots/restarts the auto upload background job (which isn't a solution but the reason you might see a "positive effect")

* Any connectivity issue should be "ignored for now" since that has been a general issue for certain server http requests and has been fixed afaik and should ship with the next feature release.

So due to time constraints. If anybody having the problem you all described and could work on a fix/PR than we would definitely support you in any way possible. Not a satisfying answer I am afraid but the best I can do (personally) at this moment.

I would like to add that this is not exclusive to SD cards. My experience is, sooner or later auto upload will break and then never work with the same folder again. Only workaround is to create a new folder with different name and enable it for auto upload. After a few weeks auto upload will break again and stop detecting files or uploading them.

WarmChocolateCake commented 3 years ago

For me, I autoupload photos mostly, if I had your problem @thenickname, that would mean I would need to keep changing the camera app to save photos to each new folder. I don't have to do that. But yes, my photos are on an SD card.

To add, my SD card is formatted as "Portable" (FAT/unencrypted), rather than "Internal" / "Adoptable" (encrypted)

InfamousUser commented 3 years ago

I'm sure it isn't a problem for everyone. But it doesn't work for everyone either.

shr3k commented 3 years ago

Same issue, client (both latest and dev) shows nothing to upload, photos are uploaded randomly. Using Mi 10/MIUI 12.2.7/Android 11. Source is on /storage/emulated/0/DCIM/Camera.

moaxey commented 3 years ago

My photos auto-upload fine, but I set up an additional auto upload folder for audio recordings, and it will never work.

The only remotely relevant log message I can find is:

"reqId":"J03XONxSzGVrBXb8z7tB","level":0,"time":"2021-07-18T03:46:43+00:00","remoteAddr":"192.168.2.1","user":"who","app":"files_sharing","method":"PROPFIND","url":"/remote.php/webdav/Recordings/Auto-uploads/","message":"/appinfo/app.php is deprecated, use \OCP\AppFramework\Bootstrap\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (Android) Nextcloud-android/3.16.1","version":"20.0.10.1"}
{"reqId":"J03XONxSzGVrBXb8z7tB","level":0,"time":"2021-07-18T03:46:43+00:00","remoteAddr":"192.168.2.1","user":"who","app":"maps","method":"PROPFIND","url":"/remote.php/webdav/Recordings/Auto-uploads/","message":"/appinfo/app.php is deprecated, use \OCP\AppFramework\Bootstrap\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (Android) Nextcloud-android/3.16.1","version":"20.0.10.1"}
{"reqId":"J03XONxSzGVrBXb8z7tB","level":1,"time":"2021-07-18T03:46:43+00:00","remoteAddr":"192.168.2.1","user":"who","app":"no app in context","method":"PROPFIND","url":"/remote.php/webdav/Recordings/Auto-uploads/","message":"Deprecated event type for {\"[object] (OCP\SabrePluginEvent)\":{\"statusCode\":200,\"message\":\"\",\"server\":{\"[object] (OCA\DAV\Connector\Sabre\Server)\":{\"tree\":\"[object] (OCA\DAV\Connector\Sabre\ObjectTree)\",\"baseUri\":\"/remote.php/webdav/\",\"httpResponse\":\"[object] (Sabre\HTTP\Response)\",\"httpRequest\":\"[object] (Sabre\HTTP\Request)\",\"sapi\":\"[object] (Sabre\HTTP\Sapi)\",\"plugins\":[],\"transactionType\":null,\"protectedProperties\":{\"...\":\"Over 20 items, aborting normalization\"},\"debugExceptions\":false,\"resourceTypeMapping\":[],\"enablePropfindDepthInfinity\":true,\"xml\":\"[object] (Sabre\DAV\Xml\Service)\",\"listeners\":{\"...\":\"Over 20 items, aborting normalization\"},\"wildcardListeners\":[],\"listenerIndex\":[],\"*logger\":null}},\"Symfony\Contracts\EventDispatcher\EventpropagationStopped\":false}}: null","userAgent":"Mozilla/5.0 (Android) Nextcloud-android/3.16.1","version":"20.0\ .10.1"}

klundry commented 2 years ago

For some reason my DCIM/Camera/ folder, for photos, the auto-upload continues to work and hasn't broken. The identical auto-upload folder but for videos has been broken for a long time and never uploads anything. This is an extremely common problem it seems and one of the key features that makes using the Nextcloud app attractive and one of the 6 main features touted in the app description on f-droid. It's a bummer that this is so unreliable that it's pretty much not worth using anymore.

So some questions. Is there any hope of this ever being fixed? With numerous significant updates to the app in the at least year+(maybe multiple years) of this being an issue, why has this not ever been worked on?

PS. I apologize if this comes across as complaining. I'm thankful for the hard work the app developers do. It would, however, be nice to have some sort of explanation about the current and future state of this very large bug so we can evaluate whether or not we want to spend anymore time fighting with it. If there is little chance of it ever getting fixed then I'll just move on to a different solution.

InfamousUser commented 2 years ago

Unfortunately autoupload has never worked correctly for me for the past 3-4 years that I've been using Nextcloud. I have opened numerous issues regarding various things about it, most have gotten closed by the bot which means developers don't want issues to be unsolves for too long so they get closed, others have remained unsolved. I have given up on trying to help it get fixed as it was taking an inordinate amount of effort/result ratio.

github-actions[bot] commented 2 years ago

This bug report did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!

klundry commented 2 years ago

Yep, still broken.

github-actions[bot] commented 2 years ago

This bug report did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!

InfamousUser commented 2 years ago

I don't know if anyone's noticed but the upload does still not work! Yay!

klundry commented 2 years ago

An nobody seems interested in fixing it. Woohoo!

github-actions[bot] commented 2 years ago

This bug report did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!

InfamousUser commented 2 years ago

Update!

NicolasGoeddel commented 2 years ago

Since a few days my autoupload functionality for photos and videos is broken and I don't know why. I recently added an other autoupload setting for uploading Signal backups and it works just fine. But NO photos or videos are uploaded.

I also don't see a button to delete the setting so I would be able to set it up again. Am I blind? I can set up new autouploads but I can not delete them? Why this? In the three-dot menu I only can hide the folder or configure it. There is no delete or something.

I also restarted my phone but it changed nothing. That's really weird. I am using version 3.18.0 RC4 on a Oneplus 5 with Android 10 (OxygenOS v10.0.1). It worked all these years and now it just does not anymore.

InfamousUser commented 2 years ago

Welcome to the club, walk over to the bartender to get a membership card.

AndyScherzinger commented 2 years ago

@NicolasGoeddel afaik @AlvaroBrey did somes fixes due to the changes permission behavior with Android 11 with the RC5

NicolasGoeddel commented 2 years ago

Has anyone here found an alternative application to sync files like Nextcloud does it? I tried several including FolderSync, ZPush, Syncthing, AutoSync. But none has had the same functionality: Uploading files according to their create/modifying date into subfolders like yyyy/MM/<filename>. Either they have no possibility to upload into timestamped subfolders at all or they use the current time instead the time of the file itself.

InfamousUser commented 2 years ago

I don't understand why anything else is developed before fixing stuff that already doesn't work... Autoupload hasn't worked for me for a couple of years now, I don't understand how it's working for others.

bd-g commented 2 years ago

Auto upload still not working or me. Ugh

AlvaroBrey commented 2 years ago

Hey everyone. I've disabled the stale-bot for this issue (that's what the no-stale label does), so please refrain from commenting further unless there's something constructive to add. Otherwise we lose even more time dealing with notifications.

We understand this is a frustrating issue, but currently we're spread thin and other priorities are preventing us from investing the time in fixing this quickly. Additionally, this is a particularly hard to debug and reproduce issue (I for example don't have this problem in any of the devices I've tested), so that compounds even further.

Of course, anyone is welcome to try their hand at fixing this and opening a PR, which we'll do our best to review promptly. Thank you and sorry!

InfamousUser commented 2 years ago

Thanks for explaining, personally I've opened multiple issues and most got closed over time by bot and I gave up. I've said previously that I'm willing to provide any info/debug info you require to fix this, problem is I've no idea what to provide/where to get more info. If you can tell me where to look I'll provide what you need as this is happening 24/7 to me - nothing is uploading.

NicolasGoeddel commented 2 years ago

I solved my issue after reading this comment: https://github.com/nextcloud/android/issues/9320#issuecomment-991918596

In fact I removed all the permissions for the Nextcloud App and restarted it. Then Nextcloud asks for permissions to access your storage. After a few minutes the auto uploaded started uploading all the photos and videos of the last months without an issue again.

I hope this helps also other people here. And there are lots of issues regarding the auto upload functionality.

InfamousUser commented 2 years ago

I've completely reinstalled the app many times before, it did not fix it. As an additional bug - there is no storage permission request on my phone to begin with, only contacts, camera and calendar.

NicolasGoeddel commented 2 years ago

That's interesting. Because the Nextcloud app does not ask me about contacts, camera or calendar. It only wants the storage permission.

WarmChocolateCake commented 2 years ago

@InfamousUser / @NicolasGoeddel - just to rule this out - does the NC app appear in the relevant sections under Permission Manager for you?

ie, instead of looking at Nextcloud and then looking at it's permissions, doing it the other way around, ie looking under Storage and checking it's listed...

For me, Calendar is "Denied"...

Just a longshot to help the devs rule stuff out

InfamousUser commented 2 years ago

Yes it does - it doesn't appear under files and media and it appears under camera, contacts and calendar. It's consistent.

NicolasGoeddel commented 2 years ago

The settings are consistent on my device too. But at the moment I also have no issues anymore with the autoupload.

InfamousUser commented 2 years ago

I need to correct my previous statement of no storage permission: it doesn't have "Files and media" aka storage permission, it has "all files access" which, get this, is not under permission manager but under special app access, due to Google's stupidity probably. Permission manager and Special app access are in the same directory in settings, makes no sense. Confusing. So I reinstalled it yet again. I see some changes including not being able to select a directory with choose but I need to select the folders I want from the parent directory. Selected but still nothing getting uploaded; no error messages, upload menu empty, no notifications, nothing. I hope someone can take a look at this autoupload soon or remove the functionality, it hasn't been working properly since release, which is many years...

bjo81 commented 2 years ago

Aside from the "parent folder" issue which is annoying the statement "hasn't been working properly since release" is nonsense. On a Xiaomi Redmi Note 7 with LineageOS 18.1 and now a Moto G 30 with Android 11 the upload works fine, maybe your issue is related to some powermanagement of your ROM?

InfamousUser commented 2 years ago

Calling a bug report "nonsense" because it works on your arbitrary device is nonsense and a logical fallacy, not to mention the countless autoupload issues that prove otherwise. If the app doesn't work on the very device that the operating system is modelled for/on (Pixel), then I don't know what it should work on. How would power managment cause a software feature to not work 100% of the time? It has worked before, with various crashes, freezes and related issues, but after some update it stopped working altogether.

bjo81 commented 2 years ago

I didn't mean your bug report in general, but your conclusion to remove the functionality completely because "it hasn't been working properly since release".

InfamousUser commented 2 years ago

Come on guys, tell us what info you need to fix this.

---- 14 May 2022 18:49:17 ----

05-14 18:44:39.989  4102 10350 I RefreshFolderOperation: Checked user@server.tld/folder/Auto upload/Test/ : changed

05-14 18:44:40.564  4102 10350 I ReadFolderRemoteOperation: Synchronized /folder/Auto upload/Test/: Operation finished with HTTP status code 207 (success)

05-14 18:44:42.794  1412  2219 I ActivityTaskManager: START u0 {cmp=com.nextcloud.client/com.owncloud.android.ui.activity.SettingsActivity} from uid 10503

05-14 18:44:42.892  1412  1438 I ActivityTaskManager: Displayed com.nextcloud.client/com.owncloud.android.ui.activity.SettingsActivity: +97ms

05-14 18:44:43.111  4102  4102 I chatty  : uid=10503(com.nextcloud.client) identical 1 line

05-14 18:44:44.568  1412  2219 I ActivityTaskManager: START u0 {cmp=com.nextcloud.client/com.owncloud.android.ui.activity.SyncedFoldersActivity} from uid 10503

05-14 18:44:44.781  1412  1438 I ActivityTaskManager: Displayed com.nextcloud.client/com.owncloud.android.ui.activity.SyncedFoldersActivity: +213ms

05-14 18:45:55.764  4102  4152 E WM-WorkerWrapper: Work [ id=bbc41e32-4d61-44a2-a615-356a5955e499, tags={ com.nextcloud.client.jobs.FilesSyncWork, *, timestamp:1652546693037, name:immediate_files_sync } ] failed because it threw an exception/error

05-14 18:45:55.764  4102  4152 E WM-WorkerWrapper:  at com.nextcloud.client.jobs.FilesSyncWork.doWork(FilesSyncWork.kt:98)

05-14 18:45:55.766  4102  4152 I WM-WorkerWrapper: Worker result FAILURE for Work [ id=bbc41e32-4d61-44a2-a615-356a5955e499, tags={ com.nextcloud.client.jobs.FilesSyncWork, *, timestamp:1652546693037, name:immediate_files_sync } ]

05-14 18:46:58.505  4102  4154 I WM-WorkerWrapper: Worker result SUCCESS for Work [ id=8fd9d0a0-a138-48cf-b333-66aa65afbb58, tags={ com.nextcloud.client.jobs.MediaFoldersDetectionWork, timestamp:1641597324413, *, name:periodic_media_folder_detection } ]

---- 14 May 2022 18:49:17 ----

The FilesSyncWork.doWork errors keep repeating.

JohnBrodie commented 2 years ago

Two LineageOS MotoX4's had the same issue. Phones are both running an older LineageOS (Android 10), Magisk, MicroG. Running NextCloud itself in docker with Nginx in front, no signs of trouble there. Granting the permissions the app never asked for previously (calendar/contacts) didn't fix it. Changing all to "deny", force stopping, opening app and hitting "OK" on the permissions dialog and granting storage permission fixed the issue (at least for now).

There's certainly a bug here somewhere, given that the issue started on both phones around the same time this issue was opened. If there's logging somewhere I can provide I'm happy to, but for now I'll take it just working again. Glad I don't deal with phone apps, the fragmentation on the Android side has to make issues like this really difficult to nail down.

jabdoa2 commented 2 years ago

Two LineageOS MotoX4's had the same issue. Phones are both running an older LineageOS (Android 10), Magisk, MicroG. Running NextCloud itself in docker with Nginx in front, no signs of trouble there. Granting the permissions the app never asked for previously (calendar/contacts) didn't fix it. Changing all to "deny", force stopping, opening app and hitting "OK" on the permissions dialog and granting storage permission fixed the issue (at least for now).

There's certainly a bug here somewhere, given that the issue started on both phones around the same time this issue was opened. If there's logging somewhere I can provide I'm happy to, but for now I'll take it just working again. Glad I don't deal with phone apps, the fragmentation on the Android side has to make issues like this really difficult to nail down.

Thanks for that! This fixed it for me as well. Super weird. Also on LineageOS.

Guess there is some breakage in permission logic in the app? It worked for a long time and stopped to work during April this year. Does that correspond to a certain app update?

InfamousUser commented 2 years ago

Guys, you are commenting on a separate issue to this one. The issue was posted in April last year, and it has been going on since much earlier.