kiwicommerce / magento2-cron-scheduler

Magento 2 - Cron Scheduler by KiwiCommerce
https://kiwicommerce.co.uk/extensions/magento2-cron-scheduler/
75 stars 40 forks source link

Extension causes cron error #5

Closed ktsixit closed 5 years ago

ktsixit commented 5 years ago

I installed your extension and since then, magento cron is not running. I am getting the following error in magento cron log:

    Fatal error: Uncaught Error: Cannot instantiate interface Magento\Framework\Lock\LockManagerInterface in /home/mywebsite/public_html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:111
    Stack trace:
    #0 /home/mywebsite/public_html/vendor/magento/framework/ObjectManager/Factory/Compiled.php(108): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Magento\\Framewo...', Array)
    #1 /home/mywebsite/public_html/vendor/magento/framework/ObjectManager/Factory/Compiled.php(150): Magento\Framework\ObjectManager\Factory\Compiled->create('Magento\\Framewo...')
    #2 /home/mywebsite/public_html/vendor/magento/framework/ObjectManager/Factory/Compiled.php(79): Magento\Framework\ObjectManager\Factory\Compiled->get('Magento\\Framewo...')
    #3 /home/mywebsite/public_html/vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Compiled->create('KiwiCommerce\\Cr...')
    #4 /home/mywebsite/public_html/vendor/magento/framework/Event/ObserverFactory.php(33): Magento\Frame in /home/mywebsite/public_html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 111

This is caused by app\code\KiwiCommerce\CronScheduler\Observer\ProcessCronQueueObserverDefault.inc file. Disabling the extension solves the issue.

How can I fix this?

Preconditions

  1. Magento ver. 2.2.4
kiwi-commerce commented 5 years ago

Hello @ktsixit ,

The class Magento\Framework\Lock\LockManagerInterface does not exist in the Magento 2.2.4 that's why it is creating an issue.

So either you can find an alternative solution or upgrade your Magento version.

Thank you.

designerdgr commented 4 years ago

If it's not working with 2.2.4 shouldn't you write it somewhere?