Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom composer modules break Component Manager #6718

Closed
mcjwsk opened this issue Sep 22, 2016 · 19 comments
Closed

Custom composer modules break Component Manager #6718

mcjwsk opened this issue Sep 22, 2016 · 19 comments

Comments

@mcjwsk
Copy link
Contributor

@mcjwsk mcjwsk commented Sep 22, 2016

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.

@stalica
Copy link

@stalica stalica commented Sep 23, 2016

I am having the same issue

@fooman
Copy link
Contributor

@fooman fooman commented Sep 25, 2016

Related to example 3 here #4986 (comment) (in this example no extra repository needs to be added since it's done via packagist)

@shiftedreality
Copy link
Member

@shiftedreality shiftedreality commented Oct 3, 2016

Hi @dmaciej,

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

@shefi
Copy link

@shefi shefi commented Oct 4, 2016

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

@shiftedreality
Copy link
Member

@shiftedreality shiftedreality commented Oct 13, 2016

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

@yorrd
Copy link

@yorrd yorrd commented Feb 7, 2017

@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

@storepeinture
Copy link

@storepeinture storepeinture commented Feb 7, 2017

This problem appears to persist in 2.1.3 even. I have installed a french language pack via composer in a brand new CE 2.1.3. Trying to upgrade through the Web Setup Wizard. It doesn't even accept my Private Key and Public Key with the following error message:
"Couldn't get available versions for package imaginaerum/magento2-language-fr-fr"

@levasc
Copy link

@levasc levasc commented Feb 11, 2017

Problem remains in 2.1.4, for example with bitExpert/magento2-force-login module

@jaydigital
Copy link

@jaydigital jaydigital commented Feb 19, 2017

I'm finding that this problem also exists when the Magento 2.1.4 installation is made from Softaculous in the cPanel. My workaround is to not use the Component Manager and install the extension manually (when I can).
John

@CrazyBeardedGuy
Copy link

@CrazyBeardedGuy CrazyBeardedGuy commented Mar 14, 2017

Fixed in develop branch? Where? Someone please post the link to the corrected code. Great to know that we can run things properly if we're running a dev site, but not production. Problem persists in 2.1.5.

@isanat
Copy link

@isanat isanat commented Mar 20, 2017

Where is a solution ??

@tlygnersjo
Copy link

@tlygnersjo tlygnersjo commented Mar 27, 2017

Any solution yet?

@jvanderbiest
Copy link

@jvanderbiest jvanderbiest commented Apr 10, 2017

I can confirm it still doesn't work in 2.1.4

@MissAnderson
Copy link

@MissAnderson MissAnderson commented Apr 21, 2017

same here: 2.1.6

@amanjol
Copy link

@amanjol amanjol commented Apr 25, 2017

Same issue in 2.1.6

@korostii
Copy link
Contributor

@korostii korostii commented Apr 25, 2017

@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.

JTimNolan pushed a commit to JTimNolan/backport-magetwo-59256 that referenced this issue May 18, 2017
magento#6718

(cherry picked from commit fc99447)

MAGETWO-59256: [GitHub] Custom composer modules break Component Manager magento#6718

(cherry picked from commit a9697c6)

MAGETWO-59256: [GitHub] Custom composer modules break Component Manager magento#6718

(cherry picked from commit 7352b7c)

MAGETWO-59256: [GitHub] Custom composer modules break Component Manager magento#6718

(cherry picked from commit e871276)

MAGETWO-59256: [GitHub] Custom composer modules break Component Manager magento#6718

(cherry picked from commit 01f1f42)

MAGETWO-59256: [GitHub] Custom composer modules break Component Manager magento#6718

(cherry picked from commit e072d65)
@JTimNolan
Copy link

@JTimNolan JTimNolan commented May 18, 2017

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.

@bobbyn
Copy link

@bobbyn bobbyn commented Jul 23, 2017

https://github.com/magento/magento2/pull/9692/files
This fix worked for me. Thanks to JTimNolan

@magento-team
Copy link
Contributor

@magento-team magento-team commented Jul 31, 2017

Internal ticket to track issue progress: MAGETWO-70137

magento-engcom-team pushed a commit that referenced this issue Apr 8, 2021
MC-41284
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet