0

After upgrading to Magento CE 2.1.3 (from 2.1.2) I am unable to disable a module through CLI. Issuing command

php bin/magento module:disable Module_Name

results in error:

 [Zend_Json_Exception]
Decoding failed: Syntax error 

any ideas?

Exception trace: () at /var/www/vhosts/mydomain.co.uk/cfw.mydomain.co.uk/vendor/magento/zendframework1/library/Zend/Json.php:97 Zend_Json::decode() at /var/www/vhosts/mydomain.co.uk/cfw.mydomain.co.uk/vendor/magento/framework/Module/PackageInfo.php:85 Magento\Framework\Module\PackageInfo->load() at /var/www/vhosts/mydomain.co.uk/cfw.mydomain.co.uk/vendor/magento/framework/Module/PackageInfo.php:208 Magento\Framework\Module\PackageInfo->getRequire() at /var/www/vhosts/mydomain.co.uk/cfw.mydomain.co.uk/vendor/magento/framework/Module/DependencyChecker.php:132 Magento\Framework\Module\DependencyChecker->createGraph() at /var/www/vhosts/mydomain.co.uk/cfw.mydomain.co.uk/vendor/magento/framework/Module/DependencyChecker.php:95 Magento\Framework\Module\DependencyChecker->checkDependencyGraph() at /var/www/vhosts/mydomain.co.uk/cfw.mydomain.co.uk/vendor/magento/framework/Module/DependencyChecker.php:67 Magento\Framework\Module\DependencyChecker->checkDependenciesWhenDisableModules() at /var/www/vhosts/mydomain.co.uk/cfw.mydomain.co.uk/vendor/magento/framework/Module/Status.php:107 Magento\Framework\Module\Status->checkConstraints() at /var/www/vhosts/mydomain.co.uk/cfw.mydomain.co.uk/setup/src/Magento/Setup/Console/Command/AbstractModuleManageCommand.php:92 Magento\Setup\Console\Command\AbstractModuleManageCommand->execute() at /var/www/vhosts/mydomain.co.uk/cfw.mydomain.co.uk/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:257 Symfony\Component\Console\Command\Command->run() at /var/www/vhosts/mydomain.co.uk/cfw.mydomain.co.uk/vendor/symfony/console/Symfony/Component/Console/Application.php:874 Symfony\Component\Console\Application->doRunCommand() at /var/www/vhosts/mydomain.co.uk/cfw.mydomain.co.uk/vendor/symfony/console/Symfony/Component/Console/Application.php:195 Symfony\Component\Console\Application->doRun() at /var/www/vhosts/mydomain.co.uk/cfw.mydomain.co.uk/vendor/magento/framework/Console/Cli.php:96 Magento\Framework\Console\Cli->doRun() at /var/www/vhosts/mydomain.co.uk/cfw.mydomain.co.uk/vendor/symfony/console/Symfony/Component/Console/Application.php:126 Symfony\Component\Console\Application->run() at /var/www/vhosts/mydomain.co.uk/cfw.mydomain.co.uk/bin/magento:23

5
  • can you add -vvv to command and post stack trace
    – KAndy
    Commented Jan 10, 2017 at 16:29
  • @KAndy added above :)
    – Devtype
    Commented Jan 10, 2017 at 16:41
  • i think that one of custom modules used in your application has incorrect syntax in composer.json. Try debug Magento\Framework\Module\PackageInfo::load or put var_dump($key); before $packageData = \Zend_Json::decode($jsonData[$key]); in /var/www/vhosts/mydomain.co.uk/cfw.mydomain.co.uk/vendor/magento/framework/Module/PackageInfo.php and run uninstall again
    – Max
    Commented Jan 10, 2017 at 18:25
  • @MaxStsepantsevich appreciate the answer it helped me to figure out the module with invalid composer.json. If you can post this as an answer I'll be able to mark it as answered, cheers :)
    – Devtype
    Commented Jan 11, 2017 at 11:47
  • i did it, thx :)
    – Max
    Commented Jan 11, 2017 at 12:12

1 Answer 1

2

Looks like that one of custom modules used in your application has incorrect syntax in composer.json.

For detect incorrect composer.json try debug Magento\Framework\Module\PackageInfo::load or put var_dump($key); before $packageData = \Zend_Json::decode($jsonData[$key]); in /vendor/mag‌​ento/framework/Modul‌​e/PackageInfo.php and run uninstall again

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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