NoUserException Backends provided no user object

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 32.0.3
  • Operating system and version (e.g., Ubuntu 24.04):
    • Ubuntu 24.04.3 LTS
  • Web server and version (e.g, Apache 2.4.25):
    • latest AIO standard
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • latest AIO standard
  • PHP version (e.g, 8.3):
    • 8.3.28
  • Is this the first time you’ve seen this error? (Yes / No):
    • No
  • When did this problem seem to first start?
    • after migrating to AIO
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • AIO
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • No

Summary of the issue you are facing:

Our nextcloud.log is filled with a lot of following errors:

NoUserException Backends provided no user object
Backends provided no user object for sandra

Here is the raw output:

raw output

{"reqId":"CFtyhGBhCU2r5Rl7Lapb","level":3,"time":"2026-01-12T09:04:52+00:00","remoteAddr":"XXX.XXX.XXX.XXX","user":"laura","app":"files","method":"GET","url":"/ocs/v2.php/apps/recommendations/api/v1/recommendations","message":"Backends provided no user object for sandra","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:146.0) Gecko/20100101 Firefox/146.0","version":"32.0.3.2","exception":{"Exception":"OC\\User\\NoUserException","Message":"Backends provided no user object","Code":0,"Trace":[{"function":"getUserFolder","class":"OC\\Files\\Node\\Root","type":"->","args":["sandra"]},{"file":"/var/www/html/lib/private/Files/Node/LazyFolder.php","line":64,"function":"call_user_func_array","args":[[{"__class__":"OC\\Files\\Node\\Root"},"getUserFolder"],["sandra"]]},{"file":"/var/www/html/lib/private/Files/Node/LazyRoot.php","line":38,"function":"__call","class":"OC\\Files\\Node\\LazyFolder","type":"->","args":["getUserFolder",["sandra"]]},{"file":"/var/www/html/apps/files_sharing/lib/SharedStorage.php","line":157,"function":"getUserFolder","class":"OC\\Files\\Node\\LazyRoot","type":"->","args":["sandra"]},{"file":"/var/www/html/apps/files_sharing/lib/SharedStorage.php","line":519,"function":"init","class":"OCA\\Files_Sharing\\SharedStorage","type":"->","args":[]},{"file":"/var/www/html/lib/private/Files/Storage/Wrapper/Wrapper.php","line":230,"function":"getWrapperStorage","class":"OCA\\Files_Sharing\\SharedStorage","type":"->","args":[]},{"file":"/var/www/html/apps/files_sharing/lib/SharedStorage.php","line":225,"function":"instanceOfStorage","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->","args":["OCA\\Files_Antivirus\\AvirWrapper"]},{"file":"/var/www/html/custom_apps/files_antivirus/lib/AppInfo/Application.php","line":106,"function":"instanceOfStorage","class":"OCA\\Files_Sharing\\SharedStorage","type":"->","args":["OCA\\Files_Antivirus\\AvirWrapper"]},{"file":"/var/www/html/lib/private/Files/Storage/StorageFactory.php","line":66,"function":"OCA\\Files_Antivirus\\AppInfo\\{closure}","class":"OCA\\Files_Antivirus\\AppInfo\\Application","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/Files/Mount/MountPoint.php","line":146,"function":"wrap","class":"OC\\Files\\Storage\\StorageFactory","type":"->","args":["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/Files/Mount/MountPoint.php","line":170,"function":"createStorage","class":"OC\\Files\\Mount\\MountPoint","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/lib/private/Files/Cache/QuerySearchHelper.php","line":229,"function":"getStorage","class":"OC\\Files\\Mount\\MountPoint","type":"->","args":[]},{"file":"/var/www/html/lib/private/Files/Node/Folder.php","line":216,"function":"getCachesAndMountPointsForSearch","class":"OC\\Files\\Cache\\QuerySearchHelper","type":"->","args":[{"__class__":"OC\\Files\\Node\\Root"},"/laura/files",false]},{"file":"/var/www/html/lib/private/Files/Node/Folder.php","line":462,"function":"search","class":"OC\\Files\\Node\\Folder","type":"->","args":[{"__class__":"OC\\Files\\Search\\SearchQuery"}]},{"function":"getRecent","class":"OC\\Files\\Node\\Folder","type":"->","args":[7]},{"file":"/var/www/html/lib/private/Files/Node/LazyFolder.php","line":64,"function":"call_user_func_array","args":[[{"__class__":"OC\\Files\\Node\\Folder"},"getRecent"],[7]]},{"file":"/var/www/html/lib/private/Files/Node/LazyFolder.php","line":526,"function":"__call","class":"OC\\Files\\Node\\LazyFolder","type":"->","args":["getRecent",[7]]},{"file":"/var/www/html/apps/recommendations/lib/Service/RecentlyEditedFilesSource.php","line":55,"function":"getRecent","class":"OC\\Files\\Node\\LazyFolder","type":"->","args":[7]},{"file":"/var/www/html/apps/recommendations/lib/Service/RecommendationService.php","line":72,"function":"getMostRecentRecommendation","class":"OCA\\Recommendations\\Service\\RecentlyEditedFilesSource","type":"->","args":[{"__class__":"OC\\User\\User"},7]},{"function":"OCA\\Recommendations\\Service\\{closure}","class":"OCA\\Recommendations\\Service\\RecommendationService","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/recommendations/lib/Service/RecommendationService.php","line":71,"function":"array_reduce","args":[[{"__class__":"OCA\\Recommendations\\Service\\RecentlyCommentedFilesSource"},"*** sensitive parameters replaced ***",{"__class__":"OCA\\Recommendations\\Service\\RecentlySharedFilesSource"}],{"__class__":"Closure"},[]]},{"file":"/var/www/html/apps/recommendations/lib/Controller/RecommendationController.php","line":58,"function":"getRecommendations","class":"OCA\\Recommendations\\Service\\RecommendationService","type":"->","args":[{"__class__":"OC\\User\\User"}]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":204,"function":"index","class":"OCA\\Recommendations\\Controller\\RecommendationController","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":118,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Recommendations\\Controller\\RecommendationController"},"index"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":153,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Recommendations\\Controller\\RecommendationController"},"index"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":321,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Recommendations\\Controller\\RecommendationController","index",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"_route":"ocs.recommendations.recommendation.index"}]},{"file":"/var/www/html/ocs/v1.php","line":61,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/ocsapp/apps/recommendations/api/v1/recommendations"]},{"file":"/var/www/html/ocs/v2.php","line":8,"args":["/var/www/html/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/html/lib/private/Files/Node/Root.php","Line":340,"message":"Backends provided no user object for sandra","exception":[],"CustomMessage":"Backends provided no user object for sandra"},"id":"6964bec63a917"}

Steps to replicate it (hint: details matter!):

  1. User laura uses the files app (opening it without opening / changing any files is already enough)

  2. error message occurs in nextcloud.log

Configuration

Nextcloud

The output of occ config:list system or similar is best, but, if not possible, the contents of your config.php file from /path/to/nextcloud is fine (make sure to remove any identifiable information!):

{
    "system": {
        "one-click-instance": true,
        "one-click-instance.user-limit": 100,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "apps_paths": [
            {
                "path": "\/var\/www\/html\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/html\/custom_apps",
                "url": "\/custom_apps",
                "writable": true
            }
        ],
        "check_data_directory_permissions": false,
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "password": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        },
        "overwritehost": "cloud.domain.com",
        "overwriteprotocol": "https",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "localhost",
            "cloud.domain.com"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "pgsql",
        "version": "32.0.3.2",
        "overwrite.cli.url": "https:\/\/cloud.domain.com\/",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "maintenance": false,
        "updatechecker": false,
        "loglevel": 2,
        "log_type": "file",
        "logfile": "\/var\/www\/html\/data\/nextcloud.log",
        "log_rotate_size": 10485760,
        "log.condition": {
            "apps": [
                "admin_audit"
            ]
        },
        "preview_max_x": 2048,
        "preview_max_y": 2048,
        "jpeg_quality": 60,
        "enabledPreviewProviders": {
            "1": "OC\\Preview\\Image",
            "2": "OC\\Preview\\MarkDown",
            "3": "OC\\Preview\\MP3",
            "4": "OC\\Preview\\TXT",
            "5": "OC\\Preview\\OpenDocument",
            "6": "OC\\Preview\\Movie",
            "7": "OC\\Preview\\Krita",
            "0": "OC\\Preview\\Imaginary",
            "23": "OC\\Preview\\ImaginaryPDF"
        },
        "enable_previews": true,
        "upgrade.disable-web": true,
        "mail_smtpmode": "smtp",
        "trashbin_retention_obligation": "auto, 30",
        "versions_retention_obligation": "auto, 30",
        "activity_expire_days": 30,
        "simpleSignUpLink.shown": false,
        "share_folder": "\/Shared",
        "one-click-instance.link": "https:\/\/nextcloud.com\/all-in-one\/",
        "upgrade.cli-upgrade-link": "https:\/\/github.com\/nextcloud\/all-in-one\/discussions\/2726",
        "updatedirectory": "\/nc-updater",
        "maintenance_window_start": 100,
        "allow_local_remote_servers": true,
        "davstorage.request_timeout": 3600,
        "documentation_url.server_logs": "https:\/\/github.com\/nextcloud\/all-in-one\/discussions\/5425",
        "htaccess.RewriteBase": "\/",
        "dbpersistent": false,
        "auth.bruteforce.protection.enabled": true,
        "ratelimit.protection.enabled": true,
        "files_external_allow_create_new_local": false,
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "preview_imaginary_url": "***REMOVED SENSITIVE VALUE***",
        "preview_imaginary_key": "***REMOVED SENSITIVE VALUE***",
        "default_phone_region": "DE",
        "profile.enabled": false,
        "app.mail.smtp.timeout": 45,
        "default_language": "de",
        "default_locale": "de_DE",
        "skeletondirectory": "",
        "mail_smtpsecure": "ssl",
        "mail_sendmailmode": "smtp",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtpauth": true,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "forbidden_filename_basenames": [
            "con",
            "prn",
            "aux",
            "nul",
            "com0",
            "com1",
            "com2",
            "com3",
            "com4",
            "com5",
            "com6",
            "com7",
            "com8",
            "com9",
            "com\u00b9",
            "com\u00b2",
            "com\u00b3",
            "lpt0",
            "lpt1",
            "lpt2",
            "lpt3",
            "lpt4",
            "lpt5",
            "lpt6",
            "lpt7",
            "lpt8",
            "lpt9",
            "lpt\u00b9",
            "lpt\u00b2",
            "lpt\u00b3"
        ],
        "forbidden_filename_characters": [
            "<",
            ">",
            ":",
            "\"",
            "|",
            "?",
            "*",
            "\\",
            "\/"
        ],
        "forbidden_filename_extensions": [
            " ",
            ".",
            ".filepart",
            ".part"
        ],
        "DOMAIN": "cloud.domain.com"
    }
}

