magento2: Custom composer modules break Component Manager
Preconditions
- PHP 7.0.9
- Magento 2.1 (stable version)
Steps to reproduce
- Install some extension via Composer.
I tried the following command
composer require snowdog/language-pl_pl - 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)
- 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
- MAGETWO-59256: [GitHub] Custom composer modules break Component Manager #6718 — committed to magento/magento2 by deleted user 8 years ago
- MAGETWO-59256: [GitHub] Custom composer modules break Component Manager #6718 — committed to magento/magento2 by deleted user 8 years ago
- MAGETWO-59256: [GitHub] Custom composer modules break Component Manager #6718 — committed to magento/magento2 by deleted user 8 years ago
- MAGETWO-59256: [GitHub] Custom composer modules break Component Manager #6718 — committed to magento/magento2 by deleted user 8 years ago
- MAGETWO-59256: [GitHub] Custom composer modules break Component Manager #6718 — committed to magento/magento2 by deleted user 8 years ago
- MAGETWO-59256: [GitHub] Custom composer modules break Component Manager #6718 — committed to magento/magento2 by deleted user 8 years ago
- Merge pull request #493 from magento-falcons/MAGETWO-59433 Bugs: * MAGETWO-59256: [GitHub] Custom composer modules break Component Manager #6718 — committed to magento/magento2 by magicbunneh 8 years ago
- MAGETWO-59256: [GitHub] Custom composer modules break Component Manager #6718 (cherry picked from commit fc99447f6aa1abfc1003f4181cea916c1616ea9e) MAGETWO-59256: [GitHub] Custom composer modules bre... — committed to JTimNolan/backport-magetwo-59256 by deleted user 8 years ago
- MAGETWO-70137: Backport of MAGETWO-59256 for 2.1: Custom composer modules break Component Manager #6718 #9692 - Merge Pull Request magento/magento2#9692 from JTimNolan/magento2:2.1-develop - Merged... — committed to magento/magento2 by ishakhsuvarov 7 years ago
- MAGETWO-70137: Backport of MAGETWO-59256 for 2.1: Custom composer modules break Component Manager #6718 #9692 — committed to magento/magento2 by deleted user 7 years ago
- Merge pull request #6718 from magento-performance/MC-41284 MC-41284 — committed to magento/magento2 by vzabaznov 3 years ago
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