magento2: Custom composer modules break Component Manager

Preconditions

  1. PHP 7.0.9
  2. Magento 2.1 (stable version)

Steps to reproduce

  1. Install some extension via Composer. I tried the following command composer require snowdog/language-pl_pl
  2. Go to Magento Marketplace and install some extension from here. I installed the following package https://marketplace.magento.com/magenerds-language-de-de.html (this step is probably not required to reproduce the issue)
  3. Go to System -> Tools -> Web Setup -> Component Manager

Expected result

No PHP error. The list of installed extensions is presented.

Actual result

The spinner is loading all the time. You can see that the url /setup/index.php/componentGrid/components returns the following PHP error:

An error occurred

An error occurred during execution; please try again later.

Additional information:

RuntimeException

File:
/var/www/magento/setup/src/Magento/Setup/Model/PackagesData.php:88
Message:
Couldn't get available versions for package snowdog/language-pl_pl
Stack trace:
#0 /var/www/magento/setup/src/Magento/Setup/Controller/ComponentGrid.php(98): Magento\Setup\Model\PackagesData->syncPackagesData()
#1 /var/www/magento/vendor/zendframework/zend-mvc/src/Controller/AbstractActionController.php(82): Magento\Setup\Controller\ComponentGrid->componentsAction()
#2 [internal function]: Zend\Mvc\Controller\AbstractActionController->onDispatch(Object(Zend\Mvc\MvcEvent))
#3 /var/www/magento/vendor/zendframework/zend-eventmanager/src/EventManager.php(444): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#4 /var/www/magento/vendor/zendframework/zend-eventmanager/src/EventManager.php(205): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#5 /var/www/magento/vendor/zendframework/zend-mvc/src/Controller/AbstractController.php(118): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#6 /var/www/magento/vendor/zendframework/zend-mvc/src/DispatchListener.php(93): Zend\Mvc\Controller\AbstractController->dispatch(Object(Zend\Http\PhpEnvironment\Request), Object(Zend\Http\PhpEnvironment\Response))
#7 [internal function]: Zend\Mvc\DispatchListener->onDispatch(Object(Zend\Mvc\MvcEvent))
#8 /var/www/magento/vendor/zendframework/zend-eventmanager/src/EventManager.php(444): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#9 /var/www/magento/vendor/zendframework/zend-eventmanager/src/EventManager.php(205): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#10 /var/www/magento/vendor/zendframework/zend-mvc/src/Application.php(314): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#11 /var/www/magento/setup/index.php(31): Zend\Mvc\Application->run()
#12 {main}

I think the issue is related to the https://repo.magento.com/packages.json file that doesn’t include custom (local) composer modules. Magento can’t find custom (local) extension data in this file, so it is unable to generate the list.

About this issue

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

Commits related to this issue

Most upvoted comments

For everybody still seeing this issue, I believe the reason is because it was pushed onto a branch for 2.2. I just submitted a PR to port the fix back to 2.1-develop. If you can’t wait for it to come as an update you can take a look at the code here: https://github.com/magento/magento2/pull/9692/files . Note that I am not an experienced contributor to Magento so YMMV. Review and use at your own risk 😉 Thanks to @korostii for pointing in the right direction.

Fix for this issue was delivered to develop branch. Closed.

same here: 2.1.6

Where is a solution ??

@spjuggalojoe, have you tried looking for that internal ticket ID? The related commits usually have it mentioned: https://github.com/magento/magento2/search?q=MAGETWO-59256&type=Commits

Please note that it recently became possible to create a pull request targeting 2.1-develop branch as explained here. That would probably somewhat speed up the deliverance of the fix.

Same issue in 2.1.6

I can confirm it still doesn’t work in 2.1.4

Any solution yet?

@shiftedreality am I just messing up something or does this still persist in 2.1.4? Just tested and got the same error after a composer update to 2.1.4

Hi. Is there any temporary “fix” for this issue, without removing the custom module?

Hi @dmaciej,

Thank you for submission. I created internal ticket MAGETWO-59256 to investigate and fix this issue.

I am having the same issue