ChannelCredentials.php missing?

584 views
Skip to first unread message

verbme...@gmail.com

unread,
Feb 9, 2022, 1:29:58 AM2/9/22
to Google Ads API and AdWords API Forum
Working with PHP client lib & MAMP on an M1 Macbook Pro, followed all the startup steps, confirmed that grpc and protobuf extensions are installed and running, composer installed the cloned git repo...

All seems to have worked correctly, but then trying to make a simple search ($googleAdsServiceClient->search) results in a "Warning: include(ChannelCredentials.php): Failed to open stream: No such file or directory"...

Anyone have any insight?

Google Ads API Forum Advisor

unread,
Feb 9, 2022, 10:00:18 AM2/9/22
to verbme...@gmail.com, adwor...@googlegroups.com
Hi,

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

To investigate the issue further, could you please provide us with the complete logs (request and response with request-id) via the Reply privately to the author option?

Thanks,
Google Logo
Nirmita Patel 
Google Ads API Team
 


ref:_00D1U1174p._5004Q2W5dCK:ref

verbme...@gmail.com

unread,
Feb 9, 2022, 7:30:35 PM2/9/22
to Google Ads API and AdWords API Forum
Actually I've tracked this a bit, and it happens (though silently) even when using one of the built-in example files.

Steps to reproduce:
1) open file google-ads-php/vendor/grpc/grpc/src/lib/BaseStub.php
2) place a breakpoint on line 47
3) open file google-ads-php/examples/Reporting/GetKeywordStats.php
4) for testing purposes, insert valid customer ID on line 42
5) run the GetKeywordStats.php file with a debugger enabled
6) once it hits your breakpoint on line 47 of BaseStub.php, step into the code
7) notice that the code attempts to find and load ChannelCredentials.php, but fails to do so
8) notice also that a call to ChannelCredentials on line 53 does nothing, as the class previously failed to load

Subsequent requests seem to complete successfully, so is this something I should just ignore? And if not, how can I configure my system to actually find ChannelCredentials.php?

Google Ads API Forum Advisor

unread,
Feb 10, 2022, 12:48:43 AM2/10/22
to verbme...@gmail.com, adwor...@googlegroups.com
Hi,

I'm also from Google Ads API Team. Allow me to provide support here.

Upon checking the information and details mentioned on this thread, I can see that the issue is more specific to the client library rather than Google Ads API. However, I would suggest you reach out to the author of the PHP client library to confirm your clarification as his issue is more specific to the client library. You can reach out to them via the PHP issues tracker on github to get further assistance here as they are more equipped to this concern.

Best regards,

Google Logo
Jinky
Google Ads API Team
 


ref:_00D1U1174p._5004Q2W5dCK:ref
Message has been deleted

Fernanda Rebelatto

unread,
Feb 10, 2022, 2:18:07 PM2/10/22
to Google Ads API and AdWords API Forum
Hi. I had the same problem (PHP 7.4) and I realized that the error is from the "method_exists" function of google-ads-php/vendor/grpc/grpc/src/lib/BaseStub.php.

I solved it by adding the namespace in the string "ChannelCredentials".
Old: method_exists('ChannelCredentials', 'isDefaultRootsPemSet')
New: method_exists('Grpc\ChannelCredentials', 'isDefaultRootsPemSet')

Line 46, probably.

Hope this helps,

Fernanda Rebelatto

Google Ads API Forum Advisor

unread,
Feb 11, 2022, 2:00:46 AM2/11/22
to fernanda....@gmail.com, adwor...@googlegroups.com
Hi Fernanda,

Thank you for sharing your solutions.

As mentioned by our colleague Jinky, and if you wish to further discuss PHP client library specific topics, then this Github channel should be more appropriate as you may also be able to acquire inputs from the client library owners themselves. 

For any Google Ads API services or features concerns, feel free to create a new thread in our forum so our team can further assist you.

Best regards,

Google Logo
Peter Laurence
Google Ads API Team
 


ref:_00D1U1174p._5004Q2W5dCK:ref
Reply all
Reply to author
Forward
0 new messages