Android: Automatic Upload doesn't work

Created on 29 Dec 2019  Â·  35Comments  Â·  Source: nextcloud/android

Expected behaviour

The Camera Upload doesn't work on Android

Environment data

Android version: 10

Device model: Xiaomi Redmi Note 7

Stock or customized system: Custom (Pixel Experience)

Nextcloud app version: 3.9.2

bug AutoUpload needs infdiscussion

Most helpful comment

I can confirm this with custom folders. Camera Upload works.

All 35 comments

I can confirm this with custom folders. Camera Upload works.

I can also confirm this. I'm using Samsung s10 with android 10. Camera auto upload doesn't work for me.

I have a Google Pixel 2 XL and I can confirm it does not work on custom folders. I also tested this on my sister's Google Pixel 1 and confirmed the same issue.

I Can confirm on Android 9 with Huawei P20 Pro, Nextcloud APP Version 3.9.2
Using default the Folder Settings works, but using a Custom Folder to organize the pictures of all family members in a "/mobiles//" Folder, to have this "/mobiles/" folder synced to our Local PC does not work.

I got i running for 6 pictures, but after 4 Days i saw that autoupload is again block with "connection error"

My Settings for "Camera":
remote-Folder:
/SofortUpload/Camera
Only Wlan and only during charging is off
Use Subfolders is "On"

i take a picture.
The picture apears in a second in the list of uploads. Takes some seconds to upload the 2.3 MB file .But then "Connection error" and the picture is not uploaded

The Folder
/SofortUpload/Camera/2020/01
is already created , but if i remove it, it is recreated correctly during this process

after activating debug Level in the nextcloud server config, i found this entry in logfiles:
There is an uncaught exception, thrown if the Folder already exists.

`[webdav] Debug: Sabre\DAV\Exception\MethodNotAllowed: The resource you tried to create already exists at <>

  1. /kunden/91736_81673/webseiten/cloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 590
    Sabre\DAV\Server->createCollection("uploads/vellett ... 0", Sabre\DAV\MkCol {})
  2. <>
    Sabre\DAV\CorePlugin->httpMkcol(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {})
  3. /kunden/91736_81673/webseiten/cloud/3rdparty/sabre/event/lib/EventEmitterTrait.php line 105
    undefinedundefinedcall_user_func_array([Sabre\DAV\CorePlugin {},"httpMkcol"], [Sabre\HTTP\Requ ... }])
  4. /kunden/91736_81673/webseiten/cloud/3rdparty/sabre/dav/lib/DAV/Server.php line 479
    Sabre\Event\EventEmitter->emit("method:MKCOL", [Sabre\HTTP\Requ ... }])
  5. /kunden/91736_81673/webseiten/cloud/3rdparty/sabre/dav/lib/DAV/Server.php line 254
    Sabre\DAV\Server->invokeMethod(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {})
  6. /kunden/91736_81673/webseiten/cloud/apps/dav/lib/Server.php line 317
    Sabre\DAV\Server->exec()
  7. /kunden/91736_81673/webseiten/cloud/apps/dav/appinfo/v2/remote.php line 35
    OCA\DAV\Server->exec()
  8. /kunden/91736_81673/webseiten/cloud/remote.php line 163
    undefinedundefinedrequire_once("/kunden/91736_8 ... p")

MKCOL /remote.php/dav/uploads/velletti/b09485adc92f84a933985fc738616f30
from 88.217.126.158 by velletti at 2020-01-12T16:45:18+00:00`

Worked with earlier versions, but now I have the same issue:

-Phone: Google Pixel
-Android version: 10
-Nextcloud version: 16, 17, 18 (tried latest versions of each via official Docker container), behind a Traefik reverse proxy
-App version: 3.10.0 from Play Store

Nothing in the Nexcloud logs. Access log shows the following:

46.107.38.104 - USERID [18/Jan/2020:12:08:30 +0100] "MKCOL /remote.php/dav/uploads/USERID/e928ab91eb22628475a69d32c1a01526 HTTP/1.1" 405 247 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.10.0"

It does not seem to matter if the folder is the default one or custom, or whether it exists already or not, the error is always the same. The Uploads page of the app shows "Connection error" for all the failed/pending items.

EDIT: Interesting enough, with a fresh installation of the app the error seems to go away. I explicitly removed the account, then uninstalled and re-installed the app, and the upload feature works now.

Reinstallation of the APP did not help for me.

it looks like a "short tempered" timeout problem:

I take a Picture, AutoUpload tries to put the file to the Server and after 3-5 seconds an "Connection error" occurs in the Android app.

when i open Google Galerie -> select Picture -> Edit and Crop the Image and so reduce also the file Size, it starts working, if the File is lower than 1MB

But Original pictures of the camery have > 2MB .

