PHP Fatal Error: Cannot instantiate interface Magento\Theme\Model\Theme\ StoreThemesResolverInterface

Environment

  • Ubuntu 18.04
  • Magento 2.3.5p2
  • Apache 2.4
  • PHP 7.2
  • Basic install with Sample Data (no 3rd party modules or themes)

Brief

Upgrade Magento 2.3.5p2 to 2.3.6 via composer

Issue

Executing Step #3 of the upgrade process results in the following error:

  1. bin/magento maintenance:enable
  2. rm -rf var/cache/* var/page_cache/* generated/code/* pub/static/frontend/*
  3. bin/magento setup:upgrade
  4. bin/magento setup:di:compile
  5. bin/magento setup:static-content:deploy en_US en_GB -f
  6. bin/magento cache:clean
  7. bin/magento cache:flush
  8. redis-cli flushall
  9. bin/magento maintenance:disable
PHP Fatal error:  Uncaught Error: Cannot instantiate interface Magento\Theme\Model\Theme\StoreThemesResolverInterface in /var/www/html/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:50
Stack trace:
#0 /var/www/html/vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Theme\\M...')
#1 /var/www/html/vendor/magento/module-theme/Model/Config/Customization.php(75): Magento\Framework\ObjectManager\ObjectManager->get('Magento\\Theme\\M...')
#2 /var/www/html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(121): Magento\Theme\Model\Config\Customization->__construct(Object(Magento\Store\Model\StoreManager), Object(Magento\Theme\Model\View\Design\Proxy), O                                         bject(Magento\Theme\Model\Theme\ThemeProvider), NULL)
#3 /var/www/html/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(66): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Magento\\Theme\\M...', Array)
#4 /var/www/html/ in /var/www/html/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php on line 50

This turned out to be a Caching issue. Specifically, with Redis.

Running the following command before bin/magento setup:upgrade resolved the issue:

redis-clis FLUSHALL
2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.