googleads / google-ads-php

Google Ads API Client Library for PHP
https://developers.google.com/google-ads/api/docs/client-libs/php
Apache License 2.0
291 stars 260 forks source link

Google ads GRPC timeout #55

Closed slowas closed 5 years ago

slowas commented 5 years ago

Hello,

I'am have issue with google ads trying implement in laravel command GetCustomers works like a charm but then trying get a campaign or adgroup and always returns error.

https://imgur.com/a/HX9LUdx

What soliution for this problem? Thanks for answer

fiboknacky commented 5 years ago

Hello,

As this is related to the gRPC library, could you post your question on this repo too? Perhaps, they may ask you to give more information like the log message.

As a workaround, do you happen to be able to use GoogleAdsSearch to get campaigns instead? Note that in Google Ads API, we recommend using GoogleAdsSearch and specifying GAQL query to restrict only the fields you need. Using CampaignService.get() is not quite effective in production.

Best, Knack

slowas commented 5 years ago

Thanks for answer

Adding image from laravel code, used this repository example (getCampaign) This code GoogleAdsService

In constuctor initiliasing a Google ads auth image

image

Also adding main command created on laravel

image

Failing on

$response = $googleAdsServiceClient->search($account, $query, ['pageSize' => self::PAGE_SIZE]);

No logs created by googleads repository

image

fiboknacky commented 5 years ago

So, when you said you use get customers, it's actually you use the SELECT FROM customer instead?

slowas commented 5 years ago

Yes, small update on window machine same crash but, on linux working like a charm. I'am think is problem window GRPC itself.

fiboknacky commented 5 years ago

OK. In that case, could you please contact the gRPC team? Thank you.

makstech commented 5 years ago

I had the same problem... it's a problem with 32-bit PHP build. You would have to use 64-bit build of PHP for this to work because $timeout variable there is over 2,147,483,647 (which is 32-bit PHP int limit) and it returns float instead of long int so it breaks that part.

fiboknacky commented 5 years ago

Thanks for information.

chiragvels commented 5 years ago

Hi,

I am facing also same error on mac machine as well after lib v1_2 update. Which may be from gRPC only.

ApiException was thrown with message '{ "message": "OS Error", "code": 14, "status": "UNAVAILABLE", "details": [] }'.

fiboknacky commented 5 years ago

Hi Chirag,

Do you use 64-bit build too?

chiragvels commented 5 years ago

Hi,

Yes. I am using 64bit build.

Thanks

On Tue, 7 May 2019 at 6:31 PM, Thanet Knack Praneenararat < notifications@github.com> wrote:

Hi Chirag,

Do you use 64-bit build too?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/googleads/google-ads-php/issues/55#issuecomment-490069539, or mute the thread https://github.com/notifications/unsubscribe-auth/AAASGEQMLIM6HQQ3BO7HZHDPUF4S5ANCNFSM4HFDN3CA .

-- Regards, chirag (09879500234)

fiboknacky commented 5 years ago

Do you still face with the error consistently? I ask because we did have some product-wide issues last week, and I'm not sure you're just caught in the middle of that issue, or it's totally just because of the upgrade to v1_2.

chiragvels commented 5 years ago

Currently, I m not facing this error.

Thanks,

fiboknacky commented 5 years ago

Thanks. As we have a workaround for the original reported issue already, I'm closing this.

makstech commented 5 years ago

IMO, it should be noted not only in composer.json but also somewhere like in API docs that it is suggested to use 64-bit PHP build, especially when people are considering "searching" and reporting feature (at this point it's required, not just suggested). https://github.com/googleads/google-ads-php/blob/202077cad9d810656c5aee06f7e928a35904692c/composer.json#L21-L22

It is pretty much constant problem, because a lot of Windows users use Xampp which doesn't offer 64-bit out of the box.