kiwicommerce/magento2-cron-scheduler

Crons stopped working

Opened this issue · 3 comments

Preconditions

  1. Magento EE 2.3.3-sp1
  2. PHP 7.3
  3. MySQL 5.6
  4. Extension version 1.0.5

Steps to reproduce

Wait for cron to run

Expected result

Crons should run

Actual result

Crons doesn't run and following error appears in logs:

==> system.log <==
[2020-02-11 14:07:03] report.CRITICAL: Type Error occurred when creating object: KiwiCommerce\CronScheduler\Observer\ProcessCronQueueObserver, Too few arguments to function Magento\Cron\Observer\ProcessCronQueueObserver::__construct(), 13 passed in /app/pklm4qvvunynw/vendor/kiwicommerce/module-cron-scheduler/Observer/ProcessCronQueueObserverDefault.inc on line 97 and exactly 15 expected [] []

@sivasdescalzo Would you please try by updating the extension?

We are using this extension in Magento 2.3.3 without an issue.

Feel free to reopen this ticket if get any issue.

Thank you.

>= Magento 2.3.3-p1 ProcessCronQueueObserver expecting 15 parameters, 13 given

Preconditions

  1. Magento 2.3.3-p1 or grater
  2. PHP 7.3
  3. Extension version 1.0.6

Steps to reproduce

  1. Let run any cronjob and check logs

Expected result

  1. Cronjob should run without problems

Actual result

  1. Exception thrown due to \Magento\Cron\Observer\ProcessCronQueueObserver constructor expects 15 parameters, but KiwiCommerce\CronScheduler\Observer\ProcessCronQueueObserver calls parent::$construct with 13 parameters.
  2. Missing parameters: DeadlockRetrierInterface $retrier and \Magento\Framework\Event\ManagerInterface $eventManager

It should be like:
parent::$construct($objectManager, $scheduleFactory, $cache, $config, $scopeConfig, $request, $shell, $dateTime, $phpExecutableFinderFactory, $logger, $state, $statFactory, $lockManager, $eventManager, $retrier);

I am also getting another error after fixing the __construct params suggested by @sivasdescalzo


PHP Fatal error:  Uncaught Error: Cannot instantiate interface Magento\Framework\ShellInterface in /example.com/html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:121
Stack trace:
#0 /example.com/html/vendor/magento/framework/ObjectManager/Factory/Compiled.php(108): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Magento\\Framewo...', Array)
#1 /example.com/html/vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Compiled->create('Magento\\Framewo...')
#2 /example.com/html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(167): Magento\Framework\ObjectManager\ObjectManager->get('Magento\\Framewo...')
#3 /example.com/html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(273): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolve in /example.com/html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 121