Hello, Google Ads API Team.

We use 'ads API(v1, Java Client)' to collect report data.
However, exceptions occur frequently.
The reason for this exception can not be determined and will work if you 
try again.
I want to know the reason for this exception.
I will be waiting for your answer.

UserCredentials credentials = UserCredentials.newBuilder()
.setClientId("****************************************")
.setClientSecret("*****************************************")
.setRefreshToken("**********************************************")
.build();
GoogleAdsClient googleAdsClient = GoogleAdsClient.newBuilder()
.setCredentials(credentials)
.setDeveloperToken("*******************************************")
.setLoginCustomerId(**********)
.build();

GoogleAdsServiceClient googleAdsServiceClient = 
googleAdsClient.getVersion1().createGoogleAdsServiceClient();

SearchGoogleAdsRequest request = SearchGoogleAdsRequest.newBuilder()
.setCustomerId(customerId)
.setPageSize(7000)
.setQuery(query)
.build();

SearchPagedResponse response = googleAdsServiceClient.search(request);

query : 
SELECT segments.date, 
campaign.id, 
campaign.name, 
ad_group.id, 
ad_group.name, 
ad_group_ad.ad.id,
ad_group_ad.ad.name, 
ad_group_ad.status, 
segments.ad_network_type, 
segments.device, 
metrics.clicks, 
metrics.impressions, 
metrics.cost_micros, 
metrics.conversions, 
metrics.all_conversions, 
metrics.conversions_value, 
metrics.all_conversions_value, 
metrics.average_position, 
metrics.video_views, 
metrics.absolute_top_impression_percentage, 
metrics.top_impression_percentage 
FROM ad_group_ad 
WHERE segments.ad_network_type NOT IN ('SEARCH', 'SEARCH_PARTNERS') 
AND segments.date BETWEEN '2019-06-18' AND '2019-06-18'


-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/a61ae541-d252-49a8-a036-069005a51540%40googlegroups.com.
[WARN ](RequestLogger.java:159) FAILURE REQUEST SUMMARY. Method: 
google.ads.googleads.v1.services.GoogleAdsService/Search, Endpoint: 
googleads.googleapis.com:443, CustomerID: **********, RequestID: 
ywBtLiS6h6SyeGVrc4B-kw, ResponseCode: INTERNAL, Fault: Internal error 
encountered..

-------
MethodName: google.ads.googleads.v1.services.GoogleAdsService/Search
Endpoint: googleads.googleapis.com:443
Headers: {developer-token=REDACTED, login-customer-id=**********, 
x-goog-api-client=gl-java/1.8.0_181 gapic/ gax/1.35.0 grpc/1.16.1}
Body: customer_id: "**********"
query: "SELECT segments.date, campaign.id, campaign.name, ad_group.id, 
ad_group.name, ad_group_ad.ad.id, ad_group_ad.ad.name, ad_group_ad.status, 
segments.ad_network_type, segments.device, metrics.clicks, metrics.impressions, 
metrics.cost_micros, metrics.conversions, metrics.all_conversions, 
metrics.conversions_value, metrics.all_conversions_value, 
metrics.average_position, metrics.video_views, 
metrics.absolute_top_impression_percentage, metrics.top_impression_percentage 
FROM ad_group_ad WHERE segments.ad_network_type NOT IN (\'SEARCH\', 
\'SEARCH_PARTNERS\') AND segments.date BETWEEN \'2019-06-18\' AND 
\'2019-06-18\' "
page_size: 7000


Response
--------
Headers: 
Metadata(content-type=application/grpc,request-id=ywBtLiS6h6SyeGVrc4B-kw,date=Wed,
 19 Jun 2019 07:03:41 GMT,alt-svc=quic=":443"; ma=2592000; v="46,44,43,39")
Body: null
Failure message: null
Status: Status{code=INTERNAL, description=Internal error encountered., 
cause=null}.

ERROR: io.grpc.StatusRuntimeException: INTERNAL: Internal error encountered.
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$4.run(Futures.java:1123)
        at 
com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:435)
        at 
com.google.common.util.concurrent.AbstractFuture.executeListener(AbstractFuture.java:900)
        at 
com.google.common.util.concurrent.AbstractFuture.complete(AbstractFuture.java:811)
        at 
com.google.common.util.concurrent.AbstractFuture.setException(AbstractFuture.java:675)
        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 
com.google.ads.googleads.lib.logging.LoggingInterceptor$1$1.onClose(LoggingInterceptor.java:111)
        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.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
        at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
        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)
                at 
com.google.ads.googleads.v1.services.GoogleAdsServiceClient.search(GoogleAdsServiceClient.java:242)
                at 
com.nsmcorp.dailysynker.worker.GoogleAdsWorker.lambda$9(GoogleAdsWorker.java:371)
                at 
java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
                at 
java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
                at 
java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
                at 
java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
                at 
java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
                at 
java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
                at 
java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
                at 
java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
                at 
java.util.stream.ReduceOps$ReduceTask.doLeaf(ReduceOps.java:747)
                at 
java.util.stream.ReduceOps$ReduceTask.doLeaf(ReduceOps.java:721)
                at java.util.stream.AbstractTask.compute(AbstractTask.java:316)
                at 
java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:731)
                at 
java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
                at 
java.util.concurrent.ForkJoinPool$WorkQueue.execLocalTasks(ForkJoinPool.java:1040)
                at 
java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1058)
                at 
java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
                at 
java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Caused by: io.grpc.StatusRuntimeException: INTERNAL: Internal error encountered.
        at io.grpc.Status.asRuntimeException(Status.java:526)
        ... 27 common frames omitted

Reply via email to