Api exception when calling Google.Api.Ads.AdWords.v201502.CustomerService.get()

180 views
Skip to first unread message

Ashley Xu

unread,
Aug 10, 2015, 6:56:36 PM8/10/15
to AdWords API Forum
Hi,

We have seen many errors when calling the customer service via adwords client sdk. The error code is [RequestError.UNKNOWN @ ]. Please find the stack trace below. The error code does not give us much information as to what caused the error. Could you please take a look?


Message: An API exception has occurred. See ApiException and InnerException fields for more details.
StackTrace:    at Google.Api.Ads.Common.Lib.AdsSoapClient.MakeApiCall(String methodName, Object[] parameters)
   at Google.Api.Ads.Common.Lib.AdsSoapClient.Invoke(String methodName, Object[] parameters)
   at Google.Api.Ads.AdWords.v201502.CustomerService.get()
Source: System.Web.Services
Message: [RequestError.UNKNOWN @ ]
StackTrace:    at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   at Google.Api.Ads.Common.Lib.AdsSoapClient.MakeApiCall(String methodName, Object[] parameters)


Thanks
Ashley

Anthony Madrigal

unread,
Aug 11, 2015, 12:00:30 PM8/11/15
to AdWords API Forum
Hi Ashley,

Could you please send me your SOAP request and response through reply privately to author? This will help give me a clearer picture to what may be causing your error.

Thanks,
Anthony
AdWords API Team

Ashley Xu

unread,
Aug 12, 2015, 5:04:07 PM8/12/15
to AdWords API Forum
We currently don't have that log. Is there a way to get it? We are using AdwordsApiClient_18.6.0. Do we have API to get this?

Thanks
Siming Xu

Anthony Madrigal

unread,
Aug 13, 2015, 9:21:40 AM8/13/15
to AdWords API Forum
Hi Ashley,

It depends on what client library they are using. Under the section Source, there is a link to the Github page of each respective client library. On that page, there is a section that shows how to enable logging. 

As an example, this link is how to enable logging for the Java library.

Regards,
Anthony
AdWords API Team

Ashley Xu

unread,
Aug 28, 2015, 4:49:27 PM8/28/15
to AdWords API Forum
Hi,

I got the soap request and response. Please help investigate. We've been seeing many these errors for the past two weeks continuously.


AdsClientLibs.SoapXmlLogs Error: 1 :

-----------------BEGIN API CALL---------------------

 

Request

-------

 

POST /api/adwords/mcm/v201502/CustomerService

User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 4.0.30319.18449)

Authorization: ******

Content-Type: text/xml; charset=utf-8

SOAPAction: ""

Host: adwords.google.com

Content-Length: 699

Accept-Encoding: gzip

Connection: Keep-Alive

TimeStamp: Fri, 28 Aug 2015 10:42:29 GMT

 

 

<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Header><RequestHeader xmlns="https://adwords.google.com/api/adwords/mcm/v201502"><developerToken xmlns="https://adwords.google.com/api/adwords/cm/v201502">******</developerToken><userAgent xmlns="https://adwords.google.com/api/adwords/cm/v201502"> (AwApi-DotNet/18.12.0, Common-Dotnet/3.7.0, .NET CLR/4.0.30319.18449, gzip)</userAgent></RequestHeader></soap:Header><soap:Body><get xmlns="https://adwords.google.com/api/adwords/mcm/v201502" /></soap:Body></soap:Envelope>

 

Response

--------

 

Content-Encoding:

X-Content-Type-Options: nosniff

X-Frame-Options: SAMEORIGIN

X-XSS-Protection: 1; mode=block

Content-Length: 497

Cache-Control: private, max-age=0

Content-Type: text/xml; charset=UTF-8

Date: Fri, 28 Aug 2015 17:42:29 GMT

Expires: Fri, 28 Aug 2015 17:42:29 GMT

Server: GSE