As i can sync from my PC much larger files, i do not think it is a nexcloud server configuration problem. But maybe . If so, any Hints are welcome.

As i used a managed Server, i do not habe access to http.conf.
i tried to add
LimitRequestBody 0
or
LimitRequestBody 10240000
to .htaccess without success ..

Yet Another Confirmation

I believe custom folder auto uploads failed when my phone automatically upgraded to 3.10. When I try to look in "on device" no files are shown in the custom folder, but they are in the file system.

Moto G5+
App ver 3.10
server 17.0.2?

I have lots of the following error, but I am not sure if it's related

[no app in context] Error: Symfony\Component\Routing\Exception\RouteNotFoundException: Unable to generate a URL for the named route "ocs.provisioning_api.AppsController.disable" as such route does not exist. at <>

  1. /usr/local/www/nextcloud/lib/private/Route/Router.php line 337
    Symfony\Component\Routing\Generator\UrlGenerator->generate("ocs.provisionin ... e", {app: "nextcloud_announcements"}, 1)
  2. /usr/local/www/nextcloud/lib/private/Route/CachingRouter.php line 60
    OC\Route\Router->generate("ocs.provisionin ... e", {app: "nextcloud_announcements"}, false)
  3. /usr/local/www/nextcloud/lib/private/URLGenerator.php line 95
    OC\Route\CachingRouter->generate("ocs.provisionin ... e", {app: "nextcloud_announcements"}, false)
  4. /usr/local/www/nextcloud/apps/nextcloud_announcements/lib/Notification/Notifier.php line 116
    OC\URLGenerator->linkToOCSRouteAbsolute("provisioning_api.AppsController.disable", {app: "nextcloud_announcements"})
  5. /usr/local/www/nextcloud/lib/private/Notification/Manager.php line 253
    OCA\NextcloudAnnouncements\Notification\Notifier->prepare(OC\Notification\Notification {}, "en")
  6. /usr/local/www/nextcloud/apps/notifications/lib/Controller/EndpointController.php line 102
    OC\Notification\Manager->prepare(OC\Notification\Notification {}, "en")
  7. /usr/local/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 170
    OCA\Notifications\Controller\EndpointController->listNotifications("v2")
  8. /usr/local/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 99
    OC\AppFramework\Http\Dispatcher->executeController(OCA\Notification ... {}, "listNotifications")
  9. /usr/local/www/nextcloud/lib/private/AppFramework/App.php line 126
    OC\AppFramework\Http\Dispatcher->dispatch(OCA\Notification ... {}, "listNotifications")
  10. /usr/local/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php line 47
    OC\AppFramework\App::main("OCA\Notificati ... r", "listNotifications", OC\AppFramework\ ... {}, {apiVersion: "v2 ... "})

    1. <>

      OC\AppFramework\Routing\RouteActionHandler->__invoke({apiVersion: "v2 ... "})

    2. /usr/local/www/nextcloud/lib/private/Route/Router.php line 297

      undefinedundefinedcall_user_func(OC\AppFramework\ ... {}, {apiVersion: "v2 ... "})

    3. /usr/local/www/nextcloud/ocs/v1.php line 82

      OC\Route\Router->match("/ocsapp/apps/no ... s")

    4. /usr/local/www/nextcloud/ocs/v2.php line 24

      undefinedundefinedrequire_once("/usr/local/www/nextcloud/ocs/v1.php")

GET /ocs/v2.php/apps/notifications/api/v2/notifications?format=json
from 192.168.1.1 by admin at 2020-02-04T20:27:39-06:00

Same here. From my Android 9 Phone:

upload a image through auto-upload function:

1.2.3.4 - mobile [19/Feb/2020:12:36:02 +0000] "MKCOL /remote.php/dav/uploads/Mobile/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX HTTP/1.1" 405 914 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.10.1"
1.2.3.4 - mobile [19/Feb/2020:13:00:58 +0000] "MOVE /remote.php/dav/uploads/Mobile/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/.file HTTP/1.1" 500 4366 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.10.1"

(Method not allowed + Internal server error)

Doing the same by selecting a file and "share" the file through nextcloud app (explicit upload)

1.2.3.4 - mobile [19/Feb/2020:14:01:22 +0000] "MKCOL /remote.php/dav/uploads/Mobile/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX HTTP/1.1" 201 567 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.10.1"
1.2.3.4 - mobile [19/Feb/2020:14:01:27 +0000] "MOVE /remote.php/dav/uploads/Mobile/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/.file HTTP/1.1" 201 709 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.10.1"

works fine.

@kev-dev1 Did it somehow get fixed for you or is there any particular reason to already close the issue? Unfortunately I haven't been lucky with this although it's a feature I would really like to have working.

