[Bug]: `occ fulltextsearch:index` cause LDAP `getOCName()` error
⚠️ This issue respects the following points: ⚠️
- [X] This is a bug, not a question or a configuration/webserver/proxy issue.
- [ ] This issue is not already reported on Github OR Nextcloud Community Forum (I've searched it).
- [X] Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
- [X] I agree to follow Nextcloud's Code of Conduct.
Bug description
when i use occ fulltextsearch:live then is shows
An unhandled exception has been thrown:
Error: Call to a member function getOCName() on int in /config/www/nextcloud/apps/user_ldap/lib/User_LDAP.php:312
Stack trace:
#0 [internal function]: OCA\User_LDAP\User_LDAP->userExistsOnLDAP()
#1 /config/www/nextcloud/apps/user_ldap/lib/User_Proxy.php(126): call_user_func_array()
#2 /config/www/nextcloud/apps/user_ldap/lib/Proxy.php(140): OCA\User_LDAP\User_Proxy->walkBackends()
#3 /config/www/nextcloud/apps/user_ldap/lib/User_Proxy.php(262): OCA\User_LDAP\Proxy->handleRequest()
#4 /config/www/nextcloud/apps/user_ldap/lib/User_Proxy.php(239): OCA\User_LDAP\User_Proxy->userExistsOnLDAP()
#5 /app/www/public/lib/private/User/Manager.php(168): OCA\User_LDAP\User_Proxy->userExists()
#6 /app/www/public/custom_apps/files_fulltextsearch/lib/Service/LocalFilesService.php(171): OC\User\Manager->get()
#7 /app/www/public/custom_apps/files_fulltextsearch/lib/Service/FilesService.php(841): OCA\Files_FullTextSearch\Service\LocalFilesService->getShareUsersFromFile()
#8 /app/www/public/custom_apps/files_fulltextsearch/lib/Service/FilesService.php(767): OCA\Files_FullTextSearch\Service\FilesService->updateShareNames()
#9 /app/www/public/custom_apps/files_fulltextsearch/lib/Service/FilesService.php(741): OCA\Files_FullTextSearch\Service\FilesService->updateDocumentAccess()
#10 /app/www/public/custom_apps/files_fulltextsearch/lib/Service/FilesService.php(658): OCA\Files_FullTextSearch\Service\FilesService->updateFilesDocumentFromFile()
#11 /app/www/public/custom_apps/files_fulltextsearch/lib/Service/FilesService.php(706): OCA\Files_FullTextSearch\Service\FilesService->generateDocumentFromIndex()
#12 /app/www/public/custom_apps/files_fulltextsearch/lib/Provider/FilesProvider.php(314): OCA\Files_FullTextSearch\Service\FilesService->updateDocument()
#13 /app/www/public/custom_apps/fulltextsearch/lib/Service/IndexService.php(409): OCA\Files_FullTextSearch\Provider\FilesProvider->updateDocument()
#14 /app/www/public/custom_apps/fulltextsearch/lib/Command/Live.php(313): OCA\FullTextSearch\Service\IndexService->updateDocument()
#15 /app/www/public/custom_apps/fulltextsearch/lib/Command/Live.php(262): OCA\FullTextSearch\Command\Live->liveCycle()
#16 /app/www/public/3rdparty/symfony/console/Command/Command.php(298): OCA\FullTextSearch\Command\Live->execute()
#17 /app/www/public/core/Command/Base.php(177): Symfony\Component\Console\Command\Command->run()
#18 /app/www/public/3rdparty/symfony/console/Application.php(1040): OC\Core\Command\Base->run()
#19 /app/www/public/3rdparty/symfony/console/Application.php(301): Symfony\Component\Console\Application->doRunCommand()
#20 /app/www/public/3rdparty/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun()
#21 /app/www/public/lib/private/Console/Application.php(213): Symfony\Component\Console\Application->run()
#22 /app/www/public/console.php(100): OC\Console\Application->run()
#23 /app/www/public/occ(11): require_once('...')
Steps to reproduce
- use 28.0.3 create an ldap account like '12345'
- create some files in this account
- input 'occ fulltextsearch:index'
- the error will be shown in the terminal
Expected behavior
The index job should be finished
Installation method
Other Community project
Nextcloud Server version
28
Operating system
Debian/Ubuntu
PHP engine version
PHP 8.2
Web server
Nginx
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
Updated from a MINOR version (ex. 22.1 to 22.2)
Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
What user-backends are you using?
- [ ] Default user-backend (database)
- [X] LDAP/ Active Directory
- [ ] SSO - SAML
- [ ] Other
Configuration report
{
"system": {
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"instanceid": "***REMOVED SENSITIVE VALUE***",
"mysql.utf8mb4": true,
"dbtableprefix": "oc_",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbtype": "mysql",
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"***REMOVED SENSITIVE VALUE***"
],
"version": "28.0.3.2",
"theme": "***REMOVED SENSITIVE VALUE***",
"log_rotate_size": 54857600,
"knowledgebaseenabled": false,
"installed": true,
"filelocking.enabled": true,
"default_language": "zh_CN",
"default_phone_region": "CN",
"default_locale": "zh",
"enabledPreviewProviders": [
"OC\\Preview\\Imaginary",
"OC\\Preview\\GIF",
"OC\\Preview\\JPEG",
"OC\\Preview\\MarkDown",
"OC\\Preview\\MP3",
"OC\\Preview\\PNG",
"OC\\Preview\\HEIC",
"OC\\Preview\\Image",
"OC\\Preview\\Movie",
"OC\\Preview\\TIFF"
],
"preview_imaginary_url": "***REMOVED SENSITIVE VALUE***",
"trusted_proxies": "***REMOVED SENSITIVE VALUE***",
"apps_paths": [
{
"path": "\/app\/www\/public\/apps",
"url": "\/apps",
"writable": false
},
{
"path": "\/app\/www\/public\/custom_apps",
"url": "\/custom_apps",
"writable": true
}
],
"mail_smtpmode": "smtp",
"mail_smtphost": "***REMOVED SENSITIVE VALUE***",
"mail_smtpport": "587",
"mail_smtpauth": true,
"mail_smtpname": "***REMOVED SENSITIVE VALUE***",
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
"mail_sendmailmode": "smtp",
"mail_smtpsecure": "",
"mail_smtpauthtype": "LOGIN",
"overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
"trashbin_retention_obligation": "auto, 3",
"connectivity_check_domains": [
"www.nextcloud.com",
],
"logtimezone": "Asia\/Shanghai",
"ncd_admin_settings": {
"ncd_aria2_rpc_token": "***REMOVED SENSITIVE VALUE***",
"disallow_aria2_settings": "1",
"ncd_aria2_binary": "\/app\/www\/public\/custom_apps\/ncdownloader\/bin\/aria2c",
"focusVisibleAdded": "",
"ncd_yt_binary": "\/app\/www\/public\/custom_apps\/ncdownloader\/bin\/yt-dlp"
},
"maintenance": false,
"global_aria2_config": {
"all-proxy": "***REMOVED SENSITIVE VALUE***"
},
"updater.release.channel": "stable",
"proxyexclude": [
"***REMOVED SENSITIVE VALUE***",
],
"upgrade.disable-web": true,
"memories.exiftool": "\/app\/www\/public\/custom_apps\/memories\/bin-ext\/exiftool-amd64-musl",
"memories.vod.ffmpeg": "\/usr\/bin\/ffmpeg",
"memories.vod.ffprobe": "\/usr\/bin\/ffprobe",
"memories.vod.path": "\/app\/www\/public\/custom_apps\/memories\/bin-ext\/go-vod-amd64",
"memories.gis_type": 1,
"ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory",
"memories.vod.vaapi": true,
"memories.vod.connect": "go-vod:47788",
"loglevel": 3,
"memories.vod.external": true,
"memories.vod.disable": false,
"auth.bruteforce.protection.enabled": true,
"proxy": "***REMOVED SENSITIVE VALUE***",
"maintenance_window_start": 18,
"app_install_overwrite": [
"ncdownloader"
],
"memcache.local": "\\OC\\Memcache\\APCu",
"memcache.distributed": "\\OC\\Memcache\\Redis",
"memcache.locking": "\\OC\\Memcache\\Redis",
"redis": {
"host": "***REMOVED SENSITIVE VALUE***",
"password": "***REMOVED SENSITIVE VALUE***",
"port": 6379
}
}
}
List of activated Apps
Enabled:
- admin_audit: 1.18.0
- announcementcenter: 6.7.0
- bruteforcesettings: 2.8.0
- calendar: 4.6.6
- circles: 28.0.0-dev
- cloud_federation_api: 1.11.0
- collectives: 2.9.2
- comments: 1.18.0
- contacts: 5.5.2
- contactsinteraction: 1.9.0
- dashboard: 7.8.0
- dav: 1.29.1
- deck: 1.12.2
- drawio: 3.0.2
- end_to_end_encryption: 1.14.1
- external: 5.3.1
- federatedfilesharing: 1.18.0
- federation: 1.18.0
- files: 2.0.0
- files_external: 1.20.0
- files_fulltextsearch: 28.0.0
- files_lock: 28.0.2
- files_pdfviewer: 2.9.0
- files_reminders: 1.1.0
- files_retention: 1.17.1
- files_sharing: 1.20.0
- files_trashbin: 1.18.0
- files_versions: 1.21.0
- fulltextsearch: 28.0.0
- fulltextsearch_elasticsearch: 28.0.0
- impersonate: 1.15.0
- integration_youtube: 0.1.5
- ldap_write_support: 1.10.0
- limit_login_to_ip: 4.0.0
- logreader: 2.13.0
- lookup_server_connector: 1.16.0
- memories: 6.2.2
- ncdownloader: 1.0.20
- notes: 4.9.2
- notifications: 2.16.0
- notify_push: 0.6.9
- oauth2: 1.16.3
- onlyoffice: 9.0.0
- password_policy: 1.18.0
- photos: 2.4.0
- previewgenerator: 5.4.0
- privacy: 1.12.0
- provisioning_api: 1.18.0
- quota_warning: 1.18.0
- related_resources: 1.3.0
- secrets: 1.5.2
- serverinfo: 1.18.0
- settings: 1.10.1
- sharebymail: 1.18.0
- socialsharing_email: 3.1.0
- spreed: 18.0.4
- suspicious_login: 6.0.0
- systemtags: 1.18.0
- tasks: 0.15.0
- text: 3.9.1
- theming: 2.3.0
- twofactor_backupcodes: 1.17.0
- updatenotification: 1.18.0
- user_ldap: 1.19.0
- users_picker: 0.2.3
- viewer: 2.2.0
- workflowengine: 2.10.0
Disabled:
- activity: 2.20.0 (installed 2.20.0)
- assistant: 1.0.3 (installed 1.0.3)
- camerarawpreviews: 0.8.4 (installed 0.8.4)
- encryption: 2.16.0
- externalportal: 1.2.0 (installed 1.2.0)
- files_mindmap: 0.0.30 (installed 0.0.30)
- firstrunwizard: 2.17.0 (installed 2.17.0)
- gptfreeprompt: 1.0.2 (installed 1.0.2)
- groupfolders: 16.0.4 (installed 16.0.4)
- integration_openai: 1.2.0 (installed 1.2.0)
- integration_replicate: 1.1.0 (installed 1.1.0)
- integration_tmdb: 1.0.3 (installed 1.0.3)
- llm: 1.2.1 (installed 1.2.1)
- nextcloud_announcements: 1.17.0 (installed 1.17.0)
- otpmanager: 0.4.0 (installed 0.4.0)
- recognize: 6.1.1 (installed 6.1.1)
- recommendations: 2.0.0 (installed 2.0.0)
- registration: 2.3.0 (installed 2.3.0)
- stt_helper: 1.1.0 (installed 1.1.0)
- stt_whisper: 1.0.8 (installed 1.0.8)
- support: 1.11.0 (installed 1.6.0)
- survey_client: 1.16.0 (installed 1.8.0)
- terms_of_service: 2.4.0 (installed 2.4.0)
- text2image_helper: 1.0.2 (installed 1.0.2)
- twofactor_totp: 10.0.0-beta.2 (installed 6.4.0)
- user_status: 1.8.1 (installed 1.8.1)
- weather_status: 1.8.0 (installed 1.1.0)
Nextcloud Signing status
No errors have been found.
Nextcloud Logs
None
Additional info
No response
use 28.0.3 create an ldap account like '12345'
Does it work with a user account 'abcdef' instead?
its hard to reproduce cause there're several exist pure number account in my nc, the fulltextsearch index job will scan all accounts.
Similar to https://github.com/nextcloud/server/issues/35642 https://github.com/nextcloud/server/issues/43414
@ArtificialOwl