Skip to first unread message

Vladimir Tatarsky

unread,
Apr 6, 2017, 10:56:12 AM4/6/17
to AdWords API Forum
Hi guys. 
I use (Old) Google Ads APIs Client Library for PHP v17.0.0
And I'm getting this error in the middle of something:

PHP Fatal error:  Uncaught TypeError: Argument 3 passed to AdsUser::GetAuthVarValue() must be of the type array, boolean given, called in /.../library/vendor/googleads/googleads-php-lib/src/Google/Api/Ads/AdWords/Lib/AdWordsUser.php on line 117 and defined in /.../library/vendor/googleads/googleads-php-lib/src/Google/Api/Ads/Common/Lib/AdsUser.php:80

Content of my script is that it gets list of all customer accounts of given MCC account and goes through them, get list of campaigns etc (then adgroups, ads, keywords).
There are tsousands of customer in our MCC. And suddenly, on 157th account, it gives this error.
Customer account ID is 8098601687, campaign ID is 278695493 and it fails on AdGroupService->get operation, but why?? It does hundreds of successful api calls prior to this error and fails exactly on that customer account. Moreover, when I'm running that exact operation separately, it succeeds. That error blows my mind, I'm stuck with it for days already. I hope for your help.
I looked over GetAuthVarValue method, and error is about some INI file parsing. But I don't use that file to authenticate, I use OAuth2 tokens, it works fine for ALL other cases.

Thanks.

Sreelakshmi Sasidharan (AdWords API Team)

unread,
Apr 6, 2017, 2:30:32 PM4/6/17
to AdWords API Forum
Hi Vladimir,

The error does not seem to be at the API level. How did you confirm that the operations until 157th account were successful? Is that from the SOAP logs? If so, could you please share the complete SOAP logs with me so that I can take a look? Also, are you using BatchJobService to make these updates? 

Please use Reply privately to author to reply only to me.

Thanks,
Sreelakshmi, AdWords API Team

Vladimir Tatarsky

unread,
Apr 10, 2017, 5:11:16 AM4/10/17
to AdWords API Forum
BTW today I saw new error which happened prior to one descripted above:

PHP Fatal error:  SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://adwords.google.com/api/adwords/cm/v201702/AdGroupService?wsdl' : failed to load external entity "https://adwords.google.com/api/adwords/cm/v201702/AdGroupService?wsdl"
 in /home/ubuntu/.../library/vendor/googleads/googleads-php-lib/src/Google/Api/Ads/Common/Lib/AdsSoapClient.php on line 154
Fetching adgroups for campaign 278695493 failed: Exception 'SoapFault' with message 'SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://adwords.google.com/api/adwords/cm/v201702/AdGroupService?wsdl' : failed to load external entity "https://adwords.google.com/api/adwords/cm/v201702/AdGroupService?wsdl"



Sreelakshmi Sasidharan (AdWords API Team)

unread,
Apr 10, 2017, 10:33:33 AM4/10/17
to AdWords API Forum
Hi Vladimir, 

This error is mostlikely to do with your host/environment. You could perhaps check with your system admistrator to see if something changed.

I see that you have already created an issue on the reporsitory. I would also suggest to update your PHP library to the latest version. If you need steps to perform the update, please check here. You will need to perform the update via the composer to make sure that all the dependencies are taken care of. 

Vladimir Tatarsky

unread,
Apr 10, 2017, 11:43:01 PM4/10/17
to AdWords API Forum
We recently updated our platform to PHP 7.0, maybe that could be a problem?

Sreelakshmi Sasidharan (AdWords API Team)

unread,
Apr 11, 2017, 1:13:36 PM4/11/17
to AdWords API Forum
Hi Vladimir, 

The Google Ads PHP library supports any version higher than PHP 5.3. Where you able to update the GoogleAds PHP library to the latest version? I am hoping any version mismatch issues should be addressed by doing so. 

Vladimir Tatarsky

unread,
Apr 12, 2017, 2:22:42 AM4/12/17
to AdWords API Forum
 

 Hi Sreelakshmi,

No, I didn't, our DevOps solved that problem by running script from another server so I don't know what exactly was the problem. Before posting here I updated "old" library to latest version as we used older version of library and API before, but it didn't helped. But I definitely will update it, we just have a lot of code to be upgraded.

Thanks for the support.

Sreelakshmi Sasidharan (AdWords API Team)

unread,
Apr 12, 2017, 10:08:54 AM4/12/17
to adwor...@googlegroups.com
Hi Vladimir,

Glad to know that it is working in a different environment. As discussed earlier, it does seem like an environment dependent issue. I saw that there were discussions about this error on some public forums, you could perhaps try those suggestions.

Vladimir Tatarsky

unread,
May 12, 2017, 3:55:03 AM5/12/17
to AdWords API Forum
Hi guys, I've updated library to latest version and facing those errors again, one is new:

`PHP Fatal error:  SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://adwords.google.com/api/adwords/cm/v201702/CampaignService?wsdl' : failed to load external entity "https://adwords.google.com/api/adwords/cm/v201702/CampaignService?wsdl"` 
and  
`cURL error 35: error:02001018:system library:fopen:Too many open files (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)`

Sreelakshmi Sasidharan (AdWords API Team)

unread,
May 12, 2017, 11:28:28 AM5/12/17
to AdWords API Forum
Hi Vladimir ,

Could you please go over the instructions shared in this issue and see if that resolves your problem? If the details shared on the issue discussion does not resolve your problem, please create a new issue on the PHP client library and share your error logs there. Since this is a PHP library specific issue, the owner of the library will take a look at your issue and help you in resolving it. 
Reply all
Reply to author
Forward
0 new messages