I have just upgraded my development environment to Magento 2.3.5-p1 using:

composer require magento/product-community-edition=2.3.5-p1
composer update

Running the bin/magento command line crashes on start with a fatal error.

PHP Fatal error: Uncaught Error: Cannot instantiate interface Magento\Cron\Model\DeadlockRetrierInterface in /var/www/import/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:5

After some trial & error, I have managed to find the offending code (Magento\Cron\Model\Schedule:87) and the 3rd party module that triggered it.

How do I cleanly disable the module? I cannot run bin/magento module:disable as it won't even start.

Removing it from app/etc/config.php is not sufficient. If I move the module out of the way, and empty /generated/code, it stills triggers error about missing code.

In ClassReader.php line 26:

  Class Potato\Crawler\Model\Command\Queue does not exist

1 Answer 1


I didn't manage to find an answer, so I found another solution.

However, in this case, GIT to the rescue. I just reverted back and disabled the module in 2.3.4 instead. For production, I will need to do the same.

  • Next time if you want to disable module try not to remove entry from app/etc/config.php but change the value from 1 (active) to 0 (disabled) and after that run the bin/magento setup:upgrade command in cli.
    – Adam S.
    May 9, 2020 at 23:01
  • @AdamS. The problem was in being unable to run bin/magento. After the upgrade it died before it could anything, the problem being the automatic code generator throwing an exception. May 10, 2020 at 15:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.