owncloud / android

:phone: The ownCloud Android App
GNU General Public License v2.0
3.76k stars 3.09k forks source link

[BUG] - Auto uploading not syncing at all. #4418

Closed zgjimgjonbalaj closed 1 month ago

zgjimgjonbalaj commented 1 month ago

Actual behaviour

Auto upload Photos/Videos does not work. Last synchronization field shows a date and time of when the last supposed sync occurred however pictures/videos are not uploaded. I've had to use adb to pull the files onto a mac and upload via the desktop client successfully. I've let this run overnight with no luck at all. Logs do not seem to show any issues at all.

Another thing I found odd is when sharing the Camera folder with the app during the initial config; I hit "Use this folder" and I give it access by clicking "allow" but when viewing the app info in system settings and clicking on permissions it doesn't seem like the app has requested any other permissions. My hunch is this is a permissions related issue with stock Pixel OS. I have not tested this on other Androids but will do so and circle back with an update.

Expected behaviour

After setting up the auto uploading parameters the photos and videos should be uploaded automatically.

Steps to reproduce

  1. Install ownCloud app
  2. Login and configure account
  3. Setup photo/video sync

Can this problem be reproduced with the official owncloud server? (url: https://demo.owncloud.org, user: test, password: test)

Not sure, I'd imagine this is app related as I can sync from a desktop client.

Environment data

Android version: 14 (Build: AP1A.240505.005)

Device model: Pixel 7 Pro

Stock or customized system: Stock

ownCloud app version: 4.2.2 (5b2a42e26)

ownCloud server version: Docker 10.14.0.3

Logs

Web server error log

Too much to list here, no errors that I can see but can provide specifics if needed.

ownCloud log (data/owncloud.log)

I grabbed this through the URI and obfuscated username. I do not see anything of value here either.

{"reqId":"gWH7MzLn9RdZev7OOmeG","level":3,"time":"2024-05-30T23:43:01+00:00","remoteAddr":"","user":"--","app":"core","method":"--","url":"--","message":"Exception: {\"Exception\":\"OCP\\\\AppFramework\\\\QueryException\",\"Message\":\"Could not resolve OCA\\\\Federation\\\\SyncJob! Class OCA\\\\Federation\\\\SyncJob does not exist\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/AppFramework\\\/Utility\\\/SimpleContainer.php(109): OC\\\\AppFramework\\\\Utility\\\\SimpleContainer->resolve()\\n#1 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/ServerContainer.php(86): OC\\\\AppFramework\\\\Utility\\\\SimpleContainer->query()\\n#2 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/BackgroundJob\\\/JobList.php(282): OC\\\\ServerContainer->query()\\n#3 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/BackgroundJob\\\/JobList.php(218): OC\\\\BackgroundJob\\\\JobList->buildJob()\\n#4 \\\/var\\\/www\\\/owncloud\\\/core\\\/Command\\\/System\\\/Cron.php(115): OC\\\\BackgroundJob\\\\JobList->getNext()\\n#5 \\\/var\\\/www\\\/owncloud\\\/lib\\\/composer\\\/symfony\\\/console\\\/Command\\\/Command.php(298): OC\\\\Core\\\\Command\\\\System\\\\Cron->execute()\\n#6 \\\/var\\\/www\\\/owncloud\\\/lib\\\/composer\\\/symfony\\\/console\\\/Application.php(1040): Symfony\\\\Component\\\\Console\\\\Command\\\\Command->run()\\n#7 \\\/var\\\/www\\\/owncloud\\\/lib\\\/composer\\\/symfony\\\/console\\\/Application.php(301): Symfony\\\\Component\\\\Console\\\\Application->doRunCommand()\\n#8 \\\/var\\\/www\\\/owncloud\\\/lib\\\/composer\\\/symfony\\\/console\\\/Application.php(171): Symfony\\\\Component\\\\Console\\\\Application->doRun()\\n#9 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Console\\\/Application.php(165): Symfony\\\\Component\\\\Console\\\\Application->run()\\n#10 \\\/var\\\/www\\\/owncloud\\\/console.php(94): OC\\\\Console\\\\Application->run()\\n#11 \\\/var\\\/www\\\/owncloud\\\/occ(11): require_once('\\\/var\\\/www\\\/ownclo...')\\n#12 {main}\",\"File\":\"\\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/AppFramework\\\/Utility\\\/SimpleContainer.php\",\"Line\":95}"}
{"reqId":"c50422d3-7bc5-4885-827e-83fd3fa4b295","level":2,"time":"2024-05-31T09:16:08+00:00","remoteAddr":"172.20.0.5","user":"<hidden user name>","app":"dav","method":"DELETE","url":"\/remote.php\/dav\/uploads\/<hidden user name>\/618311198","message":"Could not get node for path: \"uploads\/<hidden user name>\/618311198\" : File with name \/\/618311198 could not be located"}
{"reqId":"6c87c91d-05a8-40f1-bafd-a33c5f4713a1","level":2,"time":"2024-05-31T09:16:08+00:00","remoteAddr":"172.20.0.5","user":"<hidden user name>","app":"dav","method":"DELETE","url":"\/remote.php\/dav\/uploads\/<hidden user name>\/146790153","message":"Could not get node for path: \"uploads\/<hidden user name>\/146790153\" : File with name \/\/146790153 could not be located"}
{"reqId":"d8c23c53-80e8-40a0-99d5-d8cb143f35d5","level":2,"time":"2024-05-31T09:47:49+00:00","remoteAddr":"172.20.0.5","user":"<hidden user name>","app":"dav","method":"DELETE","url":"\/remote.php\/dav\/uploads\/<hidden user name>\/1765970370","message":"Could not get node for path: \"uploads\/<hidden user name>\/1765970370\" : File with name \/\/1765970370 could not be located"}
{"reqId":"6GCd2QkIG1xSqlRbqEYw","level":3,"time":"2024-05-31T11:43:01+00:00","remoteAddr":"","user":"--","app":"core","method":"--","url":"--","message":"Exception: {\"Exception\":\"OCP\\\\AppFramework\\\\QueryException\",\"Message\":\"Could not resolve OCA\\\\Federation\\\\SyncJob! Class OCA\\\\Federation\\\\SyncJob does not exist\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/AppFramework\\\/Utility\\\/SimpleContainer.php(109): OC\\\\AppFramework\\\\Utility\\\\SimpleContainer->resolve()\\n#1 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/ServerContainer.php(86): OC\\\\AppFramework\\\\Utility\\\\SimpleContainer->query()\\n#2 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/BackgroundJob\\\/JobList.php(282): OC\\\\ServerContainer->query()\\n#3 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/BackgroundJob\\\/JobList.php(218): OC\\\\BackgroundJob\\\\JobList->buildJob()\\n#4 \\\/var\\\/www\\\/owncloud\\\/core\\\/Command\\\/System\\\/Cron.php(115): OC\\\\BackgroundJob\\\\JobList->getNext()\\n#5 \\\/var\\\/www\\\/owncloud\\\/lib\\\/composer\\\/symfony\\\/console\\\/Command\\\/Command.php(298): OC\\\\Core\\\\Command\\\\System\\\\Cron->execute()\\n#6 \\\/var\\\/www\\\/owncloud\\\/lib\\\/composer\\\/symfony\\\/console\\\/Application.php(1040): Symfony\\\\Component\\\\Console\\\\Command\\\\Command->run()\\n#7 \\\/var\\\/www\\\/owncloud\\\/lib\\\/composer\\\/symfony\\\/console\\\/Application.php(301): Symfony\\\\Component\\\\Console\\\\Application->doRunCommand()\\n#8 \\\/var\\\/www\\\/owncloud\\\/lib\\\/composer\\\/symfony\\\/console\\\/Application.php(171): Symfony\\\\Component\\\\Console\\\\Application->doRun()\\n#9 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Console\\\/Application.php(165): Symfony\\\\Component\\\\Console\\\\Application->run()\\n#10 \\\/var\\\/www\\\/owncloud\\\/console.php(94): OC\\\\Console\\\\Application->run()\\n#11 \\\/var\\\/www\\\/owncloud\\\/occ(11): require_once('\\\/var\\\/www\\\/ownclo...')\\n#12 {main}\",\"File\":\"\\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/AppFramework\\\/Utility\\\/SimpleContainer.php\",\"Line\":95}"}
{"reqId":"osWZx9Nfi8lKjM3qCgTA","level":3,"time":"2024-05-31T12:21:46+00:00","remoteAddr":"172.20.0.5","user":"<hidden user name>","app":"PHP","method":"GET","url":"\/apps\/configreport\/report","message":"phpinfo() has been disabled for security reasons at \/var\/www\/owncloud\/apps\/configreport\/lib\/ReportDataCollector.php#475"}
jesmrec commented 1 month ago

@zgjimgjonbalaj did you check the uploads view? (up-arrow icon on the bottom bar of the file list). There, you can check in which status the uploads are. If they failed, the reason is there.

zgjimgjonbalaj commented 1 month ago

@jesmrec No uploads ever appeared there, at least none that I saw. Those I initiated manually however do work and upload successfully.

JuancaG05 commented 1 month ago

Hi @zgjimgjonbalaj! That's weird! 🤔 Do you have a battery-save mode enabled maybe? This can sometimes collide with the workers (background processes) that take care of uploading new pics every 15 minutes. You'll let us know 😄

zgjimgjonbalaj commented 1 month ago

@JuancaG05

Nope, no battery save mode. I have been testing various platforms including seafile and haven't come across issues with others.

Edit: To clarify I can upload and download just fine, the auto uploading features however do not work.

Edit 2: For context. I've got over 9000 files in that directory, am not sure if this could cause issues. In total it's about 46GB of data. Not a huge amount but also not insignificant. When I opened up the folder initially it was blank, I pulled down to refresh (still within the folder selection step) and the images began to appear. That initial blank state however seemed to me like an indication with permissions or something else related. If I go back to re-select the folder this initial blank state is always present.

zgjimgjonbalaj commented 1 month ago

Update: Attempted creating a new folder and syncing a separate folder on my Pixel 7 Pro containing images like WhatsApp, Messenger or other. Each time I update the folder to sync I leave it for a minute come back check the folder and the uploads tab with no changes. In the web server logs output to STDOUT in docker I do not see errors and only see 200 HTTP codes for routes index.php and remote.php. I've tried a variety of configurations (Charging, Disabling WiFi etc) with no luck.

I do not see errors anywhere, the app just simply doesn't want to upload anything from auto upload folder.

zgjimgjonbalaj commented 1 month ago

@JuancaG05 @jesmrec - I may have misunderstood how this works but not 100%. After allowing background processes for the app on two separate phones (and taking new pictures) I do see new photos uploading. I guess the question I have is does this not backup old photos as well? If not, I guess I would suggest maybe a sort of note or disclaimer somewhere that could indicate that. I might have been influenced by previous backup apps that were doing exactly that (uploading all photos) and expected this to happen with ownCloud as well.

jesmrec commented 1 month ago

@zgjimgjonbalaj it does not backup old photos. Auto uploads feature uploads pictures & videos from the camera folder (not other folders) that are taken from the moment it is enabled on.

JuancaG05 commented 1 month ago

Hi @zgjimgjonbalaj! Exactly, just as @jesmrec says, the feature is not intended to backup old pictures or videos. There are already some issues related to that, you can check https://github.com/owncloud/android/issues/3867

zgjimgjonbalaj commented 1 month ago

Got it, well thank you @jesmrec @JuancaG05 both for indulging me here and helping out appreciate it. I will close this out since it also looks like you already have a feature request for this.