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

Php cron job fails on Nextcloud 29.0.0 Beta #1132

Closed
ksaro1 opened this issue Mar 9, 2024 · 3 comments
Closed

Php cron job fails on Nextcloud 29.0.0 Beta #1132

ksaro1 opened this issue Mar 9, 2024 · 3 comments
Labels
6 - Ready for release Fix or feature is ready and will be included in the next release Bug

Comments

@ksaro1
Copy link

ksaro1 commented Mar 9, 2024

Since upgrading I now notice that the cron job fails with the following:

Error: Class “OC\BackgroundJob\TimedJob” not found in /var/www/html/nextcloud/apps/music/lib/BackgroundJob/Cleanup.php:24

Nextcloud support inform me that the music app should move from OC to OCP in order to prevent this failure under Nextcloud 29.0.0.

@paulijar
Copy link
Collaborator

Thanks for the report. This change isn't quite trivial because OCP\BackgroundJob\TimedJob is available on Nextcloud 15+ but not any any version of ownCloud. So it will require some coding magic but should be doable. Shall be fixed before releasing a version of Music with the claimed support for NC29.

@paulijar paulijar added the Bug label Mar 13, 2024
@kmorber
Copy link

kmorber commented Mar 15, 2024

Error: Class "OC\BackgroundJob\TimedJob" not found in /var/www/html/nextcloud/apps/music/lib/BackgroundJob/Cleanup.php:24
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\Music\Backg...')
#3 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(126): ReflectionClass->__construct('OCA\Music\Backg...')
#4 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(146): OC\AppFramework\Utility\SimpleContainer->resolve('OCA\Music\Backg...')
#5 /var/www/html/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php(469): OC\AppFramework\Utility\SimpleContainer->query('OCA\Music\Backg...')
#6 /var/www/html/nextcloud/lib/private/ServerContainer.php(155): OC\AppFramework\DependencyInjection\DIContainer->queryNoFallback('OCA\Music\Backg...')
#7 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(64): OC\ServerContainer->query('OCA\Music\Backg...')
#8 /var/www/html/nextcloud/lib/public/Server.php(55): OC\AppFramework\Utility\SimpleContainer->get('OCA\Music\Backg...')
#9 /var/www/html/nextcloud/lib/private/BackgroundJob/JobList.php(326): OCP\Server::get('OCA\Music\Backg...')
#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}

same for me

paulijar added a commit that referenced this issue Mar 28, 2024
The base class OC\BackgroundJob\TimedJob has been removed in NC29 in
favor of OCP\BackgorundJob\TimedJob. However, the new alternative is
not available on ownCloud and we now need to dynamically select among
these two the one which can be found.

Also, marked the app now as compatible with NC29 as it seemed to work
fine on NC29-RC1. Except for the Nextcloud  files dialog issue
nextcloud/server#42291 which has made a
come-back, after being already fixed in NC28.0.2. [sigh]

refs #1132
@paulijar paulijar added the 6 - Ready for release Fix or feature is ready and will be included in the next release label Mar 28, 2024
@paulijar
Copy link
Collaborator

Music v1.11.0 is now released with support for NC29.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6 - Ready for release Fix or feature is ready and will be included in the next release Bug
Projects
None yet
Development

No branches or pull requests

3 participants