Closed schmengler closed 6 years ago
I worked around this issue by adding the preference manually in my test:
$this->objectManager->configure(
[
'preferences' => [
ltrim(
\Magento\Framework\Interception\ObjectManager\ConfigInterface::class,
'\\'
) => ltrim(
\Magento\TestFramework\ObjectManager\Config::class,
'\\'
),
],
]
);
But that should not be necessary.
Hi @schmengler. Thank you for your report. The issue has been fixed in magento/magento2#12845 by @schmengler in 2.2-develop branch Related commit(s):
The fix will be available with the upcoming patch release.
Hi @schmengler. Thank you for your report. The issue has been fixed in magento-engcom/magento2ce#1299 by @magento-engcom-team in 2.3-develop branch Related commit(s):
The fix will be available with the upcoming patch release.
Same error exists in 2.3.1, fresh install, after not installing all modules, error 500 in admin panel of products page, all other pages load fine,
Not sure what not installed module is causing the error
`[root@host /home/x/public_html]# php bin/magento setup:upgrade
Fatal error: Uncaught Error: Cannot instantiate interface Magento\Framework\HTTP\ClientInterface in /home/x/public_html/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:50 Stack trace:
@djixas have you fixed? i'm having same error on 2.3.1
@FrancYescO
I did, will stay with v1.9 for foreseeable future and then migrate to a store that does not take 20 seconds to load without 50 cache modules enabled
@FrancYescO & @djixas , I just fixed it :
1/ Add the following line into /app/etc/di.xml file :
<preference for="Magento\Framework\HTTP\ClientInterface" type="Magento\Framework\HTTP\Client\Curl" />
2/ Create a new module, with the following /etc/di.xml file :
<?xml version="1.0" ?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<preference for="Magento\Framework\HTTP\ClientInterface" type="Magento\Framework\HTTP\Client\Curl" />
</config>
3/ With command line : php bin/magento setup:di:compile
, then php bin/magento setup:upgrade
4/ Remove the line added in 1/ (in /app/etc/di.xml)
5/ With command line : php bin/magento setup:di:compile
, then php bin/magento setup:upgrade
This should be fixed
I have this issue after i upgrade my magento to 2.3.1 , can someone help me to resolve it . Thank you
Fatal error: Uncaught Error: Cannot instantiate interface Magento\Framework\Acl\LoaderInterface in /home/edgeexpr/public_html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:116 Stack trace: #0 /home/edgeexpr/public_html/vendor/magento/framework/ObjectManager/Factory/Compiled.php(108): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Magento\Framewo...', Array) #1 /home/edgeexpr/public_html/vendor/magento/framework/ObjectManager/Factory/Compiled.php(150): Magento\Framework\ObjectManager\Factory\Compiled->create('Magento\Framewo...') #2 /home/edgeexpr/public_html/vendor/magento/framework/ObjectManager/Factory/Compiled.php(79): Magento\Framework\ObjectManager\Factory\Compiled->get('Magento\Framewo...') #3 /home/edgeexpr/public_html/vendor/magento/framework/ObjectManager/Factory/Compiled.php(150): Magento\Framework\ObjectManager\Factory\Compiled->create('Magento\Framewo...') #4 /home/edgeexpr/public_html/vendor/magento/framework/ObjectManager/Factory/Compiled.php(79): Magento\Fram in /home/edgeexpr/public_html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 116
@djixas module-ups and module-inventory-distance-based-source-selection
have the use Magento\Framework\HTTP\ClientInterface;
@toniodlab fixed the problem
tag 2.3.1 is missing the
<preference for="Magento\Framework\HTTP\ClientInterface" type="Magento\Framework\HTTP\Client\Curl" />
branch 2.3-develop has it
Preconditions
Steps to reproduce
Expected result
Actual result
I logged which classes were instantiated befor the error and it seems like
XmlCatalogGenerateCommand
has the object manager config in its dependency graph, but in the integration test environment there is no preference for it.