-
Notifications
You must be signed in to change notification settings - Fork 98
Description
Steps to reproduce
Error appears in the logs with cron jobs, or when using docker run (...) occ groupfolders:expire -v
=> That was the only step to reproduce the "backends provided no user object" error (prior to update 15.3.2 - 16.0.1).
Regarding "duplicate entry for key", see 4 comments starting from #2559 (comment)
Actual behaviour
In Root.php line 364:
[OC\User\NoUserException] Backends provided no user object
Server configuration
Operating system:
Debian 12 / Docker 24
Web server:
Nginx reverse proxy
Nextcloud version:
27.1
Group folders version:
15.3
Updated from an older Nextcloud/ownCloud or fresh install:
Updated from 27.0
Where did you install Nextcloud from:
Nextcloud AIO
Are you using external storage, if yes which one: local/s3/smb/sftp/...
No
Are you using encryption: yes/no
No
Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/Saml/...
No
Logs (docker run)
Exception trace:
at /var/www/html/lib/private/Files/Node/Root.php:364
OC\Files\Node\Root->getUserFolder() at n/a:n/a
call_user_func_array() at /var/www/html/lib/private/Files/Node/LazyFolder.php:74
OC\Files\Node\LazyFolder->__call() at /var/www/html/lib/private/Files/Node/LazyRoot.php:40
OC\Files\Node\LazyRoot->getUserFolder() at /var/www/html/custom_apps/groupfolders/lib/Versions/VersionsBackend.php:73
OCA\GroupFolders\Versions\VersionsBackend->getVersionsForFile() at /var/www/html/custom_apps/groupfolders/lib/Versions/GroupVersionsExpireManager.php:72
OCA\GroupFolders\Versions\GroupVersionsExpireManager->expireFolder() at /var/www/html/custom_apps/groupfolders/lib/Versions/GroupVersionsExpireManager.php:59
OCA\GroupFolders\Versions\GroupVersionsExpireManager->expireAll() at /var/www/html/custom_apps/groupfolders/lib/Command/ExpireGroup/ExpireGroupVersions.php:66
OCA\GroupFolders\Command\ExpireGroup\ExpireGroupVersions->execute() at /var/www/html/custom_apps/groupfolders/lib/Command/ExpireGroup/ExpireGroupVersionsTrash.php:54
OCA\GroupFolders\Command\ExpireGroup\ExpireGroupVersionsTrash->execute() at /var/www/html/3rdparty/symfony/console/Command/Command.php:298
Symfony\Component\Console\Command\Command->run() at /var/www/html/core/Command/Base.php:177
OC\Core\Command\Base->run() at /var/www/html/3rdparty/symfony/console/Application.php:1040
Symfony\Component\Console\Application->doRunCommand() at /var/www/html/3rdparty/symfony/console/Application.php:301
Symfony\Component\Console\Application->doRun() at /var/www/html/3rdparty/symfony/console/Application.php:171
Symfony\Component\Console\Application->run() at /var/www/html/lib/private/Console/Application.php:211
OC\Console\Application->run() at /var/www/html/console.php:100
require_once() at /var/www/html/occ:11
Logs (cron errors in nextcloud admin panel)
Error core
OC\User\NoUserException: Backends provided no user object
<<closure>>
OC\Files\Node\Root->getUserFolder("")
/var/www/html/lib/private/Files/Node/LazyFolder.php - line 74:
call_user_func_array([ [ "OC\\Fil ... "], [ ""])
/var/www/html/lib/private/Files/Node/LazyRoot.php - line 40:
OC\Files\Node\LazyFolder->__call("getUserFolder", [ ""])
/var/www/html/custom_apps/groupfolders/lib/Versions/VersionsBackend.php - line 73:
OC\Files\Node\LazyRoot->getUserFolder("")
/var/www/html/custom_apps/groupfolders/lib/Versions/GroupVersionsExpireManager.php - line 72:
OCA\GroupFolders\Versions\VersionsBackend->getVersionsForFile([ "OC\\User\\User"], [ "OC\\Files\\FileInfo"])
/var/www/html/custom_apps/groupfolders/lib/Versions/GroupVersionsExpireManager.php - line 59:
OCA\GroupFolders\Versions\GroupVersionsExpireManager->expireFolder([ 2,"LaTeleS ... "])
/var/www/html/custom_apps/groupfolders/lib/BackgroundJob/ExpireGroupVersions.php - line 43:
OCA\GroupFolders\Versions\GroupVersionsExpireManager->expireAll()
/var/www/html/lib/public/BackgroundJob/Job.php - line 81:
OCA\GroupFolders\BackgroundJob\ExpireGroupVersions->run(null)
/var/www/html/lib/public/BackgroundJob/TimedJob.php - line 103:
OCP\BackgroundJob\Job->start([ "OC\\BackgroundJob\\JobList"])
/var/www/html/lib/public/BackgroundJob/TimedJob.php - line 93:
OCP\BackgroundJob\TimedJob->start([ "OC\\BackgroundJob\\JobList"])
/var/www/html/cron.php - line 152:
OCP\BackgroundJob\TimedJob->execute([ "OC\\BackgroundJob\\JobList"], [ "OC\\Log"])
The bug
It seems the error is due to this line where getVersionsForFile is called with a dummy user, which isn't implemented (yet ?) since getVersionsForFile is clearly requiring a real user, because it will call $user->getUID() which will return NULL and then cause the exception with OC\Files\Node\Root->getUserFolder("")
I couldn't find existing issues, but may be this is something already fixed in master / targeting nextcloud 28 ?
Will it disappear when AIO switch to NC 28 ?
Metadata
Metadata
Assignees
Labels
Type
Projects
Status