Ecommerce Shopify WordPress Discussion

Fatal error: Uncaught Error: Google\Auth\HttpHandler\HttpHandlerFactory::build()

I have two plugins Analytify and Loginpress. In Loginpress Plugin when I configure my social login as Google (Login as Google), I get following error: Fatal error: Uncaught Error: Google\Auth\HttpHandler\HttpHandlerFactory::build(): Argument #1 ($client) must be of type ?GuzzleHttp\ClientInterface, Analytify\GuzzleHttp\Client given, called in C:\Users\WPB\Local Sites\analytify-google-login\app\public\wp-content\plugins\wp-analytify\lib\Google-GA4\vendor\google\apiclient\src\Client.php on line 220 in C:\Users\WPB\Local Sites\analytify-google-login\app\public\wp-content\plugins\loginpress-pro\addons\social-login\sdk\google-client\vendor\google\auth\src\HttpHandler\HttpHandlerFactory.php on line 34 I have worked on this by changing the Analytify\GuzzleHttp\Client to GuzzleHttp\Client on which class already declared comes up. The namespaces are added to the analytify plugin using php-scoper and the scoper-inc.php code is: <?php declare (strict_types=1); namespace Analytify; // use Analytify\Isolated\Symfony\Component\Finder\Finder; return [ 'prefix' => 'Analytify', // string|null 'output-dir' => null, // string|null 'finders' => [], // list<Finder> 'patchers' => [], // list<callable(string $filePath, string $prefix, string $contents): string> 'exclude-files' => [], // list<string> 'exclude-namespaces' => ['Google\\', 'Grpc\\', 'Composer\\'], // list<string|regex> 'exclude-constants' => [], // list<string|regex> 'exclude-classes' => [], // list<string|regex> 'exclude-functions' => [], // list<string|regex> 'expose-global-constants' => \true, // bool 'expose-global-classes' => \true, // bool 'expose-global-functions' => \true, // bool 'expose-namespaces' => [], // list<string|regex> 'expose-constants' => [], // list<string|regex> 'expose-classes' => [], // list<string|regex> 'expose-functions' => [], ]; Now I want guidance in the issue that in which plugin I have to resolve the namespace issue and how can I solve the issue within Analytify? When I added namespaces to Loginpress its own functionality breakdown then which is separate issue. Moreover, as I uninstall Analytfiy my Login as Google starts to work fine. But I need both plugins.
The issue was fixed. I first updated the libraries. Secondly I excluded the following namespaces to be namespace in the php-scoper: 'exclude-namespaces' => ['Google\\', 'Grpc\\', 'Composer\\', 'GuzzleHttp\\', 'Monolog\\', 'Psr\\'] Now my plugin has no conflict issue with the Social Login Plugins and issue is resolved.

February 4, 2024

TurboCommerce make the better internet purchasing globaly

Turbo Multi-language Translator

Make the better internet purchasing globaly

Turbosify SEO Speed Booster

5.0 (7) Free plan available
Get better conversions by improving store loading speed Installed

Turbo Multi-language Chat - AI Customer service in one hand

TurboCommerce make the better internet purchasing globaly
Our products

The help you need, when you need it

App by Turbo Engine

3 apps • 5.0 average rating

Turbosify Speed Booster

5.0 (7)
Get better conversions by optimizing shopify store Google page speed Installed

Turbosify Translator for Wordpress Woocommerce

5.0 (74) Free Wordpress Woocommerce Plugin
Translate your wordpress website to multiple language within 1 click, no configuration needed, no No technical required

Grow your business here

Whether you want to sell products down the street or around the world, we have all the tools you need.