magento2: setup:upgrade is throwing PHP Fatal error

I have downloaded installed a magento 2.0.2 CE (with sample data). I have played around with a sample plugin and got in to an error. so i have remove all plugins and run bin/magento setup:upgrade then bin/magento setup:di:compile

but there is no “generate” folder created inside “var” folder

when i tried to open site in browser its showing 500 error apache error log shows following error

[Fri Apr 01 17:11:36.545866 2016] [:error] [pid 32343] [client 127.0.0.1:60961] PHP Fatal error: Uncaught TypeError: Argument 1 passed to Magento\\Framework\\Config\\Scope::__construct() must be an instance of Magento\\Framework\\App\\AreaList, instance of Magento\\Framework\\ObjectManager\\ObjectManager given, called in /var/www/magento2/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 97 and defined in /var/www/magento2/vendor/magento/framework/Config/Scope.php:37\nStack trace:\n#0 /var/www/magento2/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(97): Magento\\Framework\\Config\\Scope->__construct(Object(Magento\\Framework\\ObjectManager\\ObjectManager))\n#1 /var/www/magento2/vendor/magento/framework/ObjectManager/Factory/Compiled.php(88): Magento\\Framework\\ObjectManager\\Factory\\AbstractFactory->createObject('Magento\\\\Framewo...', Array)\n#2 /var/www/magento2/vendor/magento/framework/ObjectManager/ObjectManager.php(71): Magento\\Framework\\ObjectManager\\Factory\\Compiled->create('Magento\\\\Framewo...')\n#3 /var/www/magento2/vendor/magento/framework/App/ObjectManager/Environment/Com in /var/www/magento2/vendor/magento/framework/Config/Scope.php on line 37

when i tried to re run the bin/magento setup:upgrade command the following error is appearing

ti@SUYPC092:/var/www/magento2$ sudo bin/magento setup:upgrade PHP Fatal error: Uncaught TypeError: Argument 1 passed to Magento\Framework\Config\Scope::__construct() must be an instance of Magento\Framework\App\AreaList, instance of Magento\Framework\ObjectManager\ObjectManager given, called in /var/www/magento2/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 97 and defined in /var/www/magento2/vendor/magento/framework/Config/Scope.php:37 Stack trace: #0 /var/www/magento2/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(97): Magento\Framework\Config\Scope->__construct(Object(Magento\Framework\ObjectManager\ObjectManager)) #1 /var/www/magento2/vendor/magento/framework/ObjectManager/Factory/Compiled.php(88): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Magento\Framewo...', Array) #2 /var/www/magento2/vendor/magento/framework/ObjectManager/ObjectManager.php(71): Magento\Framework\ObjectManager\Factory\Compiled->create('Magento\Framewo...') #3 /var/www/magento2/vendor/magento/framework/App/ObjectManager/Environment/Com in /var/www/magento2/vendor/magento/framework/Config/Scope.php on line 37

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 15 (5 by maintainers)

Commits related to this issue

Most upvoted comments

I had the same issue. Deleting var/generation, var/cache and var/di solved it for me.