generateKeywordForecastMetrics, RetryMiddleWare

223 views
Skip to first unread message

Sher Ansari

unread,
Dec 4, 2023, 5:32:23 AM12/4/23
to Google Ads API and AdWords API Forum
I get the following error 
TypeError
Google\ApiCore\Middleware\RetryMiddleware::Google\ApiCore\Middleware\{closure}(): Argument #1 ($e) must be of type Exception, Error given, called in /var/www/html/netpost/vendor/google/gax/src/Middleware/RetryMiddleware.php on line 109

when I run this code 
it is running fine on my local, but when I run it on server it got the above error, 
Local php version is 8.1.13
Server Version php is 8.1.26
any help would be appriciated


try {
$response = $keywordPlanIdeaServiceClient->generateKeywordForecastMetrics(
$generateKeywordForecastMetricsRequest
);

} catch (ApiException $e) {
\Log::info($e->getMessage());
}



Google Ads API Forum Advisor

unread,
Dec 4, 2023, 2:11:53 PM12/4/23
to phpstor...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for contacting the Google Ads API support team.

By reviewing your concern, I understand that you are encountering an error. In order to investigate your issue further, kindly provide us with the complete API logs (request and response with request-id and request header) generated at your end and uncropped UI screenshot of where you are facing the issue.

If you are using a client library and haven't enabled the logging yet, I would request you to enable logging for the specific client library that you are using. You can refer to the guides Java, .Net, PHP, Python, Ruby or Perl to enable logging at your end. For REST interface requests, you can enable logging via the curl command by using the -i flag.

You can send the details via Reply privately to the author option, or direct private reply to this email.
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02qWTb2:ref"

Thanks,
 
Google Logo Google Ads API Team


Huy Le

unread,
Dec 28, 2023, 7:15:39 AM12/28/23
to Google Ads API and AdWords API Forum
I am facing the same problem. Both my server and local server are running php version 8.0.30, it runs fine on my local machine. when i run it on the server it gives the same error.
I'm using "googleads/google-ads-php": "^21.1.0",  "googleads/googleads-php-lib": "^63.0.0",

Google Ads API Forum Advisor

unread,
Dec 28, 2023, 9:49:48 AM12/28/23
to hu...@resonancetech.co, adwor...@googlegroups.com
Hi,

Thank you for reaching out to the Google Ads API support team.

After reviewing your concern, I understand that you are encountering an error while using the PHP client library in Google Ads API.

In order to investigate your issue further, kindly provide us with the complete API logs (request and response with request-id and request header) generated at your end.
Reply all
Reply to author
Forward
0 new messages