Magento 2 – Errors During Installation When Submitting Package to Magento Marketplace

composermagento2marketplace

I am trying submit one Magento2 Extension on Magento2 marketplace but i am getting following error:

Problem 1

Environment: Operating System – Centos 7, PHP Version – 5.6 , Magento Platform – 2.1 CE

Command: deploy:mode:set production

Installation issue:
Enabled maintenance mode
Starting compilation
Something went wrong while compiling generated code. See the error log for details.

Command returned non-zero exit code:
/usr/bin/php -f /var/www/html/bin/magento setup:di:compile
Build step 'Execute shell' marked build as failure
[PostBuildScript] – Execution post build scripts.
[DockerOperationsPHP56Magento21CE] $ /bin/sh -xe /tmp/hudson8419337065117254776.sh

Problem 2

Environment: Operating System – Centos 7, PHP Version – 7.0 , Magento Platform – 2.1 CE

Command: deploy:mode:set production

Installation issue:

Enabled maintenance mode
Starting compilation
Something went wrong while compiling generated code. See the error log for details.
Command returned non-zero exit code:
/usr/bin/php -f /var/www/html/bin/magento setup:di:compile
Build step 'Execute shell' marked build as failure
[PostBuildScript] – Execution post build scripts.
[DockerOperationsPHP70Magen…

What i tried:
I have tried to execute the same command on local and i am getting similar kind of error like following :
enter image description here

When i checked the system.log for error. It is giving the me following error:

enter image description here

but that is my local machine php memory issue. How can can i solve it to get it done on magento connect to upload my extension successfully.

Best Answer

I don't work in the Marketplace team, but my understanding is they have been iteratively increasing tests performed on marketplace, then going back to extension developers to have them address the issues. This particular issue sounds similar to a recent issue that had a bulk mail out to extension developers. (I have not checked your specific case, but it looks similar.) We are already working with a list of extension developers to address the issue (which does not help you in the short term). The cases I know of the extension needs adjustment - its not your fault.

Another similar case is we were allowing extensions to pick the subset of PHP versions it supports. This however also causes problems as different extensions may only support different versions of PHP - so we are clarifying the policy (and adding checks) so that "you must support all versions of PHP that Magento officially supports for that version of Magento (2.0 and 2.1 support different versions of PHP).

There are more checks coming along as well which are being retrospectively applied, then failing extension developers are being informed of the issues to be corrected. E.g. Varnish support is another one. Some issues however area easier than others to detect reliably.

I have not checked what you did closely, but I think completely reasonable to pass these instructions on to the extension developer. I will pass this issue on to the Marketplace team as well to see if this extension is already being talked to on the same issue.

Or (rereading) did I misunderstand and you are saying you are submitting to the marketplace and getting the error, but don't understand the cause? In which case I have not responded to your question at all! It is mandatory for extensions to work in production mode. That is not a marketplace problem - that is a problem with an error in your code not being visible until you turn on production mode.

If you are running out of memory locally, you may need to increase your memory limit in the php.ini file in scope. If Marketplace is failing during the submissions process, it may be we need to upgrade the limit internally on our test script. Composer is unfortunately quite memory hungry at times as well.

So sorry if I am not quite following, but on second reading I would say it is insufficient memory being allocated (controlled by the php.ini file). You need to adjust this on your site - have a look at http://devdocs.magento.com/guides/v2.0/install-gde/system-requirements-tech.html For more details on memory limits etc.

Related Topic