0

I have set up Magento 2.4.4.

On di:compile I am getting this error.

Class "Hybrid_Provider_Model_OAuth2" not found#0 /var/www/vhosts/any.com/dev2.any.com/vendor/composer/ClassLoader.php(571)

I have found the issue, we have Ecomteck/OneStepCheckout in use which also uses Ecomteck/SocialLogin .

This social login module has a dependency of a library called "

hybridauth/hybridauth".

In Ecomteck/SocialLogin module the class uses "/Hybrid_Provider_Model_OAuth2" this is causing the issue.

any thoughts how to fix it ?

7
  • any thoughts on this ? May 18 at 14:10
  • i'm not sure that running test on a controller rendering a webpage makes any sense. Unit tests would be more like for real methods. (Just my opinion). That being said, you need 2 things ; 1 - To know what you want to test exactly. 2 - To get Php unit. For a controller for example i would do something like that to ensure the link is working ` $client = static::createClient(); $this->assertEquals(200, $client->getResponse()->getStatusCode());`
    – Claims
    May 18 at 14:10
  • Hello @Claims, I am trying to create a test for the execute method. Is there any way it can be done? Can you help writing one ? May 18 at 14:46
  • any thoughts on this ? May 18 at 14:59
  • Testing if the execute went fine is testing if by calling the url you are getting a 200 status code (In that specific case). Which is like the piece of code i mentionned above (though i don't really know how the client is defined in magento i never ran test on this framework; but what is behind is PhpUnit so i guess there might be a way to get the status code result. May be more something like $this->getRequest() would give you better information. I don't have any solution all done sry. Hoping sometone can help you better :) Cheers.
    – Claims
    May 18 at 15:00

1 Answer 1

1
+50

run this command composer require hybridauth/hybridauth:2.18.0 and then run magento setup upgrade commands

php bin\magento setup:upgrade

php bin\magento setup:di:compile

3
  • Let me test it. May 23 at 13:16
  • Thank you, it worked but now it shows class "GeoIp2\Database\Reader" not found. May 23 at 13:24
  • GeoIp2 is not part of Social login modules, I'm sure that this error came from another module, Anyway you can run this command ```` composer require geoip2/geoip2 ```` to add GeoIp2 to your project, you can also read more about GeoIp2 github.com/maxmind/GeoIP2-php If the main issue has been solved, please don't forget to mark this answer as correct
    – Ahmed Atef
    May 23 at 13:36

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.