Installation fails for me on Magento_Indexer step with following fatal error:
"PHP Fatal error: Cannot instantiate interface Magento\Framework\Indexer\ConfigInterface"
I use latest develop branch on OS X with Apache 2.4.16, PHP 5.5.18 and MySQL 5.6.21. I'm running installation with not existing app/etc/config.php file, empty database and var/cache/* and var/generation/*cleared.
Command I use looks as follows:
./magento setup:install --base-url=http://local.magento2.com/ --backend-frontname=admin --db-host=127.0.0.1 --db-name=magento2 --db-user=magento2 --db-password=PASSWORD --admin-firstname=John --admin-lastname=Doe [email protected] --admin-user=johndoe --admin-password=johndoe1 --language=en_US --currency=USD --timezone=Europe/Warsaw
It fails for me every time when I start fresh installation. However, when it fails, I'm able to go through this by cleaning var/cache/* and running same installation command again.
Full stack trace looks as follows:
[Progress: 108 / 292]
Module 'Magento_Indexer':
PHP Fatal error: Cannot instantiate interface Magento\Framework\Indexer\ConfigInterface in /Magento2/lib/internal/Magento/Framework/ObjectManager/Factory/Dynamic/Developer.php on line 73
PHP Stack trace:
PHP 1. {main}() /Magento2/bin/magento:0
PHP 2. Symfony\Component\Console\Application->run() /Magento2/bin/magento:25
PHP 3. Symfony\Component\Console\Application->doRun() /Magento2/vendor/symfony/console/Symfony/Component/Console/Application.php:126
PHP 4. Symfony\Component\Console\Application->doRunCommand() /Magento2/vendor/symfony/console/Symfony/Component/Console/Application.php:195
PHP 5. Symfony\Component\Console\Command\Command->run() /Magento2/vendor/symfony/console/Symfony/Component/Console/Application.php:874
PHP 6. Magento\Setup\Console\Command\InstallCommand->execute() /Magento2/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:257
PHP 7. Magento\Setup\Model\Installer->install() /Magento2/setup/src/Magento/Setup/Console/Command/InstallCommand.php:125
PHP 8. call_user_func_array:{/Magento2/setup/src/Magento/Setup/Model/Installer.php:315}() /Magento2/setup/src/Magento/Setup/Model/Installer.php:315
PHP 9. Magento\Setup\Model\Installer->installSchema() /Magento2/setup/src/Magento/Setup/Model/Installer.php:315
PHP 10. Magento\Setup\Model\Installer->handleDBSchemaData() /Magento2/setup/src/Magento/Setup/Model/Installer.php:713
PHP 11. Magento\Setup\Model\Installer->getSchemaDataHandler() /Magento2/setup/src/Magento/Setup/Model/Installer.php:799
PHP 12. Magento\Setup\Model\Installer->createSchemaDataHandler() /Magento2/setup/src/Magento/Setup/Model/Installer.php:1182
PHP 13. Magento\Framework\ObjectManager\ObjectManager->create() /Magento2/setup/src/Magento/Setup/Model/Installer.php:848
PHP 14. Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create() /Magento2/lib/internal/Magento/Framework/ObjectManager/ObjectManager.php:57
PHP 15. Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments() /Magento2/lib/internal/Magento/Framework/ObjectManager/Factory/Dynamic/Developer.php:82
PHP 16. Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument() /Magento2/lib/internal/Magento/Framework/ObjectManager/Factory/Dynamic/Developer.php:53
PHP 17. Magento\Framework\ObjectManager\ObjectManager->get() /Magento2/lib/internal/Magento/Framework/ObjectManager/Factory/AbstractFactory.php:236
PHP 18. Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create() /Magento2/lib/internal/Magento/Framework/ObjectManager/ObjectManager.php:71
Fatal error: Cannot instantiate interface Magento\Framework\Indexer\ConfigInterface in /Magento2/lib/internal/Magento/Framework/ObjectManager/Factory/Dynamic/Developer.php on line 73
Call Stack:
0.0004 232360 1. {main}() /Magento2/bin/magento:0
1.1905 24438736 2. Symfony\Component\Console\Application->run() /Magento2/bin/magento:25
1.1927 24483368 3. Symfony\Component\Console\Application->doRun() /Magento2/vendor/symfony/console/Symfony/Component/Console/Application.php:126
1.1930 24484288 4. Symfony\Component\Console\Application->doRunCommand() /Magento2/vendor/symfony/console/Symfony/Component/Console/Application.php:195
1.1930 24484760 5. Symfony\Component\Console\Command\Command->run() /Magento2/vendor/symfony/console/Symfony/Component/Console/Application.php:874
1.3276 27719928 6. Magento\Setup\Console\Command\InstallCommand->execute() /Magento2/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:257
1.3377 27825000 7. Magento\Setup\Model\Installer->install() /Magento2/setup/src/Magento/Setup/Console/Command/InstallCommand.php:125
1.4079 27987480 8. call_user_func_array:{/Magento2/setup/src/Magento/Setup/Model/Installer.php:315}() /Magento2/setup/src/Magento/Setup/Model/Installer.php:315
1.4079 27987808 9. Magento\Setup\Model\Installer->installSchema() /Magento2/setup/src/Magento/Setup/Model/Installer.php:315
1.5446 28581296 10. Magento\Setup\Model\Installer->handleDBSchemaData() /Magento2/setup/src/Magento/Setup/Model/Installer.php:713
7.6307 37542104 11. Magento\Setup\Model\Installer->getSchemaDataHandler() /Magento2/setup/src/Magento/Setup/Model/Installer.php:799
7.6307 37542312 12. Magento\Setup\Model\Installer->createSchemaDataHandler() /Magento2/setup/src/Magento/Setup/Model/Installer.php:1182
7.6315 37560000 13. Magento\Framework\ObjectManager\ObjectManager->create() /Magento2/setup/src/Magento/Setup/Model/Installer.php:848
7.6315 37560328 14. Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create() /Magento2/lib/internal/Magento/Framework/ObjectManager/ObjectManager.php:57
7.6495 38367272 15. Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments() /Magento2/lib/internal/Magento/Framework/ObjectManager/Factory/Dynamic/Developer.php:82
7.6506 38375672 16. Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument() /Magento2/lib/internal/Magento/Framework/ObjectManager/Factory/Dynamic/Developer.php:53
7.6506 38375720 17. Magento\Framework\ObjectManager\ObjectManager->get() /Magento2/lib/internal/Magento/Framework/ObjectManager/Factory/AbstractFactory.php:236
7.6506 38375832 18. Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create() /Magento2/lib/internal/Magento/Framework/ObjectManager/ObjectManager.php:71
On second run after clearing cache it goes through:
[...]
[Progress: 108 / 292]
Module 'Magento_Indexer':
Running recurring..
[Progress: 109 / 292]
Module 'Magento_CatalogImportExport':
[...]
@wojtekn thank you for reporting. we have created MAGETWO-43238 to investigate. Also, can you tell us what mode are you operating in?
@mazhalai at the beginning I thought it occurred only with "developer" mode enabled, but I reproduced this in "default" mode as well.
@wojtekn we are unable to reproduce this error. Have you tried clearing you var directory and trying again? Also, can you please give us more details about PHP version, server configuration etc.
@mazhalai thanks for checking this. Finally I found a way to reproduce and it looks it's not an issue.
I'm able to reproduce this error when I try to reinstall Magento 2 after removing following:
var/*app/etc/config.phpI can't reproduce it when I also remove app/etc/env.php.
Now I see manual recommends using bin/magento setup:uninstall to uninstall Magento and that tool removes env.php as well. It looks issue appeared as I haven't uninstalled Magento properly.
@wojtekn thank you for your follow up. I am closing this issue. Please feel free to open a new one.
Had the same problem. Removing the var directory solved it.
Clearing the cache solved the problem for me. In my case, I was using redis and removing /var was obviously not enough.
Most helpful comment
Had the same problem. Removing the var directory solved it.