nextcloud / ios

📱 Nextcloud iOS App
https://itunes.apple.com/us/app/nextcloud/id1125420102
GNU General Public License v3.0
1.98k stars 883 forks source link

Creating a folder fails when file is shared to Nextcloud from share sheet #3138

Open epvuc opened 1 week ago

epvuc commented 1 week ago

When sharing a file/photo to Nextcloud, creating a folder to save the shared file into no longer works, and produces an error.
Creating the same folder and path works fine when the application is invoked from the iphone home screen instead of a share. Saving to an existing folder also works without error, even from a share.

While investigating, I completely removed the iOS app, reinstalled it, and re-added the user account with an app password generated in the desktop UI and added to the app via QR code. I also shut down the server, updated from 28.0.5 to 28.0.11by re-creating its docker image from the Nextcloud git repo, and restarted.) The incorrect behavior happened with both versions and across restarts.

Steps to reproduce

  1. Open a photo
  2. Tap "share" icon, select Nextcloud
  3. Tap "Create folder", enter a valid name, tap "Save"

Expected behaviour

A new empty folder should be created, the newly-created folder should be shown, and "Upload 1 files" should upload the shared file to said folder.

Actual behaviour

  1. An error box appears saying " The server was unable to complete your request. If this happens again, please send the technical details below to the server administrator. More details can be found in the server log."
  2. The folder is not created on the server.
  3. The save dialog shows the new folder name as an empty folder as if it had been created.
  4. Uploading obviously fails.

Logs

The server logs a number of PROPFIND calls from the client for a bizarre selection of paths which include components from previous attempts hours earlier.

ncapp-1  | 123.123.123.123 - user [29/Oct/2024:02:49:34 +0000] "PROPFIND /remote.php/dav/files/user/testq/aaaaa/aaaaa/632apt/folder/1029/name/testfolder HTTP/1.1" 404 1356 "-" "Mozilla/5.0 (iOS) Nextcloud-iOS/6.0.0"
ncapp-1  | 123.123.123.123 - user [29/Oct/2024:02:49:34 +0000] "PROPFIND /remote.php/dav/files/user/export/testq/aaaaa/aaaaa/632apt/folder/1029/name/testfolder HTTP/1.1" 404 1356 "-" "Mozilla/5.0 (iOS) Nextcloud-iOS/6.0.0"
ncapp-1  | 123.123.123.123 - user [29/Oct/2024:02:49:34 +0000] "PROPFIND /remote.php/dav/files/user/snap/testq/aaaaa/aaaaa/632apt/folder/1029/name/testfolder HTTP/1.1" 404 1356 "-" "Mozilla/5.0 (iOS) Nextcloud-iOS/6.0.0"
ncapp-1  | 123.123.123.123 - user [29/Oct/2024:02:49:34 +0000] "PROPFIND /remote.php/dav/files/user/name/testfolder HTTP/1.1" 404 1356 "-" "Mozilla/5.0 (iOS) Nextcloud-iOS/6.0.0"
ncapp-1  | 123.123.123.123 - user [29/Oct/2024:02:49:34 +0000] "PROPFIND /remote.php/dav/files/user/testfolder HTTP/1.1" 404 1356 "-" "Mozilla/5.0 (iOS) Nextcloud-iOS/6.0.0"
ncapp-1  | 123.123.123.123 - user [29/Oct/2024:02:49:34 +0000] "PROPFIND /remote.php/dav/files/user/snap/1029/name/testfolder HTTP/1.1" 404 1356 "-" "Mozilla/5.0 (iOS) Nextcloud-iOS/6.0.0"
ncapp-1  | 123.123.123.123 - user [29/Oct/2024:02:49:34 +0000] "PROPFIND /remote.php/dav/files/user/testfolder HTTP/1.1" 404 1356 "-" "Mozilla/5.0 (iOS) Nextcloud-iOS/6.0.0"
ncapp-1  | 123.123.123.123 - user [29/Oct/2024:02:49:34 +0000] "PROPFIND /remote.php/dav/files/user/632apt/folder/1029/name/testfolder HTTP/1.1" 404 1356 "-" "Mozilla/5.0 (iOS) Nextcloud-iOS/6.0.0"

Similarly, the iOS Nextcloud client logs the same operations:

2024-10-28 19:23:31 [INFO] Start Share session with level 1 Nextcloud Hydrogen for iOS 6.0.0.36 © 2024
2024-10-28 19:23:31 Network request started: PROPFIND https://mydomain.com/remote.php/dav/files/user
2024-10-28 19:23:31 Network response request: https://mydomain.com/remote.php/dav/files/user, result: success(195858 bytes)
2024-10-28 19:23:58 Network request started: PROPFIND https://mydomain.com/remote.php/dav/files/user/testq/aaaaa/aaaaa/632apt/folder
2024-10-28 19:23:58 Network request started: PROPFIND https://mydomain.com/remote.php/dav/files/user/export/testq/aaaaa/aaaaa/632apt/folder
2024-10-28 19:23:58 Network request started: PROPFIND https://mydomain.com/remote.php/dav/files/user/snap/testq/aaaaa/aaaaa/632apt/folder
2024-10-28 19:23:58 Network request started: PROPFIND https://mydomain.com/remote.php/dav/files/user/632apt/folder
2024-10-28 19:23:58 Network request started: PROPFIND https://mydomain.com/remote.php/dav/files/user/folder
2024-10-28 19:23:58 Network response request: https://mydomain.com/remote.php/dav/files/user/testq/aaaaa/aaaaa/632apt/folder, result: failure(Alamofire.AFError.responseValidationFailed(reason: Alamofire.AFError.ResponseValidationFailureReason.unacceptableStatusCode(code: 404)))
2024-10-28 19:23:58 Network response request: https://mydomain.com/remote.php/dav/files/user/snap/testq/aaaaa/aaaaa/632apt/folder, result: failure(Alamofire.AFError.responseValidationFailed(reason: Alamofire.AFError.ResponseValidationFailureReason.unacceptableStatusCode(code: 404)))
2024-10-28 19:23:58 Network response request: https://mydomain.com/remote.php/dav/files/user/632apt/folder, result: failure(Alamofire.AFError.responseValidationFailed(reason: Alamofire.AFError.ResponseValidationFailureReason.unacceptableStatusCode(code: 404)))
2024-10-28 19:23:58 Network response request: https://mydomain.com/remote.php/dav/files/user/export/testq/aaaaa/aaaaa/632apt/folder, result: failure(Alamofire.AFError.responseValidationFailed(reason: Alamofire.AFError.ResponseValidationFailureReason.unacceptableStatusCode(code: 404)))
2024-10-28 19:23:58 Network response request: https://mydomain.com/remote.php/dav/files/user/folder, result: failure(Alamofire.AFError.responseValidationFailed(reason: Alamofire.AFError.ResponseValidationFailureReason.unacceptableStatusCode(code: 404)))

Environment data

iOS version: iPhone 13pro, iOS 18.0.1

Nextcloud iOS app version: 6.0.0

Server operating system: Linux (docker image from https://github.com/nextcloud/docker.git)

Web server: Apache/2.4.57 (Debian) PHP/8.2.8

Database: MariaDB 10.8

PHP version: PHP/8.2.8

Nextcloud version: 28.0.11.1

error message:

Alt Text
richardwonka commented 3 days ago

Can confirm