Cron fail to run since last passwords app update

Hey!
Since 2024.2.20 passwords app update my Nexcloud complain cron fail to run
I notice in my cron Nextcloud container an error related to password app:

2024-02-25T20:25:00.898310854Z crond:  line php -f /var/www/html/cron.php
2024-02-25T20:25:00.898317186Z crond:  job: 0 php -f /var/www/html/cron.php
2024-02-25T20:25:00.898409245Z crond: child running /bin/bash
2024-02-25T20:25:00.898524099Z crond: USER www-data pid 2193 cmd php -f /var/www/html/cron.php
2024-02-25T20:25:01.377455481Z ArgumentCountError: Too few arguments to function OCA\Passwords\Cron\CheckPasswordsJob::__construct(), 0 passed in /var/www/html/lib/private/BackgroundJob/JobList.php on line 330 and exactly 9 expected in /var/www/html/custom_apps/passwords/lib/Cron/CheckPasswordsJob.php:58
2024-02-25T20:25:01.377500506Z Stack trace:
2024-02-25T20:25:01.377509688Z #0 /var/www/html/lib/private/BackgroundJob/JobList.php(330): OCA\Passwords\Cron\CheckPasswordsJob->__construct()
2024-02-25T20:25:01.377517901Z #1 /var/www/html/lib/private/BackgroundJob/JobList.php(235): OC\BackgroundJob\JobList->buildJob(Array)
2024-02-25T20:25:01.377524963Z #2 /var/www/html/cron.php(145): OC\BackgroundJob\JobList->getNext(false)
2024-02-25T20:25:01.377531347Z #3 {main}
2024-02-25T20:25:10.898722638Z crond: wakeup dt=10
2024-02-25T20:26:00.898950870Z crond: wakeup dt=50
2024-02-25T20:26:00.898990653Z crond: file www-data:
2024-02-25T20:26:00.898998278Z crond:  line php -f /var/www/html/cron.php
2024-02-25T20:27:00.899263324Z crond: user:www-data entry:(null)
2024-02-25T20:27:00.899314419Z 100001000010000100001000010000100001000010000100001000010000
2024-02-25T20:27:00.899329155Z 111111111111111111111111
2024-02-25T20:27:00.899335610Z 11111111111111111111111111111111
2024-02-25T20:27:00.899345699Z 111111111111
2024-02-25T20:27:00.899352089Z 1111111
2024-02-25T20:27:00.899358922Z crond: wakeup dt=60
2024-02-25T20:27:00.899364243Z crond: file www-data:
2024-02-25T20:27:00.899368218Z crond:  line php -f /var/www/html/cron.php
2024-02-25T20:28:00.899677157Z crond: wakeup dt=60
2024-02-25T20:28:00.899704035Z crond: file www-data:
2024-02-25T20:28:00.899710044Z crond:  line php -f /var/www/html/cron.php
2024-02-25T20:29:00.899848605Z crond: wakeup dt=60
2024-02-25T20:29:00.899877219Z crond: file www-data:
2024-02-25T20:29:00.899882306Z crond:  line php -f /var/www/html/cron.php
2024-02-25T20:30:00.899985736Z crond: wakeup dt=60
2024-02-25T20:30:00.900020469Z crond: file www-data:
2024-02-25T20:30:00.900028108Z crond:  line php -f /var/www/html/cron.php
2024-02-25T20:30:00.900033442Z crond:  job: 0 php -f /var/www/html/cron.php
2024-02-25T20:30:00.900130266Z crond: child running /bin/bash
2024-02-25T20:30:00.900201541Z crond: USER www-data pid 2194 cmd php -f /var/www/html/cron.php
2024-02-25T20:30:01.294935538Z ArgumentCountError: Too few arguments to function OCA\Passwords\Cron\CheckPasswordsJob::__construct(), 0 passed in /var/www/html/lib/private/BackgroundJob/JobList.php on line 330 and exactly 9 expected in /var/www/html/custom_apps/passwords/lib/Cron/CheckPasswordsJob.php:58
2024-02-25T20:30:01.294959604Z Stack trace:
2024-02-25T20:30:01.294965420Z #0 /var/www/html/lib/private/BackgroundJob/JobList.php(330): OCA\Passwords\Cron\CheckPasswordsJob->__construct()
2024-02-25T20:30:01.294972583Z #1 /var/www/html/lib/private/BackgroundJob/JobList.php(235): OC\BackgroundJob\JobList->buildJob(Array)
2024-02-25T20:30:01.294980218Z #2 /var/www/html/cron.php(145): OC\BackgroundJob\JobList->getNext(false)
2024-02-25T20:30:01.294985954Z #3 {main}
2024-02-25T20:30:10.900503265Z crond: wakeup dt=10
2024-02-25T20:31:00.900664634Z crond: wakeup dt=50
2024-02-25T20:31:00.900700512Z crond: file www-data:
2024-02-25T20:31:00.900708667Z crond:  line php -f /var/www/html/cron.php
2024-02-25T20:32:00.900844026Z crond: wakeup dt=60
2024-02-25T20:32:00.900877070Z crond: file www-data:
2024-02-25T20:32:00.900883918Z crond:  line php -f /var/www/html/cron.php
2024-02-25T20:33:00.901000434Z crond: wakeup dt=60
2024-02-25T20:33:00.901030944Z crond: file www-data:
2024-02-25T20:33:00.901038404Z crond:  line php -f /var/www/html/cron.php
2024-02-25T20:34:00.901289065Z crond: wakeup dt=60
2024-02-25T20:34:00.901327909Z crond: file www-data:
2024-02-25T20:34:00.901332779Z crond:  line php -f /var/www/html/cron.php

When I disable password app, the cron run without error
I have two Nextcloud docker instance (one for “prod” and the other to test) and both have the same issue

Do any of you have the same issue?

Thank you!

ArgumentCountError: Too few arguments to function OCA\Passwords\Cron\CheckPasswordsJob::__construct(), 0 passed in /var/www/html/lib/private/BackgroundJob/JobList.php on line 330 and exactly 9 expected in /var/www/html/custom_apps/passwords/lib/Cron/CheckPasswordsJob.php:58

Seems like NC can’t resolve the dependencies of the app correctly.

Try to run php -v and verify that you have at least PHP 8.2.0 installed to run the cronjob.

Then try reinstalling the passwords app.

This is the output

PHP 8.2.16 (cli) (built: Feb 16 2024 21:54:41) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.16, Copyright (c) Zend Technologies
    with Zend OPcache v8.2.16, Copyright (c), by Zend Technologies

I deleted and installed it again but nothing changed

I found! I didn’t check the correct container where the cron job were running

1 Like