Media search failed: Principal with name not found - LLDAP
Open
@marinofaggiana is already working on this.
Since Aug 11, 2025.
bug
- Dominant language
- Swift
- Stars
- 2.5k
- Forks
- 1k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 13
Description
How to use GitHub
- Please use the 👍 reaction to show that you are affected by the same issue.
- Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
- Subscribe to receive notifications on status change and new comments.
Steps to reproduce
- Set up Nextcloud with LDAP backend
- Sign into mobile app
- Attempt to sync photos, nothing happens and logs result in 404 with incorrect account name.
Expected behaviour
Media syncs and displays.
Actual behaviour
Presented with "No photos or videos have been uploaded". Netxcloud account name is _5291, LDAP account name is . Logging into with into the app is successful but Nextcloud fails when trying to search for due to account name being _5291. This account name was created by Nextcloud on first login via LDAP.
Logs
2025-07-29 23:12:17 [INFO] Network response request: https://nextcloud.redacted/login/v2/poll?token=redacted, result: failure(Alamofire.AFError.responseValidationFailed(reason: Alamofire.AFError.ResponseValidationFailureReason.unacceptableStatusCode(code: 404)))
2025-07-29 23:12:18 [DEBUG] Web view did finish navigation to https://nextcloud.redacted/login/v2/grant
2025-07-29 23:12:18 [INFO] Request started: POST https://nextcloud.redacted/login/v2/poll?token=redacted
2025-07-29 23:12:18 [DEBUG] Returning login poll response for "user" on "https://nextcloud.redacted" for token "redacted".
(159 bytes)
2025-07-29 23:12:19 [DEBUG] Handling login grant values for user on https://nextcloud.redacted
2025-07-29 23:12:19 [DEBUG] View controller is still undefined, will resolve root view controller of first window.
2025-07-29 23:12:19 [DEBUG] Creating account...
2025-07-29 23:12:19 [INFO] Request started: No request created yet.
2025-07-29 23:12:20 [INFO] Network response request: https://nextcloud.redacted/ocs/v2.php/cloud/user, result: success(1244 bytes)
2025-07-29 23:12:20 [DEBUG] Got user profile, creating new account user https://nextcloud.redacted with user user and userId user_5291
2025-07-29 23:12:20 [INFO] Request started: HEAD https://push-notifications.nextcloud.com
2025-07-29 23:12:20 [DEBUG] NCAccount changed user profile to user_5291.
2025-07-29 23:12:20 [INFO] Request started: GET https://nextcloud.redacted/status.php
2025-07-29 23:12:20 [DEBUG] Presenting initial view controller from main storyboard...
2025-07-29 23:12:20 [DEBUG] Account creation for user on https://nextcloud.redacted completed based on login grant values.
2025-07-29 23:12:20 [INFO] Network response request: https://nextcloud.redacted/status.php, result: success(170 bytes)
2025-07-29 23:12:20 [DEBUG] Polling task completed.
2025-07-29 23:12:20 [INFO] Request started: No request created yet.
2025-07-29 23:12:20 [START] Auto upload with 0 photo
2025-07-29 23:12:20 [DEBUG] Login provider view did disappear.
2025-07-29 23:12:20 [DEBUG] Cancelling existing polling task because view did disappear...
2025-07-29 23:12:20 [INFO] Request started: PROPFIND https://nextcloud.redacted/remote.php/dav/files/user_5291
2025-07-29 23:12:20 [INFO] Network response request: https://nextcloud.redacted/ocs/v2.php/cloud/users/user_5291, result: success(1244 bytes)
2025-07-29 23:12:20 [INFO] Request started: No request created yet.
2025-07-29 23:12:20 [INFO] Network response request: https://push-notifications.nextcloud.com, result: success(0 bytes)
2025-07-29 23:12:20 [INFO] Request started: No request created yet.
2025-07-29 23:12:20 [INFO] Network response request: https://nextcloud.redacted/remote.php/dav/files/user_5291, result: success(2013 bytes)
2025-07-29 23:12:20 [INFO] Network response request: https://nextcloud.redacted/ocs/v1.php/cloud/capabilities, result: success(4854 bytes)
2025-07-29 23:12:20 [INFO] Request started: No request created yet.
2025-07-29 23:12:20 [INFO] Request started: PROPFIND https://nextcloud.redacted/remote.php/dav/files/user_5291
2025-07-29 23:12:20 [INFO] Network response request: https://nextcloud.redacted/ocs/v2.php/apps/notifications/api/v2/push, result: failure(Alamofire.AFError.responseValidationFailed(reason: Alamofire.AFError.ResponseValidationFailureReason.unacceptableStatusCode(code: 404)))
2025-07-29 23:12:20 [PUSH NOTIF] Subscribed to Push Notification Server with error Invalid query, please check the syntax. API specifications are here: http://www.freedesktop.org/wiki/Specifications/open-collaboration-services.
user https://nextcloud.redacted
2025-07-29 23:12:20 [INFO] Network response request: https://nextcloud.redacted/ocs/v2.php/apps/files/api/v1/directEditing, result: success(767 bytes)
2025-07-29 23:12:20 [INFO] Request started: No request created yet.
2025-07-29 23:12:20 [INFO] Network response request: https://nextcloud.redacted/remote.php/dav/files/user_5291, result: success(9367 bytes)
2025-07-29 23:12:20 [INFO] Request started: GET https://nextcloud.redacted/index.php/avatar/user_5291/384
2025-07-29 23:12:21 [INFO] Network response request: https://nextcloud.redacted/index.php/avatar/user_5291/384, result: failure(Alamofire.AFError.sessionTaskFailed(error: Error Domain=NSURLErrorDomain Code=-1005 "The network connection was lost." UserInfo={_kCFStreamErrorCodeKey=57, NSUnderlyingError=0x129550f30 {Error Domain=kCFErrorDomainCFNetwork Code=-1005 "(null)" UserInfo={NSErrorPeerAddressKey=<CFData 0x133704910 [0x20f8a04d0]>{length = 16, capacity = 16, bytes = 0x100201bb68811cdf0000000000000000}, _kCFStreamErrorCodeKey=57, _kCFStreamErrorDomainKey=1}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <8623D61E-A064-4E31-8DB7-E410DAFBCD50>.<6>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
"LocalDataTask <8623D61E-A064-4E31-8DB7-E410DAFBCD50>.<6>"
), NSLocalizedDescription=The network connection was lost., NSErrorFailingURLStringKey=https://nextcloud.redacted/index.php/avatar/user_5291/384, NSErrorFailingURLKey=https://nextcloud.redacted/index.php/avatar/user_5291/384, _kCFStreamErrorDomainKey=1}))
2025-07-29 23:12:21 [SYNC] Synchronize favorite for account: user https://nextcloud.redacted
2025-07-29 23:12:21 [INFO] Request started: REPORT https://nextcloud.redacted/remote.php/dav/files/user
2025-07-29 23:12:21 [INFO] Network response request: https://nextcloud.redacted/index.php/avatar/user_5291/384, result: failure(Alamofire.AFError.sessionTaskFailed(error: Error Domain=NSURLErrorDomain Code=-1005 "The network connection was lost." UserInfo={_kCFStreamErrorCodeKey=57, NSUnderlyingError=0x129551770 {Error Domain=kCFErrorDomainCFNetwork Code=-1005 "(null)" UserInfo={NSErrorPeerAddressKey=<CFData 0x133704910 [0x20f8a04d0]>{length = 16, capacity = 16, bytes = 0x100201bb68811cdf0000000000000000}, _kCFStreamErrorCodeKey=57, _kCFStreamErrorDomainKey=1}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <092C1A20-A7DE-4BD2-AFF6-6DA737C17B4B>.<7>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
"LocalDataTask <092C1A20-A7DE-4BD2-AFF6-6DA737C17B4B>.<7>"
), NSLocalizedDescription=The network connection was lost., NSErrorFailingURLStringKey=https://nextcloud.redacted/index.php/avatar/user_5291/384, NSErrorFailingURLKey=https://nextcloud.redacted/index.php/avatar/user_5291/384, _kCFStreamErrorDomainKey=1}))
2025-07-29 23:12:21 [INFO] Network response request: https://nextcloud.redacted/remote.php/dav/files/user, result: failure(Alamofire.AFError.responseValidationFailed(reason: Alamofire.AFError.ResponseValidationFailureReason.unacceptableStatusCode(code: 404)))
2025-07-29 23:12:21 [INFO] Request started: No request created yet.
2025-07-29 23:12:21 [INFO] Network response request: https://nextcloud.redacted/ocs/v2.php/apps/dashboard/api/v1/widgets, result: failure(Alamofire.AFError.responseValidationFailed(reason: Alamofire.AFError.ResponseValidationFailureReason.unacceptableStatusCode(code: 404)))
2025-07-29 23:12:23 [START] Start searchMedia with lessDate 4001-01-01 00:00:00 +0000, greaterDate 0001-01-01 00:00:00 +0000
2025-07-29 23:12:23 [INFO] Request started: SEARCH https://nextcloud.redacted/remote.php/dav
2025-07-29 23:12:23 [ERROR] Media search failed: Principal with name user not found
2025-07-29 23:12:23 [INFO] Network response request: https://nextcloud.redacted/remote.php/dav, result: failure(Alamofire.AFError.responseValidationFailed(reason: Alamofire.AFError.ResponseValidationFailureReason.unacceptableStatusCode(code: 404)))
2025-07-29 23:12:26 [START] Start searchMedia with lessDate 4001-01-01 00:00:00 +0000, greaterDate 0001-01-01 00:00:00 +0000
2025-07-29 23:12:26 [INFO] Request started: No request created yet.
2025-07-29 23:12:26 [ERROR] Media search failed: Principal with name user not found
2025-07-29 23:12:26 [INFO] Network response request: https://nextcloud.redacted/remote.php/dav, result: failure(Alamofire.AFError.responseValidationFailed(reason: Alamofire.AFError.ResponseValidationFailureReason.unacceptableStatusCode(code: 404)))
2025-07-29 23:12:27 [INFO] Request started: PROPFIND https://nextcloud.redacted/remote.php/dav/files/user_5291
2025-07-29 23:12:27 [INFO] Network response request: https://nextcloud.redacted/remote.php/dav/files/user_5291, result: success(9367 bytes)
2025-07-29 23:12:28 [INFO] Request started: PROPFIND https://nextcloud.redacted/remote.php/dav/files/user_5291/Photos
2025-07-29 23:12:28 [INFO] Network response request: https://nextcloud.redacted/remote.php/dav/files/user_5291/Photos, result: success(33346 bytes)
2025-07-29 23:12:29 [START] Start searchMedia with lessDate 4001-01-01 00:00:00 +0000, greaterDate 0001-01-01 00:00:00 +0000
2025-07-29 23:12:29 [INFO] Request started: SEARCH https://nextcloud.redacted/remote.php/dav
2025-07-29 23:12:30 [ERROR] Media search failed: Principal with name user not found
2025-07-29 23:12:30 [INFO] Network response request: https://nextcloud.redacted/remote.php/dav, result: failure(Alamofire.AFError.responseValidationFailed(reason: Alamofire.AFError.ResponseValidationFailureReason.unacceptableStatusCode(code: 404)))
Environment data
iOS version: . iOS 18.5
Nextcloud iOS app version: 7.0.5.3
Server operating system:
Web server: Apache, nginx
Database: Postgres
PHP version:
Nextcloud version: 31.0.7
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.