inventory: Deployment Breaks After Upgrading to Magento 2.3.2
Preconditions (*)
Magento 2.3.2
- After Magento, upgrading from Magento 2.3.1 to 2.3.2
Steps to reproduce (*)
- Multi-stock Inventory Modules are enabled in Magento 2.3.1
- Upgrade Magento 2.3.2 from Magento 2.3.1 by using composer.
- Deployment initiated
Expected result (*)
- Deployment is a success with no Errors
Actual result (*)
- Deployment has the below errors.
Fatal error: Uncaught Error: Cannot instantiate interface Magento\Framework\HTTP\ClientInterface in /opt/lampp/htdocs/example/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:50
Stack trace: #0 /opt/lampp/htdocs/example/vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Framewo...') magento/magento2#1 /opt/lampp/htdocs/example/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(160): Magento\Framework\ObjectManager\ObjectManager->get('Magento\\Framewo...') magento/magento2#2 /opt/lampp/htdocs/example/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(246): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument(Array, 'Magento\\Framewo...', NULL, 'client', 'Magento\\Invento...') magento/magento2#3 /opt/lampp/htdocs/example/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(34): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgumentsInRuntime('Magento\\Invento...', Array, Array in /opt/lampp/htdocs/example/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php on line 50
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 4
- Comments: 27 (5 by maintainers)
Please, check file app/code/etc/di.xml. it must contain a this line: preference for=“Magento\Framework\HTTP\ClientInterface” type=“Magento\Framework\HTTP\Client\Curl”
The workaround from @ryanpalmerweb works great.
Thank you very much!
We had disabled all the Magento_Inventory* modules before (in 2.3.0) and thus were not able to deploy after we had upgraded to 2.3.2.
We have disabled the four following modules in the app/etc/config.php and the deploy is working again (upgrade to 2.3.2 successfully completed):
@sriharsha184
It’s likely you have a module enabled with some dependencies for this
We managed to get around this by disabling Magento_InventoryReservationCli in config.php
Add below line if not present in app\etc\di.xml
<"preference for=“Magento\Framework\HTTP\ClientInterface” type=“Magento\Framework\HTTP\Client\Curl”>
This worked for me.
I had a similar issue. Debugged the issue by putting a breakpoint at
\Magento\Framework\ObjectManager\Factory\Dynamic\Developer::create
with a condition to only break on theMagento\Framework\HTTP\ClientInterface
Then stepped back to find what class called it which was a console command bundled inMagento\InventoryDistanceBasedSourceSelection\Model\ImportGeoNames
So then I disabledMagento_InventoryDistanceBasedSourceSelection
and the install worked as expected. This seems to be a core bug…We’ve got all of the Magento_Inventory* modules disabled on our install, however we are not reliant on stock control
I can see that your problem is being caused by the dependency in Magento_InventorySales - try turning this off, or if that causes more issue then what about turning the others on.