0

We are trying to upload a module to our Magento Marketplace account. We have passed the marketing review but the technical review (Installation & Varnish Test & MFTF Magento Supplied) is failing us.The error is not related to our module. It is related to how to apply an Inventory Sales patch when lifting the Mg 2.3.6 version docker.

The Technical review log is:

Finished with the \"1\" exit code. Process output: \"Creating magento_deploy_run ... \r
\u001b[1A\u001b[2K\rCreating magento_deploy_run ... \u001b[32mdone\u001b[0m\r\u001b[1B
In Processor.php line 129:
                                                                               
  The command \"\/bin\/bash -c \"set -o pipefail; php .\/bin\/magento setup:install  
   -n --ansi --no-interaction --cleanup-database --session-save='db' --use-se  
  cure-admin='1' --use-rewrites='1' --currency='USD' --base-url='http:\/\/magen  
  to2.docker\/' --base-url-secure='https:\/\/magento2.docker\/' --backend-frontna  
  me='admin' --language='en_US' --timezone='America\/Los_Angeles' --db-host='d  
  b' --db-name='magento2' --db-user='magento2' --db-password='******' --admin  
  -user='admin' --admin-firstname='Admin' --admin-lastname='Username' --admin  
  -email='admin@example.com' --admin-password='******' | tee -a \/app\/var\/log\/  
  install_upgrade.log\"\" failed. \u001b[33mIn PatchApplier.php line 247:\u001b[39m        
  \u001b[37;41m                                                                     
              \u001b[39;49m                                                         
  \u001b[37;41m  Unable to apply patch Magento\\InventorySales\\Setup\\Patch\\Schema\\I  
  nitializeW  \u001b[39;49m                                                         
  \u001b[37;41m  ebsiteDefaultSock for module Magento_InventorySales. Original exc  
  eption mes  \u001b[39;49m                                                         
  \u001b[37;41m  sage: The default website isn't defined. Set the website and try   
  again.      \u001b[39;49m                                                         
  \u001b[37;41m                                                                     
              \u001b[39;49m                                                         
                                                                                                                                                                                          

In InstallUpdate.php line 100:
                                                                               
  The command \"\/bin\/bash -c \"set -o pipefail; php .\/bin\/magento setup:install  
   -n --ansi --no-interaction --cleanup-database --session-save='db' --use-se  
  cure-admin='1' --use-rewrites='1' --currency='USD' --base-url='http:\/\/magen  
  to2.docker\/' --base-url-secure='https:\/\/magento2.docker\/' --backend-frontna  
  me='admin' --language='en_US' --timezone='America\/Los_Angeles' --db-host='d  
  b' --db-name='magento2' --db-user='magento2' --db-password='******' --admin  
  -user='admin' --admin-firstname='Admin' --admin-lastname='Username' --admin  
  -email='admin@example.com' --admin-password='******' | tee -a \/app\/var\/log\/  
  install_upgrade.log\"\" failed. \u001b[33mIn PatchApplier.php line 247:\u001b[39m        
  \u001b[37;41m                                                                     
              \u001b[39;49m                                                         
  \u001b[37;41m  Unable to apply patch Magento\\InventorySales\\Setup\\Patch\\Schema\\I  
  nitializeW  \u001b[39;49m                                                         
  \u001b[37;41m  ebsiteDefaultSock for module Magento_InventorySales. Original exc  
  eption mes  \u001b[39;49m                                                         
  \u001b[37;41m  sage: The default website isn't defined. Set the website and try   
  again.      \u001b[39;49m                                                         
  \u001b[37;41m                                                                     
              \u001b[39;49m                                                                                                            
                                                                               

In Setup.php line 91:
                                                                               
  The command \"\/bin\/bash -c \"set -o pipefail; php .\/bin\/magento setup:install  
   -n --ansi --no-interaction --cleanup-database --session-save='db' --use-se  
  cure-admin='1' --use-rewrites='1' --currency='USD' --base-url='http:\/\/magen  
  to2.docker\/' --base-url-secure='https:\/\/magento2.docker\/' --backend-frontna  
  me='admin' --language='en_US' --timezone='America\/Los_Angeles' --db-host='d  
  b' --db-name='magento2' --db-user='magento2' --db-password='******' --admin  
  -user='admin' --admin-firstname='Admin' --admin-lastname='Username' --admin  
  -email='admin@example.com' --admin-password='******' | tee -a \/app\/var\/log\/  
  install_upgrade.log\"\" failed. \u001b[33mIn PatchApplier.php line 247:\u001b[39m        
  \u001b[37;41m                                                                     
              \u001b[39;49m                                                         
  \u001b[37;41m  Unable to apply patch Magento\\InventorySales\\Setup\\Patch\\Schema\\I  
  nitializeW  \u001b[39;49m                                                         
  \u001b[37;41m  ebsiteDefaultSock for module Magento_InventorySales. Original exc  
  eption mes  \u001b[39;49m                                                         
  \u001b[37;41m  sage: The default website isn't defined. Set the website and try   
  again.      \u001b[39;49m                                                         
  \u001b[37;41m                                                                     
              \u001b[39;49m                                                         
                                                                                                                                  
                                                                               

In Shell.php line 86:
                                                                               
  The command \"\/bin\/bash -c \"set -o pipefail; php .\/bin\/magento setup:install  
   -n --ansi --no-interaction --cleanup-database --session-save='db' --use-se  
  cure-admin='1' --use-rewrites='1' --currency='USD' --base-url='http:\/\/magen  
  to2.docker\/' --base-url-secure='https:\/\/magento2.docker\/' --backend-frontna  
  me='admin' --language='en_US' --timezone='America\/Los_Angeles' --db-host='d  
  b' --db-name='magento2' --db-user='magento2' --db-password='******' --admin  
  -user='admin' --admin-firstname='Admin' --admin-lastname='Username' --admin  
  -email='admin@example.com' --admin-password='******' | tee -a \/app\/var\/log\/  
  install_upgrade.log\"\" failed. \u001b[33mIn PatchApplier.php line 247:\u001b[39m        
  \u001b[37;41m                                                                     
              \u001b[39;49m                                                         
  \u001b[37;41m  Unable to apply patch Magento\\InventorySales\\Setup\\Patch\\Schema\\I  
  nitializeW  \u001b[39;49m                                                         
  \u001b[37;41m  ebsiteDefaultSock for module Magento_InventorySales. Original exc  
  eption mes  \u001b[39;49m                                                         
  \u001b[37;41m  sage: The default website isn't defined. Set the website and try   
  again.      \u001b[39;49m                                                         
  \u001b[37;41m                                                                     
              \u001b[39;49m                                                         
                                                                                                                                  

\"

Any idea how to fix it to pass the technical review? Thank you very much for your help.

1
  • Did you try running the command in the report with the same Magento/PHP version provided in the test? – Jimmy Apr 6 at 1:43
0

The problem was when using the Magento\Framework\App\State class in our Console Command (as well as any other classes that might change or load global state) in your module Console Commands. When Magento build a list of available console commands it creates instances for all command classes so all of their dependencies as well. As a workaround you may pass proxy objects to all of your Console command objects or use Object Manager to instantiate dependencies inside execute method.

We have obtained this information thanks to the Magento Slack community. Thank you very much to all.

In our case we have disabled the Console Command because it was not strictly necessary.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.