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
dariuszmaciejewski opened this Issue Sep 22, 2016 · 19 comments

Comments

Projects
None yet
@dariuszmaciejewski
Copy link
Contributor

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

This comment has been minimized.

Copy link

commented Sep 23, 2016

I am having the same issue

@fooman

This comment has been minimized.

Copy link
Contributor

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

This comment has been minimized.

Copy link
Member

commented Oct 3, 2016

Hi @dmaciej,

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

@shefi

This comment has been minimized.

Copy link

commented Oct 4, 2016

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

@shiftedreality

This comment has been minimized.

Copy link
Member

commented Oct 13, 2016

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

@yorrd

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

commented Feb 11, 2017

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

@jaydigital

This comment has been minimized.

Copy link

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

@spjuggalojoe

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

commented Mar 20, 2017

Where is a solution ??

@tlygnersjo

This comment has been minimized.

Copy link

commented Mar 27, 2017

Any solution yet?

@jvanderbiest

This comment has been minimized.

Copy link

commented Apr 10, 2017

I can confirm it still doesn't work in 2.1.4

@MissAnderson

This comment has been minimized.

Copy link

commented Apr 21, 2017

same here: 2.1.6

@amanjol

This comment has been minimized.

Copy link

commented Apr 25, 2017

Same issue in 2.1.6

@korostii

This comment has been minimized.

Copy link

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

MAGETWO-59256: [GitHub] Custom composer modules break Component Manager
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

This comment has been minimized.

Copy link

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.

magento-team pushed a commit that referenced this issue Jun 27, 2017

MAGETWO-70137: Backport of MAGETWO-59256 for 2.1: Custom composer mod…
…ules break Component Manager #6718 #9692

 - Merge Pull Request #9692 from JTimNolan/magento2:2.1-develop
 - Merged commits:
   1. cc80f72
   2. 81b28db
   3. 6bf4083
   4. 9a65346

magento-team pushed a commit that referenced this issue Jun 27, 2017

@bobbyn

This comment has been minimized.

Copy link

commented Jul 23, 2017

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

@magento-team

This comment has been minimized.

Copy link
Contributor

commented Jul 31, 2017

Internal ticket to track issue progress: MAGETWO-70137

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.