android icon indicating copy to clipboard operation
android copied to clipboard

"Server not found" when auto uploading photos in 3.26.0 + uploads to `/remote.php/dav/files/username/Fotos/storage/emulated/0/DCIM/camera`

Open jorti opened this issue 10 months ago • 19 comments

⚠️ Before posting ⚠️

  • [X] This is a bug, not a question or an enhancement.
  • [X] I've searched for similar issues and didn't find a duplicate.
  • [X] I've written a clear and descriptive title for this issue, not just "Bug" or "Crash".
  • [X] I agree to follow Nextcloud's Code of Conduct.

Steps to reproduce

  1. Configure auto upload to upload the photos to a specific remote folder, in my case /Fotos/
  2. Auto upload worked fine in versions < 3.26.0, the photos were uploaded directly to that remote folder.
  3. After upgrading to 3.26.0, the uploads fail with many notifications "Server not found".
  4. Looking at the web server logs, I can see it's trying to upload them to the subfolder /Fotos/storage/emulated/0/DCIM/camera/, which doesn't exist and returns a 404:
10.89.10.1 - username [20/Sep/2023:19:05:14 +0000] "HEAD /remote.php/dav/files/username/Fotos/storage/emulated/0/DCIM/camera/IMG_20230920_114543.jpg HTTP/1.1" 404 541 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.26.0"
10.89.10.1 - username [20/Sep/2023:19:05:14 +0000] "PUT /remote.php/dav/files/username/Fotos/storage/emulated/0/DCIM/camera/IMG_20230920_114543.jpg HTTP/1.1" 404 804 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.26.0"
10.89.10.1 - username [20/Sep/2023:19:05:14 +0000] "HEAD /remote.php/dav/files/username/Fotos/storage/emulated/0/DCIM/camera/IMG_20230920_122145.jpg HTTP/1.1" 404 541 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.26.0"
10.89.10.1 - username [20/Sep/2023:19:05:15 +0000] "PUT /remote.php/dav/files/username/Fotos/storage/emulated/0/DCIM/camera/IMG_20230920_122145.jpg HTTP/1.1" 404 804 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.26.0"

Expected behaviour

All photos uploaded to /Fotos

Actual behaviour

Tons of notifications in my phone about "Server not found" as it keeps retrying the upload again and again.

Android version

13

Device brand and model

Poco F3

Stock or custom OS?

Stock

Nextcloud android app version

3.26.0

Nextcloud server version

27.1.0

Using a reverse proxy?

Yes

Android logs

No response

Server error logs

No response

Additional information

No logs from the android app. If really needed, I can get them.

jorti avatar Sep 20 '23 19:09 jorti

Hi,

I also have a "Server not found" error after the app upgraded to 3.26.0. Downgrading to 3.25 works.

Also, after completely removing and reinstalling, upon login none of the folders or files show up in the app.

However, if upgrading from 3.25 to 3.26, the file and folder list present earlier in 3.25 shows, with the error message, (screenshot 1) In this situation if we touch/click a folder then the "server no found" error goes away and I can view up to date, contents within the folder that was accessed. (Screenshot 2)

Phone: Xiaomi 13 pro. Android version 13 Screenshot_2023-09-22-01-38-47-123_com nextcloud client-edit Screenshot_2023-09-22-01-40-19-984_com nextcloud client

ebildebil avatar Sep 21 '23 23:09 ebildebil

Also having this issue, oddly though it works to my NextcloudPi server but not my Docker nextcloud-aio-mastercontainer.... The AIO is a newer revision and I am on 3.26 android app.

DcryptedCA avatar Sep 27 '23 20:09 DcryptedCA

Same issue :/

DomiiBunn avatar Oct 03 '23 05:10 DomiiBunn

I get the same message and my root folder does not refresh, but everything else seams to work. I can browse folders and download files as long as I upgraded from the previous app version and let the previous version initially load/refresh the root folder contents. Uploads seam not to work.

Rolling back to app version 3.25 resolves the issue for me, as discussed here: https://help.nextcloud.com/t/server-not-available-message/170512

Android version

11

Device brand and model

Oneplus 6t

Stock or custom OS?

Stock

Nextcloud android app version

3.26.0

Nextcloud server version

27.1.2

Using a reverse proxy?

Yes

padok avatar Oct 12 '23 13:10 padok

+1

Root folder does not get updated with message "Server nicht verfügbar" ("server not available" in German), but everything else works. I can enter existing (known) folders from the root folder and then I do see the current contetns of those folders and the message disappears. But in the root folder, new items do not appear and it complains about server availability.

Nextcloud Android App 3.26.0 on Android 13 (Galaxy S20FE 5G)

bovender avatar Oct 13 '23 15:10 bovender

Rolling back to app version 3.25 resolves the issue for me, as discussed here

This resolves it for me as well. So 3.26 and above is broken.

corbin-auriti avatar Oct 13 '23 22:10 corbin-auriti

I also have this issue, but for me it is randomly just one of the folders inside my InstantUpload folder that isn't working. Everything else seems fine.

jdaviescoates avatar Nov 07 '23 10:11 jdaviescoates

I have the same issue using 3.26.0 on Android 13. It only started after the update. My server version is 27.1.3. This issue does not occur on my Mac, Windows or Ubuntu machines.

I can browse my uploaded files via the app, and download files, but the upload fails saying server not found.

AntoOnline avatar Nov 07 '23 17:11 AntoOnline

I also just had this issue on 3.26.0, but oddly it updated to 3.26.0 on Sept 16 and photo upload had been working fine until today when I did a lineage OTA update. After rebooting my phone the "server not found" issue disappeared and the stalled uploads finally went through...

stephen304 avatar Nov 13 '23 19:11 stephen304

I also have the same issue - and it only affects one folder. Downgrading to 3.25 works - I will wait for the bug to be fixed before updating the app.

Shame because I really like NC. Hope this gets fixed soon

thejudderman avatar Nov 17 '23 17:11 thejudderman

Logs would be useful for tracking this down: either this way or if you can reproduce on-demand in the Dev edition of the app (e.g. installed from F-Droid) then you can get the logs from Settings->Logs in the app.

joshtrichards avatar Dec 19 '23 16:12 joshtrichards

Resolved in the latest Dev build ¯⁠\⁠⁠(⁠ツ⁠)⁠⁠/⁠¯

corbin-auriti avatar Dec 19 '23 22:12 corbin-auriti

YES! I've upgraded to 3.27, and it all works beautifully. Thank you for sorting out the bug! (whatever it was)

thejudderman avatar Dec 20 '23 13:12 thejudderman

Same issue with android app 3.2.7 Phone: moto G84 Server: Hetzner Storage Share

Android Settings All app permissions are guaranteed. Battery optimization turned off. Sync is enabled in android nextcloud account settings. Cache cleared.

Nextcloud settings turned off all restrictions to uploads while charging or if not connected to free wifi.

Sometimes it works for 1-2 files but then stopps ("connection error").

himijendrix24 avatar Jan 12 '24 11:01 himijendrix24

@himijendrix24 Does the upload folder destination in the server logs also have the (unexpected) path from your local device embedded in it like the original report?

joshtrichards avatar Jan 12 '24 15:01 joshtrichards

This is happening for me too on my Android device. Whenever I select Upload from Camera, then upload a new photo, I get the Server Not Available message.

I also noticed that the image quality looks very poor. I also tried doing this with E2EE enabled on my server by uploading the photo into a secured folder, and it broke my synchronization on my desktop device and I could not delete or access the folder...

I wound up trying to sudo -rm -rf my folder from the server and it showed it as deleted on Ubuntu in the console, but on the webapp, it still showed, as well as on the Android device.

It also showed the encrypted file names in the recent activity of the contents of the encrypted folder, showing that I indeed had something stored in the folder.

Kind of bizarre, and a bit of a problem. Especially if I scan an important document, say a passport or something to my secured folder. Hope this gets resolved, otherwise best bet so far is to just take a photo with Android. Then upload the photo after.

ghost avatar Mar 01 '24 19:03 ghost

Issue Appeared on my Android (GPlay) yesterday again. All my automatic uploads fail with "Server not found" error. The rest of the app continues to function normally.

I allready tried updating server and local app (also tried downgrading). Im using a Reverse Proxy.

Android version

13

Device brand and model

Galaxy S21 5G

Stock or custom OS?

Stock

Nextcloud android app version

I tried 3.27.0 3.28.0 3.28.1

Nextcloud server version

28.0.4.1

Using a reverse proxy?

Yes

Darkblizzard21 avatar Apr 01 '24 11:04 Darkblizzard21

@himijendrix24

have you tried enabling unrestricted data usage(even when data saver is on) in the Android settings for nextcloud? it's working for me after doing that...

I'm on the same phone. motog84 Android 14

tried with nextcloud dev 20240324 and regular 3.28

without that setting, for me autoupload only works if nextcloud is the active application, else it fails with a connection error. (I have to restart the upload and keep nextcloud open, for it to upload, then it uploads just fine, but if I switch to another app the uploads fail again)

QuditWolf avatar Apr 02 '24 04:04 QuditWolf

@himijendrix24

have you tried enabling unrestricted data usage(even when data saver is on) in the Android settings for nextcloud? it's working for me after doing that...

Thank you for this tip, I'm also on a Motorola, android 14. Changing this setting fixes auto upload for me.

Maybe one of the API calls they use to check for WiFi connection triggers the restricted data check.

danwood76 avatar Apr 23 '24 06:04 danwood76