Apps

The output of occ app:list (if possible).

Enabled:
  - activity: 5.0.0-dev.0
  - bruteforcesettings: 5.0.0-dev.0
  - calendar: 6.1.4
  - circles: 32.0.0
  - cloud_federation_api: 1.16.0
  - collectives: 3.4.0
  - comments: 1.22.0
  - contacts: 8.2.0
  - contactsinteraction: 1.13.1
  - dashboard: 7.12.0
  - dav: 1.34.2
  - deck: 1.16.3
  - drawio: 3.1.2
  - external: 7.0.0
  - federatedfilesharing: 1.22.0
  - federation: 1.22.0
  - files: 2.4.0
  - files_antivirus: 6.1.0
  - files_downloadlimit: 5.0.0-dev.0
  - files_external: 1.24.0
  - files_pdfviewer: 5.0.0-dev.0
  - files_reminders: 1.5.0
  - files_sharing: 1.24.1
  - files_trashbin: 1.22.0
  - files_versions: 1.25.0
  - forms: 5.2.3
  - groupfolders: 20.1.6
  - impersonate: 3.0.0
  - logreader: 5.0.0-dev.0
  - lookup_server_connector: 1.20.0
  - mail: 5.6.5
  - nextcloud-aio: 0.8.0
  - nextcloud_announcements: 4.0.0-dev.0
  - notifications: 5.0.0-dev.0
  - notify_push: 1.3.0
  - oauth2: 1.20.0
  - onlyoffice: 9.12.0
  - password_policy: 4.0.0-dev.0
  - photos: 5.0.0-dev.1
  - polls: 8.6.2
  - privacy: 4.0.0-dev.0
  - profile: 1.1.0
  - provisioning_api: 1.22.0
  - quota_warning: 1.22.0
  - recommendations: 5.0.0-dev.0
  - related_resources: 3.0.0-dev.0
  - serverinfo: 4.0.0-dev.0
  - settings: 1.15.1
  - sharebymail: 1.22.0
  - spreed: 22.0.7
  - support: 4.0.0-dev.0
  - suspicious_login: 10.0.0-dev.0
  - systemtags: 1.22.0
  - tasks: 0.17.1
  - text: 6.0.1
  - theming: 2.7.0
  - theming_customcss: 1.19.0
  - twofactor_admin: 4.9.0
  - twofactor_backupcodes: 1.21.0
  - twofactor_totp: 14.0.0
  - updatenotification: 1.22.0
  - user_status: 1.12.0
  - viewer: 5.0.0-dev.0
  - weather_status: 1.12.0
  - webhook_listeners: 1.3.0
  - whiteboard: 1.5.0
  - workflowengine: 2.14.0
