Inconsistent response from Search Query for AdGroup in the Beta Ads API

60 views
Skip to first unread message

Darshan Pradhan

unread,
Jan 30, 2019, 3:13:44 PM1/30/19
to AdWords API and Google Ads API Forum
I am unsure if this is a temporary issue going on with Beta Ads api, but, I am using java client and executing following query and every time I run my query I keep get inconsistent results.

SELECT campaign.id, ad_group.idad_group.name, ad_group.status, ad_group.type,  ad_group.ad_rotation_mode, ad_group.tracking_url_template, ad_group.cpc_bid_micros, ad_group.cpa_bid_micros,  ad_group.cpm_bid_micros,  ad_group.cpv_bid_micros, ad_group.target_roas_override,  ad_group.percent_cpc_bid_micros, ad_group.explorer_auto_optimizer_setting.opt_in,  ad_group.display_custom_bid_dimension, ad_group.final_url_suffix FROM ad_group 


1. Sometime the query executes successfully (meaning no error, i get a result set).
2. Sometimes I get following error
Exception in thread "main" com.google.api.gax.rpc.InternalException: io.grpc.StatusRuntimeException: INTERNAL: Internal error encountered.
at com.google.api.gax.rpc.ApiExceptionFactory.createException(ApiExceptionFactory.java:67)
at com.google.api.gax.grpc.GrpcApiExceptionFactory.create(GrpcApiExceptionFactory.java:72)
at com.google.api.gax.grpc.GrpcApiExceptionFactory.create(GrpcApiExceptionFactory.java:60)
at com.google.api.gax.grpc.GrpcExceptionCallable$ExceptionTransformingFuture.onFailure(GrpcExceptionCallable.java:97)
at com.google.api.core.ApiFutures$1.onFailure(ApiFutures.java:68)
at com.google.common.util.concurrent.Futures$CallbackListener.run(Futures.java:1052)
at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:398)
at com.google.common.util.concurrent.AbstractFuture.executeListener(AbstractFuture.java:1030)
at com.google.common.util.concurrent.AbstractFuture.complete(AbstractFuture.java:871)
at com.google.common.util.concurrent.AbstractFuture.setException(AbstractFuture.java:716)
at io.grpc.stub.ClientCalls$GrpcFuture.setException(ClientCalls.java:507)
at io.grpc.stub.ClientCalls$UnaryStreamToFuture.onClose(ClientCalls.java:482)
at io.grpc.PartialForwardingClientCallListener.onClose(PartialForwardingClientCallListener.java:39)
at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:23)
at io.grpc.ForwardingClientCallListener$SimpleForwardingClientCallListener.onClose(ForwardingClientCallListener.java:40)
at io.grpc.internal.CensusStatsModule$StatsClientInterceptor$1$1.onClose(CensusStatsModule.java:678)
at io.grpc.PartialForwardingClientCallListener.onClose(PartialForwardingClientCallListener.java:39)
at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:23)
at io.grpc.ForwardingClientCallListener$SimpleForwardingClientCallListener.onClose(ForwardingClientCallListener.java:40)
at io.grpc.internal.CensusTracingModule$TracingClientInterceptor$1$1.onClose(CensusTracingModule.java:397)
at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:459)
at io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:63)
at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.close(ClientCallImpl.java:546)
at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.access$600(ClientCallImpl.java:467)
at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:584)
at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Suppressed: com.google.api.gax.rpc.AsyncTaskException: Asynchronous task failed
at com.google.api.gax.rpc.ApiExceptions.callAndTranslateApiException(ApiExceptions.java:57)
at com.google.api.gax.rpc.UnaryCallable.call(UnaryCallable.java:112)

3. Sometimes the query partially succeeds, i.e, java client already handles paging. So during subsequent page fetch I get "USER_PERMISSION_DENIED" Error
Console logs of the application: 
 | (MX:Whoop!) Felix Callejo| REMOVED| 10000value: 62814791947
 | (MX:Whoop!) Tommasi| REMOVED| 10000Request ID E5j3qeHiSprwNX72dSrtIg failed due to GoogleAdsException. Underlying errors:
  Error 0: error_code {
  authorization_error: USER_PERMISSION_DENIED
}
message: "User doesn\'t have permission to access customer."

4. Sometimes, all of a sudden unrecognized fields error 
Request ID oMB2jKocyIJLBiHoRQrw8A failed due to GoogleAdsException. Underlying errors:
  Error 0: error_code {
  query_error: UNRECOGNIZED_FIELD
}
message: "Unrecognized fields in the query: \'ad_group.target_roas_override\', \'ad_group.cpa_bid_micros\'."

5. Sometimes USER_PERMISSION_DENIED right away.

Darshan Pradhan

unread,
Jan 31, 2019, 9:18:37 AM1/31/19
to AdWords API and Google Ads API Forum
Looks like this was because of the 0_7 release yesterday which required the loginCustomerId. I will have to adjust my java client creation accordingly. 

googleadsapi...@google.com

unread,
Jan 31, 2019, 2:51:54 PM1/31/19
to dar...@companionlabs.com, AdWords API and Google Ads API Forum
Hello,

It's been pretty busy around here in the last day, so my apologies for not getting back to you sooner. 

Yesterday the Google Ads API team starting enforcing a a new header that was originally announced in the v0_6 release. If this header is not set you can get USER_PERMISSION_DENIED or other similar errors. The change is in the process of being rolled back since many users were not ready, yet. Please monitor the Google Ads API blog for details on when this change will be released and how to prepare.

Thanks,
Nadine Sundquist, Google Ads API Team
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
    http://googleadsdeveloper.blogspot.com/search/label/adwords_api
    https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
 
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/371e1c17-eae5-45cb-9e0b-2accec740c08%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Darshan Pradhan

unread,
Jan 31, 2019, 3:48:29 PM1/31/19
to AdWords API and Google Ads API Forum
Hi Nadine,
Thanks for getting back to my original question. We have already made the necessary changes to accommodate the new required header in our request so I am curious about when you say "The change is in the process of being rolled back since many users were not ready, yet." and looking at the blog post you referenced, So is the change (of requiring login-customer-id) being reverted until February 11th or the requirement of including the login-customer-id is going away for good? 

googleadsapi...@google.com

unread,
Jan 31, 2019, 4:43:53 PM1/31/19
to dar...@companionlabs.com, AdWords API and Google Ads API Forum
Hello Darshan,

We will be requiring login-customer-id starting February 11th. It is currently not required in our API, but it's fine if you specify it. We rolled it out yesterday, but some API users said they needed more time. So, we are waiting until February 11th to roll it out again. You can already make the change. That's fine. That way you'll be ready on February 11th when we require it.

Cheers,
Nadine, Google Ads API Team
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
    http://googleadsdeveloper.blogspot.com/search/label/adwords_api
    https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

Reply all
Reply to author
Forward
0 new messages