Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

occ groupfolders:expire command Throws exception #2477

Closed
githubbab opened this issue Jul 20, 2023 · 1 comment
Closed

occ groupfolders:expire command Throws exception #2477

githubbab opened this issue Jul 20, 2023 · 1 comment
Labels
0. Needs triage Issues that need to be triaged bug

Comments

@githubbab
Copy link

githubbab commented Jul 20, 2023

Steps to reproduce

  1. Run the command: occ groupfolders:expire
  2. Receive the following exception:
Expiring version in 'Famille/Photos'
An unhandled exception has been thrown:
TypeError: OCA\GroupFolders\ACL\ACLManagerFactory::getACLManager(): Argument #1 ($user) must be of type OCP\IUser, null given, called in /var/www/html/custom_apps/groupfolders/lib/Mount/MountProvider.php on line 206 and defined in /var/www/html/custom_apps/groupfolders/lib/ACL/ACLManagerFactory.php:37
Stack trace:
#0 /var/www/html/custom_apps/groupfolders/lib/Mount/MountProvider.php(206): OCA\GroupFolders\ACL\ACLManagerFactory->getACLManager(NULL, 11)
#1 /var/www/html/custom_apps/groupfolders/lib/Versions/VersionsBackend.php(172): OCA\GroupFolders\Mount\MountProvider->getMount(2, '/dummyuser/file...', 31, -3)
#2 /var/www/html/custom_apps/groupfolders/lib/Versions/GroupVersionsExpireManager.php(68): OCA\GroupFolders\Versions\VersionsBackend->getAllVersionedFiles(Array)
#3 /var/www/html/custom_apps/groupfolders/lib/Versions/GroupVersionsExpireManager.php(59): OCA\GroupFolders\Versions\GroupVersionsExpireManager->expireFolder(Array)
#4 /var/www/html/custom_apps/groupfolders/lib/Command/ExpireGroup/ExpireGroupVersions.php(66): OCA\GroupFolders\Versions\GroupVersionsExpireManager->expireAll()
#5 /var/www/html/custom_apps/groupfolders/lib/Command/ExpireGroup/ExpireGroupVersionsTrash.php(54): OCA\GroupFolders\Command\ExpireGroup\ExpireGroupVersions->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 /var/www/html/3rdparty/symfony/console/Cmmand/Command.php(255): OCA\GroupFolders\Command\ExpireGroup\ExpireGroupVersionsTrash->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 /var/www/html/core/Command/Base.php(177): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 /var/www/html/3rdparty/symfony/console/Application.php(1009): OC\Core\Command\Base->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 /var/www/html/3rdparty/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand(Object(OCA\GroupFolders\Command\ExpireGroup\ExpireGroupVersionsTrash), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /var/www/html/3rdparty/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 /var/www/html/lib/private/Console/Application.php(211): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#12 /var/www/html/console.php(100): OC\Console\Application->run()
#13 /var/www/html/occ(11): require_once('/var/www/html/c...')
#14 {main}

Expected behaviour

  1. Correct handling of the exception
  2. Basic OCC commands to function without an error

Actual behaviour

Exception is thrown

Server configuration

Operating system: Docker image nextcloud:stable-apache Host system Debian Buster

Web server: apache

Database: postgres:14.5-bullseye

PHP version: PHP 8.2.8

Nextcloud version: 26.0.3

Group folders version: 14.0.3

Updated from an older Nextcloud/ownCloud or fresh install: Updated

Where did you install Nextcloud from: Docker

Are you using external storage, if yes which one: Yes, local, but not for the tested folder

Are you using encryption: no

Are you using an external user-backend, if yes which one: no

Client configuration

Browser: CLI

Operating system: Debian Buster

Logs

Logs when error thrown by cron:

[cron] Erreur: TypeError: OCA\GroupFolders\ACL\ACLManagerFactory::getACLManager(): Argument #1 ($user) must be of type OCP\IUser, null given, called in /var/www/html/custom_apps/groupfolders/lib/Mount/MountProvider.php on line 206 at <<closure>>

0. /var/www/html/custom_apps/groupfolders/lib/Mount/MountProvider.php line 206
   OCA\GroupFolders\ACL\ACLManagerFactory->getACLManager(null, 11)
1. /var/www/html/custom_apps/groupfolders/lib/Versions/VersionsBackend.php line 172
   OCA\GroupFolders\Mount\MountProvider->getMount(2, "/dummyuser/files/Famille/Photos", 31, -3)
2. /var/www/html/custom_apps/groupfolders/lib/Versions/GroupVersionsExpireManager.php line 68
   OCA\GroupFolders\Versions\VersionsBackend->getAllVersionedFiles([2,"Famille/Phot ... "])
3. /var/www/html/custom_apps/groupfolders/lib/Versions/GroupVersionsExpireManager.php line 59
   OCA\GroupFolders\Versions\GroupVersionsExpireManager->expireFolder([2,"Famille/Phot ... "])
4. /var/www/html/custom_apps/groupfolders/lib/BackgroundJob/ExpireGroupVersions.php line 43
   OCA\GroupFolders\Versions\GroupVersionsExpireManager->expireAll()
5. /var/www/html/lib/public/BackgroundJob/Job.php line 78
   OCA\GroupFolders\BackgroundJob\ExpireGroupVersions->run(null)
6. /var/www/html/lib/public/BackgroundJob/TimedJob.php line 103
   OCP\BackgroundJob\Job->start(["OC\\BackgroundJob\\JobList"])
7. /var/www/html/lib/public/BackgroundJob/TimedJob.php line 93
   OCP\BackgroundJob\TimedJob->start(["OC\\BackgroundJob\\JobList"])
8. /var/www/html/cron.php line 152
   OCP\BackgroundJob\TimedJob->execute(["OC\\BackgroundJob\\JobList"], ["OC\\Log"])

at 2023-07-20T07:00:02+00:00
@githubbab githubbab added 0. Needs triage Issues that need to be triaged bug labels Jul 20, 2023
@solracsf
Copy link
Member

Duplicate of #2473

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Issues that need to be triaged bug
Projects
None yet
Development

No branches or pull requests

2 participants