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

Error when running cron.php #2488

Closed
falkgeist opened this issue Jul 23, 2023 · 3 comments · Fixed by #2481 or #2482
Closed

Error when running cron.php #2488

falkgeist opened this issue Jul 23, 2023 · 3 comments · Fixed by #2481 or #2482
Labels

Comments

@falkgeist
Copy link

falkgeist commented Jul 23, 2023

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Steps to reproduce

  1. Set up a server-side CronJob running cron.php with mail notifications for errors
  2. Wait for mail

OR

  1. Run cron.php with debugging.

Expected behaviour

Error code 0

Actual behaviour

Error code 1

Server configuration

Operating system:
Not sure - Webhosting at Mittwald

Web server:
see above

Database:
MySQL

PHP version:
7.4

Nextcloud version: (see Nextcloud admin page)
25.0.9

Group folders version:
13.1.4

Updated from an older Nextcloud/ownCloud or fresh install:
updated, first install some 5 years ago

Where did you install Nextcloud from:
As described in manual, don't remember exactly

Are you using external storage, if yes which one:
no

Are you using encryption:
no

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

Client configuration

Browser:
n/a

Operating system:
n/a

Logs

Web server error log

see Browser log

Nextcloud log (data/nextcloud.log)

see Browser log

Browser log

The log is from the email of the CronJob reporting

Browser log
TypeError: Argument 1 passed to OCA\GroupFolders\ACL\ACLManagerFactory::getACLManager() must be an instance of OCP\IUser, null given, called in /html/nextcloud/apps/groupfolders/lib/Mount/MountProvider.php on line 206 and defined in /html/nextcloud/apps/groupfolders/lib/ACL/ACLManagerFactory.php:37
Stack trace:
#0 /html/nextcloud/apps/groupfolders/lib/Mount/MountProvider.php(206): OCA\GroupFolders\ACL\ACLManagerFactory->getACLManager(NULL, 1)
#1 /html/nextcloud/apps/groupfolders/lib/Versions/VersionsBackend.php(172): OCA\GroupFolders\Mount\MountProvider->getMount(1, '/dummyuser/file...', 31, -3)
#2 /html/nextcloud/apps/groupfolders/lib/Versions/GroupVersionsExpireManager.php(68): OCA\GroupFolders\Versions\VersionsBackend->getAllVersionedFiles(Array)
#3 /html/nextcloud/apps/groupfolders/lib/Versions/GroupVersionsExpireManager.php(59): OCA\GroupFolders\Versions\GroupVersionsExpireManager->expireFolder(Array)
#4 /html/nextcloud/apps/groupfolders/lib/BackgroundJob/ExpireGroupVersions.php(43): OCA\GroupFolders\Versions\GroupVersionsExpireManager->expireAll()
#5 /html/nextcloud/lib/public/BackgroundJob/Job.php(78): OCA\GroupFolders\BackgroundJob\ExpireGroupVersions->run(NULL)
#6 /html/nextcloud/lib/public/BackgroundJob/TimedJob.php(103): OCP\BackgroundJob\Job->start(Object(OC\BackgroundJob\JobList))
#7 /html/nextcloud/lib/public/BackgroundJob/TimedJob.php(93): OCP\BackgroundJob\TimedJob->start(Object(OC\BackgroundJob\JobList))
</details>
@falkgeist falkgeist added 0. Needs triage Issues that need to be triaged bug labels Jul 23, 2023
@Uatschitchun
Copy link

Uatschitchun commented Jul 23, 2023

Hi .. I get similar errors in nextcloud.log

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

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

I'm even getting it when running occ groupfolders:expire

xpiring version in 'XXX Gruppe'
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 /html/apps/groupfolders/lib/Mount/MountProvider.php on line 206 and defined in /html/apps/groupfolders/lib/ACL/ACLManagerFactory.php:37
Stack trace:
#0 /html/apps/groupfolders/lib/Mount/MountProvider.php(206): OCA\GroupFolders\ACL\ACLManagerFactory->getACLManager(NULL, 2)
#1 /html/apps/groupfolders/lib/Versions/VersionsBackend.php(172): OCA\GroupFolders\Mount\MountProvider->getMount(1, '/dummyuser/file...', 31, 1073741274)
#2 /html/apps/groupfolders/lib/Versions/GroupVersionsExpireManager.php(68): OCA\GroupFolders\Versions\VersionsBackend->getAllVersionedFiles(Array)
#3 /html/apps/groupfolders/lib/Versions/GroupVersionsExpireManager.php(59): OCA\GroupFolders\Versions\GroupVersionsExpireManager->expireFolder(Array)
#4 /html/apps/groupfolders/lib/Command/ExpireGroup/ExpireGroupVersions.php(66): OCA\GroupFolders\Versions\GroupVersionsExpireManager->expireAll()
#5 /html/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 /html/3rdparty/symfony/console/Command/Command.php(298): OCA\GroupFolders\Command\ExpireGroup\ExpireGroupVersionsTrash->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 /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 /html/3rdparty/symfony/console/Application.php(1040): OC\Core\Command\Base->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 /html/3rdparty/symfony/console/Application.php(301): Symfony\Component\Console\Application->doRunCommand(Object(OCA\GroupFolders\Command\ExpireGroup\ExpireGroupVersionsTrash), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /html/3rdparty/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 /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 /html/console.php(100): OC\Console\Application->run()
#13 /html/occ(11): require_once('/var/www/virtua...')

or occ groupfolders:scan --all

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 /html/apps/groupfolders/lib/Mount/MountProvider.php on line 206 and defined in /html/apps/groupfolders/lib/ACL/ACLManagerFactory.php:37
Stack trace:
#0 /html/apps/groupfolders/lib/Mount/MountProvider.php(206): OCA\GroupFolders\ACL\ACLManagerFactory->getACLManager(NULL, 2)
#1 /html/apps/groupfolders/lib/Command/Scan.php(82): OCA\GroupFolders\Mount\MountProvider->getMount(1, '/XXX Gruppe', 31, 1073741274)
#2 /html/3rdparty/symfony/console/Command/Command.php(298): OCA\GroupFolders\Command\Scan->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#3 /html/core/Command/Base.php(177): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 /html/3rdparty/symfony/console/Application.php(1040): OC\Core\Command\Base->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#5 /html/3rdparty/symfony/console/Application.php(301): Symfony\Component\Console\Application->doRunCommand(Object(OCA\GroupFolders\Command\Scan), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 /html/3rdparty/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 /html/lib/private/Console/Application.php(211): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 /html/console.php(100): OC\Console\Application->run()
#9 /html/occ(11): require_once('/var/www/virtua...')

NC is 27.0.1, PHP 8.1, Groupfolder: v15.0.1

@umgfoin
Copy link

umgfoin commented Jul 24, 2023

Fixed in current master with commit 354a239.
The change was pushed to stable26 and stable27, thus it will be part of the next release.

@umgfoin umgfoin removed the 0. Needs triage Issues that need to be triaged label Jul 24, 2023
@falkgeist
Copy link
Author

Manually added the change, seems to be working. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants