0

I can run php bin/magento on my remote server, but locally, when i attempt to run it, I get the following errors:

D:\Magento2>php bin/magento
PHP Fatal error:  Cannot instantiate interface Magento\Framework\Console\CommandListInterface in D:\Magento2\vendor\magento\framework\ObjectManager\Factory\Dyn
PHP Stack trace:
PHP   1. {main}() D:\Magento2\bin\magento:0
PHP   2. Magento\Framework\Console\Cli->__construct() D:\Magento2\bin\magento:22
PHP   3. Symfony\Component\Console\Application->__construct() D:\Magento2\vendor\magento\framework\Console\Cli.php:83
PHP   4. Magento\Framework\Console\Cli->getDefaultCommands() D:\Magento2\vendor\symfony\console\Symfony\Component\Console\Application.php:91
PHP   5. Magento\Framework\Console\Cli->getApplicationCommands() D:\Magento2\vendor\magento\framework\Console\Cli.php:112
PHP   6. Magento\Framework\ObjectManager\ObjectManager->create() D:\Magento2\vendor\magento\framework\Console\Cli.php:140
PHP   7. Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create() D:\Magento2\vendor\magento\framework\ObjectManager\ObjectManager.php:57

Fatal error: Cannot instantiate interface Magento\Framework\Console\CommandListInterface in D:\Magento2\vendor\magento\framework\ObjectManager\Factory\Dynamic\

Call Stack:
    0.0002     124312   1. {main}() D:\Magento2\bin\magento:0
    0.0320     845168   2. Magento\Framework\Console\Cli->__construct() D:\Magento2\bin\magento:22
    1.0122   12222368   3. Symfony\Component\Console\Application->__construct() D:\Magento2\vendor\magento\framework\Console\Cli.php:83
    1.0180   12586728   4. Magento\Framework\Console\Cli->getDefaultCommands() D:\Magento2\vendor\symfony\console\Symfony\Component\Console\Application.php:91
    1.0189   12625928   5. Magento\Framework\Console\Cli->getApplicationCommands() D:\Magento2\vendor\magento\framework\Console\Cli.php:112
    4.1712   39443128   6. Magento\Framework\ObjectManager\ObjectManager->create() D:\Magento2\vendor\magento\framework\Console\Cli.php:140
    4.1712   39443384   7. Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create() D:\Magento2\vendor\magento\framework\ObjectManager\ObjectManager

I'm working in developer mode, with all caches off. This started occuring after upgrading from 2.0.X to 2.1.0rc2

It seems like Symfony isn't working properly...

  • What version of PHP is your local server running? – Ryan Hoerr Jun 17 '16 at 0:55
  • LOCAL - PHP 5.6.19 (cli) (built: Mar 2 2016 20:08:25) Copyright (c) 1997-2016 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies with Xdebug v2.4.0, Copyright (c) 2002-2016, by Derick Rethans SERVER- PHP 5.6.21-1~dotdeb+7.1 (cli) (built: Apr 29 2016 13:07:22) Copyright (c) 1997-2016 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies with Xdebug v2.4.0, Copyright (c) 2002-2016, by Derick Rethans with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies – CarComp Jun 17 '16 at 12:32
1
  • Check if \Magento\Framework\Console\CommandListInterface exists as it is called in lib/internal/Magento/Framework/Console/Cli.php:140
  • Check \Magento\SampleData\Console\CommandList as it extends Magento\Framework\Console\CommandListInterface that may not exist.
  • Check app/etc/di.xml if it has correct preference for Magento\Framework\Console\CommandListInterface.
  • Clean cache.
  • \Magento\Framework\Console\CommandListInterface doesn't have a constructor. Not quite sure why magento is trying to call it. I'm not using any sample data. I'm checking di(s) now.... lib/internal? That doesn't exist. – CarComp Jun 16 '16 at 20:06
  • check app/etc/di.xml it it has correct preference for Magento\Framework\Console\CommandListInterface – transversus Jun 16 '16 at 21:03
0

This may not be the best answer, but i've found that updating the remote server, then synchronizing the files to my local machine cleared up any issues.

  • Feel free to accept your own answer. Even if it's not the best, it worked for you and nobody provided a better one yet – Fabian Schmengler Jun 29 '17 at 6:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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