TimeStamp: Fri, 28 Aug 2015 10:42:29 GMT

 

 

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Header><ResponseHeader xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201502" xmlns="https://adwords.google.com/api/adwords/mcm/v201502"><ns2:requestId>00051e629b8f3bc80a4c992354005dfb</ns2:requestId><ns2:serviceName>CustomerService</ns2:serviceName><ns2:methodName>get</ns2:methodName><ns2:operations>0</ns2:operations><ns2:responseTime>137</ns2:responseTime></ResponseHeader></soap:Header><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>[RequestError.UNKNOWN @ ]</faultstring><detail><ApiExceptionFault xmlns="https://adwords.google.com/api/adwords/mcm/v201502" xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201502"><ns2:message>[RequestError.UNKNOWN @ ]</ns2:message><ns2:ApplicationException.Type>ApiException</ns2:ApplicationException.Type><ns2:errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns2:RequestError"><ns2:fieldPath></ns2:fieldPath><ns2:trigger></ns2:trigger><ns2:errorString>RequestError.UNKNOWN</ns2:errorString><ns2:ApiError.Type>RequestError</ns2:ApiError.Type><ns2:reason>UNKNOWN</ns2:reason></ns2:errors></ApiExceptionFault></detail></soap:Fault></soap:Body></soap:Envelope>

-----------------END API CALL-----------------------



Thanks
Ashley

Anthony Madrigal

unread,
Aug 28, 2015, 5:09:25 PM8/28/15
to AdWords API Forum
HI Ashley,

Are you using your MCC account to make this request or a client account? If it is an MCC account, you will need to specify the clientCustomerId. Here are more details on the CustomerService.

I also noticed you are using v201502. I suggest updating your client library to v201506.

Ashley Xu

unread,
Aug 28, 2015, 7:31:45 PM8/28/15
to AdWords API Forum
Hi,

We are calling CustomerService to get the customer Id, we don't have that on our side. Also according to your documentation about Customer Service-'It has a get method that takes no arguments and returns a Customer record containing fields such as customerI' It suggests that when calling Customer Service, we don't need to pass you any argument.

clientCustomerID is used to obtain info for a specific account. We failed before we even reach that step. 

For us, it's first call CustomerService to get customer id. Then call ManagedCustomerService to get account info. We failed at the first step. So I don't think it's because we didn't pass in clientCustomerId. Just in case, we tried importing from a MCC user in our production environment, it succeeded.

From the SOAP response, there's a request ID, can we use it to nail down to the exact error? That'll help a lot. Thank you!

Thanks
Ashley

Thanet Knack Praneenararat (AdWords API Team)

unread,
Sep 1, 2015, 4:35:38 AM9/1/15
to AdWords API Forum
Hi Ashley,

Could you please tell me more about your use case?
It's true that you don't need to pass arguments to use CustomerService, but that's because the default, which is the ID of authenticated account, is always returned.
If you want to get information of your child accounts, you need to specify a clientCustomerId when authenticating as an MCC to obtain such information.

In other words, CustomerService is designed to give you customer information, e.g., currency code, date time zone, not the clientCustomerId itself (though the ID is also returned with other information).
If you don't know the clientCustomerId at first and that account is not managed under your MCC account, I don't think you can get information using CustomerService.

Best,
Thanet, AdWords API Team
Message has been deleted

jxx...@hotmail.com

unread,
Sep 8, 2015, 8:17:59 AM9/8/15
to AdWords API Forum
Thanks Thanet for looking into it. I'm working with Ashley. And we've been use this way to get customer id for a long time and just recently that we noticed that we got UnKnownException from Adwards for this call. Nothing was changed on our end. So can you please help check why we are getting UnknownException. BTW, not all the request failed. Actually only 2% of the requests got UnknownException error.  Thanks a lot for your help!

Thanet Knack Praneenararat (AdWords API Team)

unread,
Sep 8, 2015, 1:44:01 PM9/8/15
to AdWords API Forum
Hi,