Disabled:
  - admin_audit: 1.22.0
  - app_api: 32.0.0 (installed 4.0.6)
  - encryption: 2.20.0
  - firstrunwizard: 5.0.0-dev.0 (installed 2.9.0)
  - notes: 4.12.4
  - survey_client: 4.0.0-dev.0 (installed 1.11.0)
  - twofactor_nextcloud_notification: 6.0.0-dev.0
  - user_ldap: 1.23.0

I´m happy to provide any information needed but don´t know what to provide more. Thanks a lot!!!

Appears to be failing when the Recommended Files service loads up a shared folder (shared by the user sandra) while logged in as user (laura).

Anything special about the user sandra?

How did you migrate to AIO (there are several approaches)?

It appears you’re just using the standard database user backend.

Anything else you can think of like using the ownership transfer feature, manual database changes, or the like?

Thank you for your fast response!

I totally forgot to write that. I deleted the user sandra before the migration.
The user does not exist anymore.

For the migration i went for “Migrate the files and the database” in all-in-one/migration.md at main · nextcloud/all-in-one · GitHub
I was on a shared host before, where i was not able to use cli, so i had a step in between. I needed to rebuild my old system with mariadb, postgresql and nextcloud docker container to be able to migrate to postgresql. After a lot of testing the final migration went without any errors.

I use the standard database user backend.

So i guess it is because of deleting the user and something in the background did not work well?

I push this topic, because the errors are spamming my nextcloud log and i cannot really see if other errors exist. Does anyone have an idea how i could solve this problem? Thanks a lot!

I tested a little bit more but i cannot get rid of these errors.
I created a new user with the same account name.
As long as the user exists, the errors do not occur.
Then i used occ files:scan on this user and deleted the user.
Then the errors come up again.
Then i did a occ files:scan –all but the errors are still coming up.

Anyone an idea what i can try? I don´t want to keep a user just to not have the error messages.

I checked if the error also appears in the old installation. This is where i deleted the user sandra before i migrated to Nextcloud AIO. There the error doesn´t occur. For now i recreated the user, to not have the nextcloud.log spammed with these errors but i want to get rid of the user and the error.

I also thought about creating an issue on github but while doing that i was redirected to this forum again.
Does anyone have an idea how to go on with this?

Thank you!