Magento 2.1 – Setup:upgrade Error

magento-2.1upgrade

sudo php bin/magento setup:upgrade -vvv
Cache cleared successfully
File system cleanup:
PHP Fatal error:  Uncaught Error: Cannot use object of type Closure as array in /var/www/croquenoix/dev/croquenoix/web/setup/src/Magento/Setup/Model/Installer.php:1288
Stack trace:
#0 /var/www/croquenoix/dev/croquenoix/web/setup/src/Magento/Setup/Model/Installer.php(1013): Magento\Setup\Model\Installer->cleanupGeneratedFiles()
#1 /var/www/croquenoix/dev/croquenoix/web/setup/src/Magento/Setup/Console/Command/UpgradeCommand.php(72): Magento\Setup\Model\Installer->updateModulesSequence(false)
#2 /var/www/croquenoix/dev/croquenoix/web/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Magento\Setup\Console\Command\UpgradeCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#3 /var/www/croquenoix/dev/croquenoix/web/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 in /var/www/croquenoix/dev/croquenoix/web/setup/src/Magento/Setup/Model/Installer.php on line 1288

The stack trace is not long enough for me to figure where the error really comes from. How can I see a longer stack trace? How can I debug this error?

Best Answer

It must be issue in any custom extension, Please try to remove your custom extension and try to install them one by one. It works for me. May be helpful for other.

Related Topic