4

Trying to Run all integration tests using ../../../vendor/bin/phpunit command.

Getting an error -

PHP Fatal error: Uncaught Error: Cannot instantiate interface Magento\TwoFactorAuth\Api\UserConfigManagerInterface

[Progress: 1276 / 1762]
Module 'Magento_TwoFactorAuth':
PHP Fatal error:  Uncaught Error: Cannot instantiate interface Magento\TwoFactorAuth\Api\UserConfigManagerInterface in /var/www/html/ce241/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:121
Stack trace:
#0 /var/www/html/ce241/vendor/magento/framework/ObjectManager/Factory/Compiled.php(108): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject()
#1 /var/www/html/ce241/vendor/magento/framework/ObjectManager/Factory/Compiled.php(150): Magento\Framework\ObjectManager\Factory\Compiled->create()
#2 /var/www/html/ce241/vendor/magento/framework/ObjectManager/Factory/Compiled.php(79): Magento\Framework\ObjectManager\Factory\Compiled->get()
#3 /var/www/html/ce241/vendor/magento/framework/ObjectManager/ObjectManager.php(56): Magento\Framework\ObjectManager\Factory\Compiled->create()
#4 /var/www/html/ce241/vendor/magento/framework/Setup/Patch/PatchApplier.php(149): Magento\Framework\ObjectManager\ObjectManager->create()
#5 /var/www/html/ce241/setup/src/Magento/Setup/Model/Installer.php(1081): Magento\F in /var/www/html/ce241/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 121

I have disabled Magento_TwoFactorAuth module from main app/etc/config.php.
No other additional modules installed. Already checked permissions and ownership's of the respective directories.

2
  • 1
    Were you ever able to get this resolved?
    – Laura
    Feb 15 at 21:56
  • 1
    @Laura I had to re-enable Magento_TwoFactorAuth while executing integration test on my local. But you can use this https://github.com/markshust/magento2-module-disabletwofactorauth/tree/master/Test and add some integration test to \Test\Integration & make it work in that way. MFTF already there.
    – sandip
    Feb 17 at 13:18

Your Answer

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

Browse other questions tagged or ask your own question.