nextcloud / richdocuments

📑 Collabora Online for Nextcloud
https://nextcloud.com/collaboraonline
355 stars 116 forks source link

NC 29 Beta 3: Cron job execution fails because `OC\BackgroundJob\TimedJob` was not found #3532

Closed stefan-niedermann closed 8 months ago

stefan-niedermann commented 8 months ago

Describe the bug Cronjob execution on Nextcloud 29 Beta 3 fails when richdocuments is enabled.

To Reproduce Steps to reproduce the behavior:

  1. Install or update to NC 29 Beta 3
  2. Enable richdocuments
  3. Run php cron.php

Expected behavior Apparently the richdocuments app

need[s] to migrate away from OC\BackgroundJob\TimedJob towards OCP\BackgroundJob\TimedJob before releasing for 29 (Source)

Server details

Operating system: Linux 5.15.0-1046-oracle aarch64

Web server: NginX

Database: Postgree

PHP version: 8.1

Nextcloud version: 29.0.0 beta 3

Version of the richdocuments app 8.4.0 beta 1

Version of Collabora Online

Configuration of the richdocuments app

{
    "apps": {
        "richdocuments": {
            "installed_version": "8.4.0-beta.1",
            "types": "prevent_group_restriction",
            "wopi_url": "https:\/\/cloud.example.com\/",
            "wopi_allowlist": "x.x.x.38,127.0.0.1\/8,192.168.0.0\/16,172.16.0.0\/12,10.0.0.0\/8,fd00::\/8,::1",
            "wopi_callback_url": "",
            "public_wopi_url": "https:\/\/cloud.niedermann.it",
            "enabled": "no"
        }
    }
}

Nextcloud log (data/nextcloud.log)

Error: Class "OC\BackgroundJob\TimedJob" not found in /var/www/html/nextcloud/apps/fulltextsearch/lib/Cron/Index.php:51
Stack trace:
#0 /var/www/html/nextcloud/lib/composer/composer/ClassLoader.php(576): include()
#1 /var/www/html/nextcloud/lib/composer/composer/ClassLoader.php(427): Composer\Autoload\{closure}('/var/www/html/n...')
#2 [internal function]: Composer\Autoload\ClassLoader->loadClass('OCA\\FullTextSea...')
#3 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(126): ReflectionClass->__construct('OCA\\FullTextSea...')
#4 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(146): OC\AppFramework\Utility\SimpleContainer->resolve('OCA\\FullTextSea...')
#5 /var/www/html/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php(469): OC\AppFramework\Utility\SimpleContainer->query('OCA\\FullTextSea...')
#6 /var/www/html/nextcloud/lib/private/ServerContainer.php(155): OC\AppFramework\DependencyInjection\DIContainer->queryNoFallback('OCA\\FullTextSea...')
#7 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(64): OC\ServerContainer->query('OCA\\FullTextSea...')
#8 /var/www/html/nextcloud/lib/public/Server.php(55): OC\AppFramework\Utility\SimpleContainer->get('OCA\\FullTextSea...')
#9 /var/www/html/nextcloud/lib/private/BackgroundJob/JobList.php(326): OCP\Server::get('OCA\\FullTextSea...')
#10 /var/www/html/nextcloud/lib/private/BackgroundJob/JobList.php(235): OC\BackgroundJob\JobList->buildJob(Array)
#11 /var/www/html/nextcloud/cron.php(163): OC\BackgroundJob\JobList->getNext(true)
#12 {main}
joshtrichards commented 8 months ago

Duplicate of #3523 Fixed in #3527

(However the log output above is from the FTS app). :-)

stefan-niedermann commented 8 months ago

Whoopsie, the stacktrace is nearly identical, sorry for that!

I searched existing issues but couldn't fund this specific one. Thanks for the fix!