nextcloud / nextcloud/server

[Bug]: ValueError while running the setup check after upgrade to 31.0.7

Open
#54,098 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage 31-feedback bug feature: language/translations (l10n/i18n) feature: settings
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

⚠️ This issue respects the following points: ⚠️
Bug description

After updating to version 31.0.7 from 31.0.5, the following "red" error appears on the "settings/admin/overview" page:

Image

An exception occured while running the setup check: ValueError: Unknown format specifier "n" in /home/oc/ssd/html/lib/private/L10N/L10NString.php:68 Stack trace: #0 /home/oc/ssd/html/lib/private/L10N/L10NString.php(68): vsprintf() #1 /home/oc/ssd/html/lib/private/L10N/L10N.php(107): OC\L10N\L10NString->__toString() #2 /home/oc/ssd/html/lib/private/L10N/LazyL10N.php(38): OC\L10N\L10N->n() #3 /home/oc/ssd/html/apps/user_ldap/lib/SetupChecks/LdapConnection.php(87): OC\L10N\LazyL10N->n() #4 /home/oc/ssd/html/lib/private/SetupCheck/SetupCheckManager.php(34): OCA\User_LDAP\SetupChecks\LdapConnection->run() #5 /home/oc/ssd/html/apps/settings/lib/Controller/CheckSetupController.php(134): OC\SetupCheck\SetupCheckManager->runAll() #6 /home/oc/ssd/html/lib/private/AppFramework/Http/Dispatcher.php(200): OCA\Settings\Controller\CheckSetupController->check() #7 /home/oc/ssd/html/lib/private/AppFramework/Http/Dispatcher.php(114): OC\AppFramework\Http\Dispatcher->executeController() #8 /home/oc/ssd/html/lib/private/AppFramework/App.php(161): OC\AppFramework\Http\Dispatcher->dispatch() #9 /home/oc/ssd/html/lib/private/Route/Router.php(315): OC\AppFramework\App::main() #10 /home/oc/ssd/html/lib/base.php(1040): OC\Route\Router->match() #11 /home/oc/ssd/html/index.php(24): OC::handleRequest() #12 {main}

Steps to reproduce
  1. Login and go to "settings/admin/overview" page.
Expected behavior

This error shouldn't occur and hasn't occurred before. The only change is an updated NC version.

Nextcloud Server version

31

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.3

Web server

Apache (supported)

Database engine version

MariaDB

Is this bug present after an update or on a fresh install?

Updated from a MINOR version (ex. 32.0.1 to 32.0.2)

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?
  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other
Configuration report
{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "[redacted]",
            "[redacted]"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "overwrite.cli.url": "https:\/\/[redacted]",
        "dbtype": "mysql",
        "version": "31.0.7.1",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "logtimezone": "Europe\/Warsaw",
        "installed": true,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0
        },
        "filelocking.enabled": true,
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "loglevel": "2",
        "mail_smtpmode": "smtp",
        "mail_smtpsecure": "ssl",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtpauth": 1,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "maintenance": false,
        "theme": "",
        "mail_smtpauthtype": "LOGIN",
        "files_external_allow_create_new_local": "true",
        "log_type": "file",
        "logfile": "\/var\/log\/nextcloud\/nextcloud.log",
        "logdateformat": "F d, Y H:i:s",
        "user.search_min_length": "3",
        "htaccess.RewriteBase": "\/",
        "enabledPreviewProviders": [
            "OC\\Preview\\SGI",
            "OC\\Preview\\Heic",
            "OC\\Preview\\BMP",
            "OC\\Preview\\GIF",
            "OC\\Preview\\JPEG",
            "OC\\Preview\\MarkDown",
            "OC\\Preview\\PNG",
            "OC\\Preview\\PDF",
            "OC\\Preview\\TXT",
            "OC\\Preview\\XBitmap"
        ],
        "allow_user_to_change_mail_address": "",
        "updatechecker": true,
        "updater.server.url": "***REMOVED SENSITIVE VALUE***",
        "preview_max_dimensions": "6016x4000",
        "encryption.use_legacy_base64_encoding": false,
        "encryption.key_storage_migrated": false,
        "mysql.utf8mb4": true,
        "default_phone_region": "PL",
        "maintenance_window_start": 1,
        "ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory"
    }
}
List of activated Apps
Enabled:
  - activity: 4.0.0
  - admin_audit: 1.21.0
  - app_api: 5.0.2
  - bruteforcesettings: 4.0.0
  - camerarawpreviews: 0.8.7
  - circles: 31.0.0
  - cloud_federation_api: 1.14.0
  - comments: 1.21.0
  - contactsinteraction: 1.12.0
  - dashboard: 7.11.0
  - dav: 1.33.0
  - deck: 1.15.1
  - external: 6.0.2
  - federatedfilesharing: 1.21.0
  - federation: 1.21.0
  - files: 2.3.1
  - files_downloadlimit: 4.0.0
  - files_external: 1.23.0
  - files_pdfviewer: 4.0.0
  - files_reminders: 1.4.0
  - files_sharing: 1.23.1
  - files_trashbin: 1.21.0
  - files_versions: 1.24.0
  - firstrunwizard: 4.0.0
  - logreader: 4.0.0
  - lookup_server_connector: 1.19.0
  - music: 2.2.0
  - nextcloud_announcements: 3.0.0
  - notifications: 4.0.0
  - oauth2: 1.19.1
  - password_policy: 3.0.0
  - photos: 4.0.0
  - privacy: 3.0.0
  - profile: 1.0.0
  - provisioning_api: 1.21.0
  - recommendations: 4.0.0
  - related_resources: 2.0.0
  - serverinfo: 3.0.0
  - settings: 1.14.0
  - sharebymail: 1.21.0
  - support: 3.0.0
  - survey_client: 3.0.0
  - systemtags: 1.21.1
  - tasks: 0.16.1
  - text: 5.0.0
  - theming: 2.6.1
  - twofactor_backupcodes: 1.20.0
  - twofactor_totp: 13.0.0-dev.0
  - updatenotification: 1.21.0
  - user_ldap: 1.22.0
  - user_status: 1.11.0
  - viewer: 4.0.0
  - weather_status: 1.11.0
  - webhook_listeners: 1.2.0
  - workflowengine: 2.13.0
Disabled:
  - encryption: 2.19.0 (installed 2.18.0)
  - extract: 1.3.6 (installed 1.3.6)
  - files_clipboard: 0.7.1 (installed 1.0.3)
  - files_external_dropbox: 1.4.3 (installed 2.0.1)
  - files_rightclick: 0.15.1 (installed 1.6.0)
  - files_texteditor: 2.15.1 (installed 2.15.1)
  - onlyoffice: 9.8.0 (installed 9.8.0)
  - snappymail: 2.38.2 (installed 2.38.2)
  - suspicious_login: 9.0.1
  - twofactor_nextcloud_notification: 5.0.0
  - user_external: 3.4.0 (installed 3.4.0)
Nextcloud Signing status
No errors have been found.
Nextcloud Logs
{"reqId":"aIYWYB4lZpjHabUUp4o70gAAAAs","level":3,"time":"2025-07-27T14:06:58+02:00","remoteAddr":"<some_ip>","user":"<me>","app":"no app in context","method":"GET","url":"/settings/ajax/checksetup","message":"Exception running check OCA\\User_LDAP\\SetupChecks\\LdapConnection: Unknown format specifier \"n\"","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:141.0) Gecko/20100101 Firefox/141.0","version":"31.0.7.1","exception":{"Exception":"ValueError","Message":"Unknown format specifier \"n\"","Code":0,"Trace":[{"file":"/home/oc/ssd/html/lib/private/L10N/L10NString.php","line":68,"function":"vsprintf"},{"file":"/home/oc/ssd/html/lib/private/L10N/L10N.php","line":107,"function":"__toString","class":"OC\\L10N\\L10NString","type":"->"},{"file":"/home/oc/ssd/html/lib/private/L10N/LazyL10N.php","line":38,"function":"n","class":"OC\\L10N\\L10N","type":"->"},{"file":"/home/oc/ssd/html/apps/user_ldap/lib/SetupChecks/LdapConnection.php","line":87,"function":"n","class":"OC\\L10N\\LazyL10N","type":"->"},{"file":"/home/oc/ssd/html/lib/private/SetupCheck/SetupCheckManager.php","line":34,"function":"run","class":"OCA\\User_LDAP\\SetupChecks\\LdapConnection","type":"->"},{"file":"/home/oc/ssd/html/apps/settings/lib/Controller/CheckSetupController.php","line":134,"function":"runAll","class":"OC\\SetupCheck\\SetupCheckManager","type":"->"},{"file":"/home/oc/ssd/html/lib/private/AppFramework/Http/Dispatcher.php","line":200,"function":"check","class":"OCA\\Settings\\Controller\\CheckSetupController","type":"->"},{"file":"/home/oc/ssd/html/lib/private/AppFramework/Http/Dispatcher.php","line":114,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/home/oc/ssd/html/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/home/oc/ssd/html/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/home/oc/ssd/html/lib/base.php","line":1040,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/home/oc/ssd/html/index.php","line":24,"function":"handleRequest","class":"OC","type":"::"}],"File":"/home/oc/ssd/html/lib/private/L10N/L10NString.php","Line":68,"message":"Exception running check OCA\\User_LDAP\\SetupChecks\\LdapConnection: Unknown format specifier \"n\"","exception":[],"CustomMessage":"Exception running check OCA\\User_LDAP\\SetupChecks\\LdapConnection: Unknown format specifier \"n\""},"id":"68861b5d6a4cb"}
Additional info

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with apps/user_ldap/lib/SetupChecks/LdapConnection.php at the call reported on line 87, then inspect the formatting path through lib/private/L10N/L10N.php, lib/private/L10N/L10NString.php, and lib/private/L10N/LazyL10N.php. Reproduce the setup check from settings/admin/overview and verify it completes without the Unknown format specifier "n" error.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
authentication, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.