While upgrading from 23.0.3: OC\User\NoUserException: Backends provided no user object

Nextcloud version (eg, 20.0.5): 23.0.3
Operating system and version (eg, Ubuntu 20.04): Debian GNU/Linux 11 (bullseye)
Apache or nginx version (eg, Apache 2.4.25): 2.4.53-1~deb11u1
PHP version (eg, 7.4): 7.4.28-1+deb11u1

The issue you are facing:

When trying to upgrade from 23.0.3 to 23.0.5, I am getting a “backup error” message and the upgrade process stops.

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:
Simply hit the upgrade button in the admin tab. See the log output below. “Testuser” is as test user that has been set up some time ago to test user creation and login and has been deleted since. It has never been used.

The output of your Nextcloud log in Admin > Logging:

    OC\User\NoUserException: Backends provided no user object

    <<closure>>
    OC\Files\Node\Root->getUserFolder()

    /var/www/html/path/lib/private/Files/Node/LazyFolder.php - line 65:
    call_user_func_array()

    /var/www/html/path/lib/private/Files/Node/LazyRoot.php - line 40:
    OC\Files\Node\LazyFolder->__call()

    /var/www/html/path/apps/duplicatefinder/lib/Service/FolderService.php - line 40:
    OC\Files\Node\LazyRoot->getUserFolder()

    /var/www/html/path/apps/duplicatefinder/lib/Service/FileInfoService.php - line 208:
    OCA\DuplicateFinder\Service\FolderService->getNodeByFileInfo()

    /var/www/html/path/apps/duplicatefinder/lib/Listener/FileInfoListener.php - line 39:
    OCA\DuplicateFinder\Service\FileInfoService->calculateHashes()

    /var/www/html/path/lib/private/EventDispatcher/ServiceEventListener.php - line 87:
    OCA\DuplicateFinder\Listener\FileInfoListener->handle()

    /var/www/html/path/3rdparty/symfony/event-dispatcher/EventDispatcher.php - line 251:
    OC\EventDispatcher\ServiceEventListener->__invoke()

    /var/www/html/path/3rdparty/symfony/event-dispatcher/EventDispatcher.php - line 73:
    Symfony\Component\EventDispatcher\EventDispatcher->callListeners()

    /var/www/html/path/lib/private/EventDispatcher/EventDispatcher.php - line 88:
    Symfony\Component\EventDispatcher\EventDispatcher->dispatch()

    /var/www/html/path/lib/private/EventDispatcher/EventDispatcher.php - line 100:
    OC\EventDispatcher\EventDispatcher->dispatch()

    /var/www/html/path/apps/duplicatefinder/lib/Service/FileInfoService.php - line 143:
    OC\EventDispatcher\EventDispatcher->dispatchTyped()

    /var/www/html/path/apps/duplicatefinder/lib/Listener/FilesytemListener.php - line 67:
    OCA\DuplicateFinder\Service\FileInfoService->save()

    /var/www/html/path/lib/private/EventDispatcher/ServiceEventListener.php - line 87:
    OCA\DuplicateFinder\Listener\FilesytemListener->handle()

    /var/www/html/path/3rdparty/symfony/event-dispatcher/EventDispatcher.php - line 251:
    OC\EventDispatcher\ServiceEventListener->__invoke()

    /var/www/html/path/3rdparty/symfony/event-dispatcher/EventDispatcher.php - line 73:
    Symfony\Component\EventDispatcher\EventDispatcher->callListeners()

    /var/www/html/path/lib/private/EventDispatcher/EventDispatcher.php - line 88:
    Symfony\Component\EventDispatcher\EventDispatcher->dispatch()

    /var/www/html/path/lib/private/EventDispatcher/EventDispatcher.php - line 100:
    OC\EventDispatcher\EventDispatcher->dispatch()

    /var/www/html/path/lib/private/Files/Node/HookConnector.php - line 118:
    OC\EventDispatcher\EventDispatcher->dispatchTyped()

    /var/www/html/path/lib/private/legacy/OC_Hook.php - line 106:
    OC\Files\Node\HookConnector->postWrite()

    /var/www/html/path/lib/private/Files/View.php - line 1284:
    OC_Hook::emit()

    /var/www/html/path/lib/private/Files/View.php - line 1212:
    OC\Files\View->runHooks()

    /var/www/html/path/lib/private/Files/View.php - line 271:
    OC\Files\View->basicOperation()

    /var/www/html/path/lib/private/Files/Node/Folder.php - line 172:
    OC\Files\View->mkdir()

    /var/www/html/path/apps/spreed/lib/TInitialState.php - line 127:
    OC\Files\Node\Folder->newFolder()

    /var/www/html/path/apps/spreed/lib/Files/TemplateLoader.php - line 99:
    OCA\Talk\Files\TemplateLoader->publishInitialStateForUser()

    /var/www/html/path/lib/private/EventDispatcher/ServiceEventListener.php - line 87:
    OCA\Talk\Files\TemplateLoader->handle()

    /var/www/html/path/3rdparty/symfony/event-dispatcher/EventDispatcher.php - line 251:
    OC\EventDispatcher\ServiceEventListener->__invoke()

    /var/www/html/path/3rdparty/symfony/event-dispatcher/EventDispatcher.php - line 73:
    Symfony\Component\EventDispatcher\EventDispatcher->callListeners()

    /var/www/html/path/lib/private/EventDispatcher/EventDispatcher.php - line 88:
    Symfony\Component\EventDispatcher\EventDispatcher->dispatch()

    /var/www/html/path/lib/private/EventDispatcher/EventDispatcher.php - line 100:
    OC\EventDispatcher\EventDispatcher->dispatch()

    /var/www/html/path/apps/dashboard/lib/Controller/DashboardController.php - line 97:
    OC\EventDispatcher\EventDispatcher->dispatchTyped()

    /var/www/html/path/lib/private/AppFramework/Http/Dispatcher.php - line 217:
    OCA\Dashboard\Controller\DashboardController->index()

    /var/www/html/path/lib/private/AppFramework/Http/Dispatcher.php - line 126:
    OC\AppFramework\Http\Dispatcher->executeController()

    /var/www/html/path/lib/private/AppFramework/App.php - line 157:
    OC\AppFramework\Http\Dispatcher->dispatch()

    /var/www/html/path/lib/private/Route/Router.php - line 302:
    OC\AppFramework\App::main()

    /var/www/html/path/lib/base.php - line 1006:
    OC\Route\Router->match()

    /var/www/html/path/index.php - line 36:
    OC::handleRequest()


    Backends provided no user object for Testuser

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => 'xxxxx',
  'passwordsalt' => 'xxxxx',
  'secret' => 'xxxxx',
  'trusted_domains' => 
  array (
    0 => 'somedomain.sometld',
  ),
  'datadirectory' => '/var/www/html/path/data',
  'dbtype' => 'mysql',
  'version' => '23.0.3.2',
  'overwrite.cli.url' => 'http://somedomain.sometld',
  'dbname' => 'xxxxx',
  'dbhost' => 'xxxxx',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'xxxxx',
  'dbpassword' => 'xxxxx',
  'installed' => true,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'mail_from_address' => 'xxxxx',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => 'xxxxx',
  'mail_smtphost' => 'xxxxx',
  'mail_smtpport' => '465',
  'default_phone_region' => 'xxxxx',
  'mail_smtpauthtype' => 'xxxxx',
  'mail_smtpauth' => 1,
  'mail_smtpsecure' => 'ssl',
  'mail_smtpname' => 'xxxxx',
  'mail_smtppassword' => 'xxxxx',
  'maintenance' => false,
  'updater.secret' => 'xxxxx',
);

The output of your Apache/nginx/system log in /var/log/____:

PASTE HERE

PASTE HERE


Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.