Posts tagged with grpc

I'm working with the Google Ads API and trying to run the GetCampaigns.php example from the official repository. The authentication works fine, but when I try to execute the searchStream() method to retrieve campaigns, I get warnings about gRPC channels being maxed out, and the process stops. This is the file

The error log shows the following:

 WARNING: All log messages before absl::InitializeLog() is called are written to STDERR I0000 00:00:1727872579.980136   22500 channel.c:277] [Warning] Target upper bound: 1. Current size: 1. I0000 00:00:1727872579.980178   22500 channel.c:280] [Warning] Target googleads.googleapis.com:443 will not be persisted. 

I tried debugging the code, and the execution stops at this line:

$stream = $googleAdsServiceClient->searchStream(     SearchGoogleAdsStreamRequest::build($customerId, $query) ); 

I also tried increasing the number of gRPC channels by setting the following environment variable, but it didn't solve the issue:

putenv('GRPC_DEFAULT_MAX_CHANNELS=10');

I am utilizing the python client library for the Google Ads API. Alls has been working as expected and all of a sudden began running extremely slow when running locally on my Mac. Ran the cProfile tool and found that this 'next_event' method from gRPC has started taking between 8-10secs per call.

Even basic usage of the API (i.e. GAQL to pull in campaign names) returns the same latency issue.

ncalls  tottime  percall  cumtime  percall filename:lineno(function)         1    8.123    8.123    8.126    8.126 {method 'next_event' of 'grpc._cython.cygrpc.SegregatedCall' objects} 

Have tried various versions of Python and the google-ads and gRPC packages. Others have ran this same code from the same repo/branch on their machines and do not experience this issue so I am trying to determine what about my environment/Mac is causing this issue.

Good days, I am trying to install the library with the "pecl install grpc" command and it is returning the following error: "Fatal error: Array and string offset access syntax with curly braces is no longer supported in C:\xampp\php\pear\PEAR\Config.php on line 2095".

I don't know why but it gives a PHP related syntax error.

The PHP version I'm using is:

"PHP 8.2.0 (cli) (built: Dec 6 2022 15:31:23) (ZTS Visual C++ 2019 x64) Copyright (c) The PHP Group Zend Engine v4.2.0, Copyright (c) Zend Technologies"

And it is not only that file but many more with which it gives a syntax error.

Tried reinstalling PHP and Xampp

Any solution or idea on how to fix it or install it properly?

Thank you.

When I try to run app with Google.Ads.GoogleAds nuget package on MacOS with M1 silicon I get the following error :

Unhandled exception. System.IO.FileNotFoundException: Error loading native library. Not found in any of the possible locations: .../libgrpc_csharp_ext.arm64.dylib

Cannot really find where to obtain libgrpc_csharp_ext.arm64.dylib or where can I find source for it and how to compile.

My code is working fine on Dev server but throws Error on Staging server, am I missing anything on Staging?

Error: Fatal Error (1): Failed to parse binary descriptor in [../app/Vendor/googleads/google-ads-php/metadata/Google/Ads/GoogleAds/V8/Services/ConversionUploadService.php, line 124]

Thanks in advance.