Could you please provide more information how you use the service?
Any SOAP logs or code snippets would help much.
Please reply by clicking Reply privately to author on the top right button of my comment.

Cheers,
Thanet, AdWords API Team

Ashley Xu

unread,
Sep 8, 2015, 8:15:05 PM9/8/15
to AdWords API Forum
I've included the soap request/response and the class/method from adwords api client we use in private mode.

Ashley Xu

unread,
Sep 9, 2015, 9:36:41 PM9/9/15
to AdWords API Forum
Hi Thanet,

Did you get my private reply? Please help investigate on your earliest convenience. Our availability has been impacted for a long time now. This is one example request id 00051e629b8f3bc80a4c992354005dfb. The full soap request/response is already attached.

Thanks
Ashley

Thanet Knack Praneenararat (AdWords API Team)

unread,
Sep 9, 2015, 11:14:30 PM9/9/15
to AdWords API Forum
Hi Ashley,

I've replied to your email yesterday. Could you please check your inbox again?

What I've said in the email is that it seems your log a bit too old so we can't track back to see what happened.

Could you please:
  1. Send a recent one ?
  2. Try v201506?
  3. Add your client customer ID? (I know that it's written that the client customer ID is not needed but to investigate the problem, this may help us.)
By the way, I still don't get your use case much about using this service to get client customer ID.
If possible, could you please also give your code snippets and explain more?

Best,
Thanet, AdWords API Team

Ashley Xu

unread,
Sep 10, 2015, 6:48:54 PM9/10/15
to AdWords API Forum
I've replied to your email with the information. Could you please take a look?

Thanks
Ashley

Thanet Knack Praneenararat (AdWords API Team)

unread,
Sep 11, 2015, 2:39:42 AM9/11/15
to AdWords API Forum
Hi Ashley,

I'm investigating this issue and will let you know once I have any update.
Have you also tried v201506 and add your client customer ID in your header?

Cheers,
Thanet, AdWords API Team

Ashley Xu

unread,
Sep 18, 2015, 4:20:38 PM9/18/15
to AdWords API Forum
Hi Thanet,

Any update? The issue is still happening. We are in the progress of uploading the v201506. But still it'll be good to know the root cause.

Thanks
Ashley

Nadine Sundquist (AdWords API Team)

unread,
Sep 18, 2015, 8:05:31 PM9/18/15
to AdWords API Forum
Hi Ashley,

I just checked on the thread that Thanet started about this issue. They haven't been able to figure it out, yet. 

Regards,
Nadine, AdWords API Team

Ashley Xu

unread,
Oct 1, 2015, 12:31:30 PM10/1/15
to AdWords API Forum
We have upgraded to the recommended SDK. Still it does not help. We have reported to you about this issue a month ago, provided you with the full soap request\response and tried out what you recommended, but to no avail. Please treat this as a high priority. And let us know what is the root cause and what we can try next asap.

Thanks
Ashley

Nadine Sundquist (AdWords API Team)

unread,
Oct 1, 2015, 12:58:09 PM10/1/15
to AdWords API Forum
Hi Ashley,

Thanks for the update about you upgrading to a newer version. This one seems to be a tricky one to resolve. We're still working on trying to find the root cause. 

Regards,
Nadine, AdWords API Team

Ashley Xu

unread,
Oct 1, 2015, 7:25:43 PM10/1/15
to AdWords API Forum
Ok, thank you! Please keep me updated

Ashley Xu

unread,
Oct 7, 2015, 9:05:16 PM10/7/15
to AdWords API Forum
Hi,

Any updates or ETA?

Thanks
Ashley

Ashley Xu

unread,
Oct 7, 2015, 9:15:15 PM10/7/15
to AdWords API Forum
BTW, do you know if it'll retry for this error? We have added RetryCount in our config file as is instructed in the client library wiki. If it still throws the exception then does it mean all the retry failed or there may not be any retry for that request.

Thanks
Ashley
Reply all
Reply to author
Forward
0 new messages