Sorry thats I close the Isssue without writing. The Automatic Upload works great. I use this with a custom Folder.

Ok, it's still not working on my phone.

OnePlus 7T Pro
App version: 3.10.1

Would you mind to re-open the issue until there is maybe an official comment that this got fixed or someone can confirm that it might just be broken on my phone? Just from the thread here I would guess that more people are still affected.

Do you use the Google Playstore Version? Well i use the Open Source Version from F-Droid.

Initially I also used the fdroid version. It might got updated to the Play Store version automatically. Auto-update sometimes does this. But still I guess that there shouldn't be any difference regarding this functionality.

I use the F-Droid Version and I'm still affected by that issue.

Google Play store version faces same issue.

There are some issue mixed…
Regarding auto upload, what is not working?
It just does not upload or is it failing while uploading? Can you see the queued uploads?

There are some issue mixed…

yes, as far i now understood you are right.
in my Case it was a mixture of three different problems:

  • Androids safe battery features had stop autoupload if app was not running as active task

    solved in android settings for Nextcloud APP and restarting the phone so nextcloud is allow to run in background and also set ignore battery warnings for nextcloud App

  • autoupload starts but run in to an error for files bigger than 2 mb (as actually all pictures or videos are bigger) so only screenshots or whatsapp picture could be uploaded by autoupload, (normal upload worked) But autouplaod uses "requestbody" for uploads and ignores the max_file_size values for normal manual upload.

    This was solved by fixing the server settings on my private cloud. (looks as if adding
    LimitRequestBody 0 to .htaccess and restart apache by the hoster was the solution Or hoster added an entry to httpd.conf after i called them but i have no access to the file i cant check

  • i tried to upload also OLD already taken pictures, but these pictures are ignored by autouploas

    fixed by removing the pictures and videos via filemanager to a different folder, restart nextcloud app that it sees NO Pictures, then moved pictures back, restart nexcloud app and watch with patient that it now see files are changed AND correctly move them to YEAR\MONTH folder in Nextcloud when the picture was taken.

maybe others have additional problems or just solved one of the reasons ..

Just for documentation:

The issue was caused by "Flow" app in my case.

Symptom:
Auto upload always caused on server:

1.2.3.4 - mobile [19/Feb/2020:12:36:02 +0000] "MKCOL /remote.php/dav/uploads/Mobile/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX HTTP/1.1" 405 914 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.10.1"
1.2.3.4 - mobile [19/Feb/2020:13:00:58 +0000] "MOVE /remote.php/dav/uploads/Mobile/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/.file HTTP/1.1" 500 4366 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.10.1"

The file was uploaded, but the HTTP error caused the client to think the upload failed. This caused the client to repeat the upload over and over again (creating files: file.png, file (1).png file (2).png ...)

Root cause for this issue was that the autoupload folder was shared with another nextcloud user and there was a "flow" configured which sends a message about newly uploaded file into a nextcloud talk chat. I disabled this flow and all worked fine again.

There are some issue mixed…
Regarding auto upload, what is not working?
It just does not upload or is it failing while uploading? Can you see the queued uploads?

Thanks for your reply.

When I set a custom folder on my device to be synchronized to remote (with generic contents), new files and changes are detected correctly and the thumbnails view updates and shows those new files. Unfortunately nothing happens afterwards, no upload is done.

@v4rakh so you see them in upload list and then nothing happens…?

Yes, this was the case for the entire 3.10.x app. I just updated to 3.11 RC4 from fdroid and apparently the problem is gone now and custom upload is working as intended. Were there any changes related to this mechanic or was I just lucky? :-)

Otherwise I think @kev-dev1 could close it.

Also by the most work`s the auto upload and by the most not. Can this also be a server side error?

There's no error logged in my server setup and it's basically just the docker version, all checks passing, so I guess this is just client side.

Another indicator is also that it's working just fine with 3.11 RC4 :-)

It may also be due to the client

From my side, feel free to close if you like.

Ah okey. When the others not this problem have. Than i close this issue.

It's still broken. I'm using a fresh install of 3.11, and only new pictures are uploaded. There are several GB of photos that just won't upload no matter what.

Same here, uploading is broken for me.

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!

I also have the problem, that autouploads do not work with custom folders.
To me it looks like if changes in these folders are simply not detected.

Android 10 (Pixel 3a)
Nextcloud App 3.12.1

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!

Any updates on this?
The issue still exists

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!

Any updates on this?
The issue still exists.

Can I provide any information that helps you with debugging this?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Tie-fighter picture Tie-fighter  Â·  3Comments

ikke-t picture ikke-t  Â·  3Comments

toobie83 picture toobie83  Â·  3Comments

AndyScherzinger picture AndyScherzinger  Â·  3Comments

eppfel picture eppfel  Â·  3Comments