skip to Main Content

I have upgraded Magento version from 2.3.5-p2 to 2.4.3

After upgraded to 2.4.3 version, i have cleared all the cache and generated folder. Then I ran the upgrade command then i got the below error:

Cannot instantiate interface MagentoMediaGalleryApiModelAssetCommandGetByPathInterface#0 /vendor/magento/framework/ObjectManager/ObjectManager.php(70): MagentoFrameworkObjectManagerFactoryDynamicDeveloper->create()
#1 /vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(170): MagentoFrameworkObjectManagerObjectManager->get()
#2 /vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(276): MagentoFrameworkObjectManagerFactoryAbstractFactory->resolveArgument()
#3 /vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(239): MagentoFrameworkObjectManagerFactoryAbstractFactory->getResolvedArgument()
#4 /vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(34): MagentoFrameworkObjectManagerFactoryAbstractFactory->resolveArgumentsInRuntime()
#5 /vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(59): MagentoFrameworkObjectManagerFactoryDynamicDeveloper->_resolveArguments()
#6 /vendor/magento/framework/ObjectManager/ObjectManager.php(70): MagentoFrameworkObjectManagerFactoryDynamicDeveloper->create()
#7 /vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(170): MagentoFrameworkObjectManagerObjectManager->get()
#8 /vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(276): MagentoFrameworkObjectManagerFactoryAbstractFactory->resolveArgument()
#9 /vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(239): MagentoFrameworkObjectManagerFactoryAbstractFactory->getResolvedArgument()
#10 /vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(34): MagentoFrameworkObjectManagerFactoryAbstractFactory->resolveArgumentsInRuntime()
#11 /vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(59): MagentoFrameworkObjectManagerFactoryDynamicDeveloper->_resolveArguments()
#12 /vendor/magento/framework/ObjectManager/ObjectManager.php(70): MagentoFrameworkObjectManagerFactoryDynamicDeveloper->create()
#13 /vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(170): MagentoFrameworkObjectManagerObjectManager->get()
#14 /vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(276): MagentoFrameworkObjectManagerFactoryAbstractFactory->resolveArgument()
#15 /vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(239): MagentoFrameworkObjectManagerFactoryAbstractFactory->getResolvedArgument()
#16 /vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(34): MagentoFrameworkObjectManagerFactoryAbstractFactory->resolveArgumentsInRuntime()
#17 /vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(59): MagentoFrameworkObjectManagerFactoryDynamicDeveloper->_resolveArguments()
#18 /vendor/magento/framework/ObjectManager/ObjectManager.php(70): MagentoFrameworkObjectManagerFactoryDynamicDeveloper->create()
#19 /vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(206): MagentoFrameworkObjectManagerObjectManager->get()
#20 /vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(182): MagentoFrameworkObjectManagerFactoryAbstractFactory->parseArray()
#21 /vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(276): MagentoFrameworkObjectManagerFactoryAbstractFactory->resolveArgument()
#22 /vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(239): MagentoFrameworkObjectManagerFactoryAbstractFactory->getResolvedArgument()
#23 /vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(34): MagentoFrameworkObjectManagerFactoryAbstractFactory->resolveArgumentsInRuntime()
#24 /vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(59): MagentoFrameworkObjectManagerFactoryDynamicDeveloper->_resolveArguments()
#25 /vendor/magento/framework/ObjectManager/ObjectManager.php(70): MagentoFrameworkObjectManagerFactoryDynamicDeveloper->create()
#26 /vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(170): MagentoFrameworkObjectManagerObjectManager->get()
#27 /vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(276): MagentoFrameworkObjectManagerFactoryAbstractFactory->resolveArgument()
#28 /vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(239): MagentoFrameworkObjectManagerFactoryAbstractFactory->getResolvedArgument()
#29 /vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(34): MagentoFrameworkObjectManagerFactoryAbstractFactory->resolveArgumentsInRuntime()
#30 /vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(59): MagentoFrameworkObjectManagerFactoryDynamicDeveloper->_resolveArguments()
#31 /vendor/magento/framework/ObjectManager/ObjectManager.php(70): MagentoFrameworkObjectManagerFactoryDynamicDeveloper->create()
#32 /vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(170): MagentoFrameworkObjectManagerObjectManager->get()
#33 /vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(276): MagentoFrameworkObjectManagerFactoryAbstractFactory->resolveArgument()
#34 /vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(239): MagentoFrameworkObjectManagerFactoryAbstractFactory->getResolvedArgument()
#35 /vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(34): MagentoFrameworkObjectManagerFactoryAbstractFactory->resolveArgumentsInRuntime()
#36 /vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(59): MagentoFrameworkObjectManagerFactoryDynamicDeveloper->_resolveArguments()
#37 /vendor/magento/framework/ObjectManager/ObjectManager.php(70): MagentoFrameworkObjectManagerFactoryDynamicDeveloper->create()
#38 /vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(206): MagentoFrameworkObjectManagerObjectManager->get()
#39 /vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(182): MagentoFrameworkObjectManagerFactoryAbstractFactory->parseArray()
#40 /vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(276): MagentoFrameworkObjectManagerFactoryAbstractFactory->resolveArgument()
#41 /vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(239): MagentoFrameworkObjectManagerFactoryAbstractFactory->getResolvedArgument()
#42 /vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(34): MagentoFrameworkObjectManagerFactoryAbstractFactory->resolveArgumentsInRuntime()
#43 /vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(59): MagentoFrameworkObjectManagerFactoryDynamicDeveloper->_resolveArguments()
#44 /vendor/magento/framework/ObjectManager/ObjectManager.php(56): MagentoFrameworkObjectManagerFactoryDynamicDeveloper->create()
#45 /vendor/magento/framework/Console/Cli.php(153): MagentoFrameworkObjectManagerObjectManager->create()
#46 /vendor/magento/framework/Console/Cli.php(134): MagentoFrameworkConsoleCli->getApplicationCommands()
#47 /vendor/symfony/console/Application.php(1274): MagentoFrameworkConsoleCli->getDefaultCommands()
#48 /vendor/symfony/console/Application.php(629): SymfonyComponentConsoleApplication->init()
#49 /vendor/symfony/console/Application.php(237): SymfonyComponentConsoleApplication->find()
#50 /vendor/magento/framework/Console/Cli.php(115): SymfonyComponentConsoleApplication->doRun()
#51 /vendor/symfony/console/Application.php(149): MagentoFrameworkConsoleCli->doRun()
#52 /bin/magento(23): SymfonyComponentConsoleApplication->run()
#53 {main}

I tried to fix by flushing cache but didn’t work. if anyone have any idea, please let me know.
Thanks

2

Answers


  1. I think you are missing some files in your vendor folder. To recreate the vendor folder, we need to reinstall composer.

    remove vendor folder command-

    rm -rf vendor/*
    

    clear composer cache command

    composer clearcache
    

    composer install command

    composer install
    

    After that run the basic command of Magento (setup upgrade, deploy, compile, reindex, cache flush)

    Login or Signup to reply.
  2. Check the status of Magento_MediaGallery in app/etc/config.php

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search