nextcloud / android

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

Automatic Upload doesn't work #5074

Closed kev-dev1 closed 3 years ago

kev-dev1 commented 4 years ago

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

v4rakh commented 4 years ago

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

payano commented 4 years ago

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

Chickenman01 commented 4 years ago

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.

velletti commented 4 years ago

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.

velletti commented 4 years ago

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`

bpetrikovics commented 4 years ago

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.

velletti commented 4 years ago

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 ..

4q1 commented 4 years ago

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

steglicd commented 4 years ago

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.

v4rakh commented 4 years ago

@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.

kev-dev1 commented 4 years ago

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

v4rakh commented 4 years ago

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.

kev-dev1 commented 4 years ago

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

v4rakh commented 4 years ago

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.

steglicd commented 4 years ago

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

steglicd commented 4 years ago

Google Play store version faces same issue.

tobiasKaminsky commented 4 years ago

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?

velletti commented 4 years ago

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:

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

steglicd commented 4 years ago

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.

v4rakh commented 4 years ago

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.

tobiasKaminsky commented 4 years ago

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

v4rakh commented 4 years ago

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.

kev-dev1 commented 4 years ago

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

v4rakh commented 4 years ago

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 :-)

kev-dev1 commented 4 years ago

It may also be due to the client

v4rakh commented 4 years ago

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

kev-dev1 commented 4 years ago

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

nicbou commented 4 years ago

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.

payano commented 4 years ago

Same here, uploading is broken for me.

stale[bot] commented 4 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!

chris246 commented 4 years ago

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

stale[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!

chris246 commented 3 years ago

Any updates on this? The issue still exists

stale[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!

chris246 commented 3 years ago

Any updates on this? The issue still exists.

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

chris246 commented 3 years ago

After installing the latest App Update 3.14.0, all previously "stuck" files were uploaded.