googleads / google-ads-java

Google Ads API Client Library for Java
Apache License 2.0
171 stars 177 forks source link

Failed to get response from api of v5/v6 library #394

Closed anil-patel-pcln closed 3 years ago

anil-patel-pcln commented 3 years ago

Client Library version:- 10.1.0

Java version:- openjdk version "1.8.0_252" OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_252-b09) OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.252-b09, mixed mode)

Linux:- Centos7

Below is the code that I am using to get ad_group id for the specific customer.

package com.priceline.dls.GoogleHotelAds;

import com.google.ads.googleads.lib.GoogleAdsClient;
import com.google.ads.googleads.v6.common.KeywordInfo;
import com.google.ads.googleads.v6.errors.GoogleAdsError;
import com.google.ads.googleads.v6.errors.GoogleAdsException;
import com.google.ads.googleads.v6.resources.AdGroup;
import com.google.ads.googleads.v6.enums.SummaryRowSettingEnum;
import com.google.ads.googleads.v6.enums.SummaryRowSettingEnum.SummaryRowSetting;
import com.google.ads.googleads.v6.resources.AdGroupCriterion;
import com.google.ads.googleads.v6.services.GoogleAdsRow;
import com.google.ads.googleads.v6.services.GoogleAdsServiceClient;
import com.google.ads.googleads.v6.services.GoogleAdsServiceClient.SearchPagedResponse;
import com.google.auth.oauth2.UserCredentials;
import com.google.ads.googleads.v6.services.SearchGoogleAdsRequest;
import java.io.FileNotFoundException;
import java.io.IOException;
import javax.annotation.Nullable;

public class GoogleHotelAdsWrapperTest {
     private static final int PAGE_SIZE = 1_000;
        public static void main(String[] args) throws IOException
        {

        GoogleAdsClient googleAdsClient = null;

        UserCredentials credentials =
                UserCredentials.newBuilder()
                    .setClientId("xxxx")
                    .setClientSecret("xxxx")
                    .setRefreshToken("xxxxx")
                    .build();
     googleAdsClient = GoogleAdsClient.newBuilder()
              .setCredentials(credentials)
              .setDeveloperToken("xxxx")
              .setLoginCustomerId(xxxx)
              .build();
        try {
            Long customerId=xxxx;
            Long adGroupId=xxxx;
            new GoogleHotelAdsWrapperTest().runExample(googleAdsClient, customerId, adGroupId);
          } catch (GoogleAdsException gae) {
            // GoogleAdsException is the base class for most exceptions thrown by an API request.
            // Instances of this exception have a message and a GoogleAdsFailure that contains a
            // collection of GoogleAdsErrors that indicate the underlying causes of the
            // GoogleAdsException.
            System.err.printf(
                "Request ID %s failed due to GoogleAdsException. Underlying errors:%n",
                gae.getRequestId());
            int i = 0;
            for (GoogleAdsError googleAdsError : gae.getGoogleAdsFailure().getErrorsList()) {
              System.err.printf("  Error %d: %s%n", i++, googleAdsError);
            }
            System.exit(1);
          }
        }
        private void runExample(
                  GoogleAdsClient googleAdsClient, long customerId, Long adGroupId) {
                try (GoogleAdsServiceClient googleAdsServiceClient = googleAdsClient.getLatestVersion().createGoogleAdsServiceClient()) {
                  String searchQuery = "select ad_group.id from ad_group where ad_group.status = ENABLED and ad_group.type = HOTEL_ADS AND " + "campaign.status != 'REMOVED' ";
//                if (adGroupId != null) {
//                  searchQuery += String.format("AND ad_group.id = %d", adGroupId);
//                }

                  // Creates a request that will retrieve all keywords using pages of the specified page size.
                  SearchGoogleAdsRequest request =
                      SearchGoogleAdsRequest.newBuilder()
                          .setCustomerId("3637526548")
                          .setPageSize(PAGE_SIZE)
                          .setQuery(searchQuery)
//                        .setReturnSummaryRow(true)
                         .setSummaryRowSetting(SummaryRowSetting.SUMMARY_ROW_WITH_RESULTS)
//                       .setReturnTotalResultsCount(true)
//                        .setReturnTotalResultsCount(true)
                          .build();
                  // Issues the search request.
                  SearchPagedResponse searchPagedResponse = googleAdsServiceClient.search(request);
                  // Iterates over all rows in all pages and prints the requested field values for the keyword
                  // in each row.
                  for (GoogleAdsRow googleAdsRow : searchPagedResponse.iterateAll()) {
                    AdGroup adGroup = googleAdsRow.getAdGroup();
                    System.out.println("Keyword with text group with ID "+adGroup.getId());
                  }
                }
              }
}

below is a query that I have used in the code:- select ad_group.id from ad_group where ad_group.status = ENABLED and ad_group.type = HOTEL_ADS AND " + "campaign.status != 'REMOVED' "

Please find below logs for one account with request and response in logs.

ERROR StatusLogger No Log4j 2 configuration file found. Using default configuration (logging only errors to the console), or user programmatically provided configurations. Set system property 'log4j2.debug' to show Log4j 2 internal initialization logging. See https://logging.apache.org/log4j/2.x/manual/configuration.html for instructions on how to configure Log4j 2

17:18:53.296 [main] DEBUG io.grpc.netty.shaded.io.netty.util.internal.logging.InternalLoggerFactory - Using SLF4J as the default logging framework

17:18:53.300 [main] DEBUG io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent - Platform: MacOS

17:18:53.303 [main] DEBUG io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent0 - -Dio.netty.noUnsafe: false

17:18:53.303 [main] DEBUG io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent0 - Java version: 8

17:18:53.304 [main] DEBUG io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent0 - sun.misc.Unsafe.theUnsafe: available

17:18:53.304 [main] DEBUG io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent0 - sun.misc.Unsafe.copyMemory: available

17:18:53.304 [main] DEBUG io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent0 - java.nio.Buffer.address: available

17:18:53.305 [main] DEBUG io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent0 - direct buffer constructor: available

17:18:53.305 [main] DEBUG io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent0 - java.nio.Bits.unaligned: available, true

17:18:53.305 [main] DEBUG io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent0 - jdk.internal.misc.Unsafe.allocateUninitializedArray(int): unavailable prior to Java9

17:18:53.305 [main] DEBUG io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent0 - java.nio.DirectByteBuffer.<init>(long, int): available

17:18:53.305 [main] DEBUG io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent - sun.misc.Unsafe: available

17:18:53.306 [main] DEBUG io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent - -Dio.netty.tmpdir: /var/folders/_y/k9v554k13vx3mldby79ln9c00000gq/T (java.io.tmpdir)

17:18:53.306 [main] DEBUG io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent - -Dio.netty.bitMode: 64 (sun.arch.data.model)

17:18:53.307 [main] DEBUG io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent - -Dio.netty.maxDirectMemory: 3817865216 bytes

17:18:53.307 [main] DEBUG io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent - -Dio.netty.uninitializedArrayAllocationThreshold: -1

17:18:53.308 [main] DEBUG io.grpc.netty.shaded.io.netty.util.internal.CleanerJava6 - java.nio.ByteBuffer.cleaner(): available

17:18:53.308 [main] DEBUG io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent - -Dio.netty.noPreferDirect: false

17:18:53.361 [main] DEBUG io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader - -Dio.netty.native.workdir: /var/folders/_y/k9v554k13vx3mldby79ln9c00000gq/T (io.netty.tmpdir)

17:18:53.361 [main] DEBUG io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader - -Dio.netty.native.deleteLibAfterLoading: true

17:18:53.361 [main] DEBUG io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader - -Dio.netty.native.tryPatchShadedId: true

17:18:53.362 [main] DEBUG io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader - Unable to load the library 'io_grpc_netty_shaded_netty_tcnative_osx_x86_64', trying other loading mechanism.

java.lang.UnsatisfiedLinkError: no io_grpc_netty_shaded_netty_tcnative_osx_x86_64 in java.library.path

    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1860) ~[?:1.8.0_252]

    at java.lang.Runtime.loadLibrary0(Runtime.java:870) ~[?:1.8.0_252]

    at java.lang.System.loadLibrary(System.java:1124) ~[?:1.8.0_252]

    at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:38) ~[grpc-netty-shaded-1.21.0.jar:1.21.0]

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_252]

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_252]

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_252]

    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_252]

    at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader$1.run(NativeLibraryLoader.java:369) ~[grpc-netty-shaded-1.21.0.jar:1.21.0]

    at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_252]

    at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.loadLibraryByHelper(NativeLibraryLoader.java:361) ~[grpc-netty-shaded-1.21.0.jar:1.21.0]

    at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:339) [grpc-netty-shaded-1.21.0.jar:1.21.0]

    at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:136) [grpc-netty-shaded-1.21.0.jar:1.21.0]

    at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.loadFirstAvailable(NativeLibraryLoader.java:96) [grpc-netty-shaded-1.21.0.jar:1.21.0]

    at io.grpc.netty.shaded.io.netty.handler.ssl.OpenSsl.loadTcNative(OpenSsl.java:526) [grpc-netty-shaded-1.21.0.jar:1.21.0]

    at io.grpc.netty.shaded.io.netty.handler.ssl.OpenSsl.<clinit>(OpenSsl.java:93) [grpc-netty-shaded-1.21.0.jar:1.21.0]

    at io.grpc.netty.shaded.io.grpc.netty.GrpcSslContexts.defaultSslProvider(GrpcSslContexts.java:244) [grpc-netty-shaded-1.21.0.jar:1.21.0]

    at io.grpc.netty.shaded.io.grpc.netty.GrpcSslContexts.configure(GrpcSslContexts.java:171) [grpc-netty-shaded-1.21.0.jar:1.21.0]

    at io.grpc.netty.shaded.io.grpc.netty.GrpcSslContexts.forClient(GrpcSslContexts.java:120) [grpc-netty-shaded-1.21.0.jar:1.21.0]

    at io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder.buildTransportFactory(NettyChannelBuilder.java:436) [grpc-netty-shaded-1.21.0.jar:1.21.0]

    at io.grpc.internal.AbstractManagedChannelImplBuilder.build(AbstractManagedChannelImplBuilder.java:509) [grpc-core-1.21.0.jar:1.21.0]

    at com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.createSingleChannel(InstantiatingGrpcChannelProvider.java:223) [gax-grpc-1.45.0.jar:1.45.0]

    at com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.createChannel(InstantiatingGrpcChannelProvider.java:164) [gax-grpc-1.45.0.jar:1.45.0]

    at com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.getTransportChannel(InstantiatingGrpcChannelProvider.java:156) [gax-grpc-1.45.0.jar:1.45.0]

    at com.google.api.gax.rpc.ClientContext.create(ClientContext.java:157) [gax-1.45.0.jar:1.45.0]

    at com.google.ads.googleads.v6.services.stub.GrpcGoogleAdsServiceStub.create(GrpcGoogleAdsServiceStub.java:97) [google-ads-10.1.0.jar:?]

    at com.google.ads.googleads.v6.services.stub.GoogleAdsServiceStubSettings.createStub(GoogleAdsServiceStubSettings.java:186) [google-ads-10.1.0.jar:?]

    at com.google.ads.googleads.v6.services.GoogleAdsServiceClient.<init>(GoogleAdsServiceClient.java:130) [google-ads-10.1.0.jar:?]

    at com.google.ads.googleads.v6.services.GoogleAdsServiceClient.create(GoogleAdsServiceClient.java:111) [google-ads-10.1.0.jar:?]

    at com.google.ads.googleads.lib.catalog.GeneratedCatalog$V6Client.createGoogleAdsServiceClient(GeneratedCatalog.java:6370) [google-ads-10.1.0.jar:?]

    at com.priceline.dls.GoogleHotelAds.GoogleHotelAdsWrapperTest.runExample(GoogleHotelAdsWrapperTest.java:60) [bin/:?]

    at com.priceline.dls.GoogleHotelAds.GoogleHotelAdsWrapperTest.main(GoogleHotelAdsWrapperTest.java:42) [bin/:?]

17:18:53.369 [main] DEBUG io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader - io_grpc_netty_shaded_netty_tcnative_osx_x86_64 cannot be loaded from java.libary.path, now trying export to -Dio.netty.native.workdir: /var/folders/_y/k9v554k13vx3mldby79ln9c00000gq/T

java.lang.UnsatisfiedLinkError: no io_grpc_netty_shaded_netty_tcnative_osx_x86_64 in java.library.path

    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1860) ~[?:1.8.0_252]

    at java.lang.Runtime.loadLibrary0(Runtime.java:870) ~[?:1.8.0_252]

    at java.lang.System.loadLibrary(System.java:1124) ~[?:1.8.0_252]

    at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:38) ~[grpc-netty-shaded-1.21.0.jar:1.21.0]

    at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:349) ~[grpc-netty-shaded-1.21.0.jar:1.21.0]

    at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:136) [grpc-netty-shaded-1.21.0.jar:1.21.0]

    at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.loadFirstAvailable(NativeLibraryLoader.java:96) [grpc-netty-shaded-1.21.0.jar:1.21.0]

    at io.grpc.netty.shaded.io.netty.handler.ssl.OpenSsl.loadTcNative(OpenSsl.java:526) [grpc-netty-shaded-1.21.0.jar:1.21.0]

    at io.grpc.netty.shaded.io.netty.handler.ssl.OpenSsl.<clinit>(OpenSsl.java:93) [grpc-netty-shaded-1.21.0.jar:1.21.0]

    at io.grpc.netty.shaded.io.grpc.netty.GrpcSslContexts.defaultSslProvider(GrpcSslContexts.java:244) [grpc-netty-shaded-1.21.0.jar:1.21.0]

    at io.grpc.netty.shaded.io.grpc.netty.GrpcSslContexts.configure(GrpcSslContexts.java:171) [grpc-netty-shaded-1.21.0.jar:1.21.0]

    at io.grpc.netty.shaded.io.grpc.netty.GrpcSslContexts.forClient(GrpcSslContexts.java:120) [grpc-netty-shaded-1.21.0.jar:1.21.0]

    at io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder.buildTransportFactory(NettyChannelBuilder.java:436) [grpc-netty-shaded-1.21.0.jar:1.21.0]

    at io.grpc.internal.AbstractManagedChannelImplBuilder.build(AbstractManagedChannelImplBuilder.java:509) [grpc-core-1.21.0.jar:1.21.0]

    at com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.createSingleChannel(InstantiatingGrpcChannelProvider.java:223) [gax-grpc-1.45.0.jar:1.45.0]

    at com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.createChannel(InstantiatingGrpcChannelProvider.java:164) [gax-grpc-1.45.0.jar:1.45.0]

    at com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.getTransportChannel(InstantiatingGrpcChannelProvider.java:156) [gax-grpc-1.45.0.jar:1.45.0]

    at com.google.api.gax.rpc.ClientContext.create(ClientContext.java:157) [gax-1.45.0.jar:1.45.0]

    at com.google.ads.googleads.v6.services.stub.GrpcGoogleAdsServiceStub.create(GrpcGoogleAdsServiceStub.java:97) [google-ads-10.1.0.jar:?]

    at com.google.ads.googleads.v6.services.stub.GoogleAdsServiceStubSettings.createStub(GoogleAdsServiceStubSettings.java:186) [google-ads-10.1.0.jar:?]

    at com.google.ads.googleads.v6.services.GoogleAdsServiceClient.<init>(GoogleAdsServiceClient.java:130) [google-ads-10.1.0.jar:?]

    at com.google.ads.googleads.v6.services.GoogleAdsServiceClient.create(GoogleAdsServiceClient.java:111) [google-ads-10.1.0.jar:?]

    at com.google.ads.googleads.lib.catalog.GeneratedCatalog$V6Client.createGoogleAdsServiceClient(GeneratedCatalog.java:6370) [google-ads-10.1.0.jar:?]

    at com.priceline.dls.GoogleHotelAds.GoogleHotelAdsWrapperTest.runExample(GoogleHotelAdsWrapperTest.java:60) [bin/:?]

    at com.priceline.dls.GoogleHotelAds.GoogleHotelAdsWrapperTest.main(GoogleHotelAdsWrapperTest.java:42) [bin/:?]

    Suppressed: java.lang.UnsatisfiedLinkError: no io_grpc_netty_shaded_netty_tcnative_osx_x86_64 in java.library.path

        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1860) ~[?:1.8.0_252]

        at java.lang.Runtime.loadLibrary0(Runtime.java:870) ~[?:1.8.0_252]

        at java.lang.System.loadLibrary(System.java:1124) ~[?:1.8.0_252]

        at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:38) ~[grpc-netty-shaded-1.21.0.jar:1.21.0]

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_252]

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_252]

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_252]

        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_252]

        at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader$1.run(NativeLibraryLoader.java:369) ~[grpc-netty-shaded-1.21.0.jar:1.21.0]

        at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_252]

        at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.loadLibraryByHelper(NativeLibraryLoader.java:361) ~[grpc-netty-shaded-1.21.0.jar:1.21.0]

        at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:339) ~[grpc-netty-shaded-1.21.0.jar:1.21.0]

        at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:136) [grpc-netty-shaded-1.21.0.jar:1.21.0]

        at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.loadFirstAvailable(NativeLibraryLoader.java:96) [grpc-netty-shaded-1.21.0.jar:1.21.0]

        at io.grpc.netty.shaded.io.netty.handler.ssl.OpenSsl.loadTcNative(OpenSsl.java:526) [grpc-netty-shaded-1.21.0.jar:1.21.0]

        at io.grpc.netty.shaded.io.netty.handler.ssl.OpenSsl.<clinit>(OpenSsl.java:93) [grpc-netty-shaded-1.21.0.jar:1.21.0]

        at io.grpc.netty.shaded.io.grpc.netty.GrpcSslContexts.defaultSslProvider(GrpcSslContexts.java:244) [grpc-netty-shaded-1.21.0.jar:1.21.0]

        at io.grpc.netty.shaded.io.grpc.netty.GrpcSslContexts.configure(GrpcSslContexts.java:171) [grpc-netty-shaded-1.21.0.jar:1.21.0]

        at io.grpc.netty.shaded.io.grpc.netty.GrpcSslContexts.forClient(GrpcSslContexts.java:120) [grpc-netty-shaded-1.21.0.jar:1.21.0]

        at io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder.buildTransportFactory(NettyChannelBuilder.java:436) [grpc-netty-shaded-1.21.0.jar:1.21.0]

        at io.grpc.internal.AbstractManagedChannelImplBuilder.build(AbstractManagedChannelImplBuilder.java:509) [grpc-core-1.21.0.jar:1.21.0]

        at com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.createSingleChannel(InstantiatingGrpcChannelProvider.java:223) [gax-grpc-1.45.0.jar:1.45.0]

        at com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.createChannel(InstantiatingGrpcChannelProvider.java:164) [gax-grpc-1.45.0.jar:1.45.0]

        at com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.getTransportChannel(InstantiatingGrpcChannelProvider.java:156) [gax-grpc-1.45.0.jar:1.45.0]

        at com.google.api.gax.rpc.ClientContext.create(ClientContext.java:157) [gax-1.45.0.jar:1.45.0]

        at com.google.ads.googleads.v6.services.stub.GrpcGoogleAdsServiceStub.create(GrpcGoogleAdsServiceStub.java:97) [google-ads-10.1.0.jar:?]

        at com.google.ads.googleads.v6.services.stub.GoogleAdsServiceStubSettings.createStub(GoogleAdsServiceStubSettings.java:186) [google-ads-10.1.0.jar:?]

        at com.google.ads.googleads.v6.services.GoogleAdsServiceClient.<init>(GoogleAdsServiceClient.java:130) [google-ads-10.1.0.jar:?]

        at com.google.ads.googleads.v6.services.GoogleAdsServiceClient.create(GoogleAdsServiceClient.java:111) [google-ads-10.1.0.jar:?]

        at com.google.ads.googleads.lib.catalog.GeneratedCatalog$V6Client.createGoogleAdsServiceClient(GeneratedCatalog.java:6370) [google-ads-10.1.0.jar:?]

        at com.priceline.dls.GoogleHotelAds.GoogleHotelAdsWrapperTest.runExample(GoogleHotelAdsWrapperTest.java:60) [bin/:?]

        at com.priceline.dls.GoogleHotelAds.GoogleHotelAdsWrapperTest.main(GoogleHotelAdsWrapperTest.java:42) [bin/:?]

17:18:53.409 [main] DEBUG io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader - Was not able to find the ID of the shaded native library io_grpc_netty_shaded_netty_tcnative_osx_x86_64, can't adjust it.

17:18:53.409 [main] DEBUG io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader - Found the ID of the shaded native library io_grpc_netty_shaded_netty_tcnative_osx_x86_64. Replacing ID part netty_tcnative with HZfyZd8o7rg9If

17:18:53.669 [main] DEBUG io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader - Successfully loaded the library /var/folders/_y/k9v554k13vx3mldby79ln9c00000gq/T/libio_grpc_netty_shaded_netty_tcnative_osx_x86_648915702871942920565.dylib

17:18:53.669 [main] DEBUG io.grpc.netty.shaded.io.netty.handler.ssl.OpenSsl - Initialize netty-tcnative using engine: 'default'

17:18:53.670 [main] DEBUG io.grpc.netty.shaded.io.netty.handler.ssl.OpenSsl - netty-tcnative using native library: BoringSSL

17:18:53.687 [main] DEBUG io.grpc.netty.shaded.io.netty.util.internal.InternalThreadLocalMap - -Dio.netty.threadLocalMap.stringBuilder.initialSize: 1024

17:18:53.687 [main] DEBUG io.grpc.netty.shaded.io.netty.util.internal.InternalThreadLocalMap - -Dio.netty.threadLocalMap.stringBuilder.maxSize: 4096

17:18:53.697 [main] DEBUG io.grpc.netty.shaded.io.netty.util.ResourceLeakDetector - -Dio.grpc.netty.shaded.io.netty.leakDetection.level: simple

17:18:53.697 [main] DEBUG io.grpc.netty.shaded.io.netty.util.ResourceLeakDetector - -Dio.grpc.netty.shaded.io.netty.leakDetection.targetRecords: 4

17:18:53.698 [main] DEBUG io.grpc.netty.shaded.io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.numHeapArenas: 24

17:18:53.698 [main] DEBUG io.grpc.netty.shaded.io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.numDirectArenas: 24

17:18:53.698 [main] DEBUG io.grpc.netty.shaded.io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.pageSize: 8192

17:18:53.698 [main] DEBUG io.grpc.netty.shaded.io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.maxOrder: 11

17:18:53.698 [main] DEBUG io.grpc.netty.shaded.io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.chunkSize: 16777216

17:18:53.698 [main] DEBUG io.grpc.netty.shaded.io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.tinyCacheSize: 512

17:18:53.698 [main] DEBUG io.grpc.netty.shaded.io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.smallCacheSize: 256

17:18:53.698 [main] DEBUG io.grpc.netty.shaded.io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.normalCacheSize: 64

17:18:53.698 [main] DEBUG io.grpc.netty.shaded.io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.maxCachedBufferCapacity: 32768

17:18:53.698 [main] DEBUG io.grpc.netty.shaded.io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.cacheTrimInterval: 8192

17:18:53.698 [main] DEBUG io.grpc.netty.shaded.io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.useCacheForAllThreads: true

17:18:53.698 [main] DEBUG io.grpc.netty.shaded.io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.maxCachedByteBuffersPerChunk: 1023

17:18:53.706 [main] DEBUG io.grpc.netty.shaded.io.netty.buffer.ByteBufUtil - -Dio.netty.allocator.type: pooled

17:18:53.706 [main] DEBUG io.grpc.netty.shaded.io.netty.buffer.ByteBufUtil - -Dio.netty.threadLocalDirectBufferSize: 0

17:18:53.706 [main] DEBUG io.grpc.netty.shaded.io.netty.buffer.ByteBufUtil - -Dio.netty.maxThreadLocalCharBufferSize: 16384

17:18:53.716 [main] DEBUG io.grpc.netty.shaded.io.netty.util.ResourceLeakDetectorFactory - Loaded default ResourceLeakDetector: io.grpc.netty.shaded.io.netty.util.ResourceLeakDetector@729d991e

17:18:53.725 [main] DEBUG io.grpc.netty.shaded.io.netty.buffer.AbstractByteBuf - -Dio.grpc.netty.shaded.io.netty.buffer.checkAccessible: true

17:18:53.725 [main] DEBUG io.grpc.netty.shaded.io.netty.buffer.AbstractByteBuf - -Dio.grpc.netty.shaded.io.netty.buffer.checkBounds: true

17:18:53.725 [main] DEBUG io.grpc.netty.shaded.io.netty.util.ResourceLeakDetectorFactory - Loaded default ResourceLeakDetector: io.grpc.netty.shaded.io.netty.util.ResourceLeakDetector@53aac487

17:18:53.729 [main] DEBUG io.grpc.netty.shaded.io.netty.util.Recycler - -Dio.netty.recycler.maxCapacityPerThread: 4096

17:18:53.729 [main] DEBUG io.grpc.netty.shaded.io.netty.util.Recycler - -Dio.netty.recycler.maxSharedCapacityFactor: 2

17:18:53.729 [main] DEBUG io.grpc.netty.shaded.io.netty.util.Recycler - -Dio.netty.recycler.linkCapacity: 16

17:18:53.729 [main] DEBUG io.grpc.netty.shaded.io.netty.util.Recycler - -Dio.netty.recycler.ratio: 8

17:18:53.740 [main] DEBUG io.grpc.netty.shaded.io.netty.handler.ssl.CipherSuiteConverter - Cipher suite mapping: TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 => ECDHE-ECDSA-AES128-GCM-SHA256

17:18:53.740 [main] DEBUG io.grpc.netty.shaded.io.netty.handler.ssl.CipherSuiteConverter - Cipher suite mapping: SSL_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 => ECDHE-ECDSA-AES128-GCM-SHA256

17:18:53.740 [main] DEBUG io.grpc.netty.shaded.io.netty.handler.ssl.CipherSuiteConverter - Cipher suite mapping: TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 => ECDHE-RSA-AES128-GCM-SHA256

17:18:53.740 [main] DEBUG io.grpc.netty.shaded.io.netty.handler.ssl.CipherSuiteConverter - Cipher suite mapping: SSL_ECDHE_RSA_WITH_AES_128_GCM_SHA256 => ECDHE-RSA-AES128-GCM-SHA256

17:18:53.740 [main] DEBUG io.grpc.netty.shaded.io.netty.handler.ssl.CipherSuiteConverter - Cipher suite mapping: TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 => ECDHE-ECDSA-AES256-GCM-SHA384

17:18:53.740 [main] DEBUG io.grpc.netty.shaded.io.netty.handler.ssl.CipherSuiteConverter - Cipher suite mapping: SSL_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 => ECDHE-ECDSA-AES256-GCM-SHA384

17:18:53.741 [main] DEBUG io.grpc.netty.shaded.io.netty.handler.ssl.CipherSuiteConverter - Cipher suite mapping: TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 => ECDHE-RSA-AES256-GCM-SHA384

17:18:53.741 [main] DEBUG io.grpc.netty.shaded.io.netty.handler.ssl.CipherSuiteConverter - Cipher suite mapping: SSL_ECDHE_RSA_WITH_AES_256_GCM_SHA384 => ECDHE-RSA-AES256-GCM-SHA384

17:18:53.741 [main] DEBUG io.grpc.netty.shaded.io.netty.handler.ssl.CipherSuiteConverter - Cipher suite mapping: TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 => ECDHE-ECDSA-CHACHA20-POLY1305

17:18:53.741 [main] DEBUG io.grpc.netty.shaded.io.netty.handler.ssl.CipherSuiteConverter - Cipher suite mapping: SSL_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 => ECDHE-ECDSA-CHACHA20-POLY1305

17:18:53.741 [main] DEBUG io.grpc.netty.shaded.io.netty.handler.ssl.CipherSuiteConverter - Cipher suite mapping: TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 => ECDHE-RSA-CHACHA20-POLY1305

17:18:53.741 [main] DEBUG io.grpc.netty.shaded.io.netty.handler.ssl.CipherSuiteConverter - Cipher suite mapping: SSL_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 => ECDHE-RSA-CHACHA20-POLY1305

17:18:53.741 [main] DEBUG io.grpc.netty.shaded.io.netty.handler.ssl.CipherSuiteConverter - Cipher suite mapping: TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256 => ECDHE-PSK-CHACHA20-POLY1305

17:18:53.741 [main] DEBUG io.grpc.netty.shaded.io.netty.handler.ssl.CipherSuiteConverter - Cipher suite mapping: SSL_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256 => ECDHE-PSK-CHACHA20-POLY1305

17:18:53.741 [main] DEBUG io.grpc.netty.shaded.io.netty.handler.ssl.CipherSuiteConverter - Cipher suite mapping: TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA => ECDHE-ECDSA-AES128-SHA

17:18:53.741 [main] DEBUG io.grpc.netty.shaded.io.netty.handler.ssl.CipherSuiteConverter - Cipher suite mapping: SSL_ECDHE_ECDSA_WITH_AES_128_CBC_SHA => ECDHE-ECDSA-AES128-SHA

17:18:53.741 [main] DEBUG io.grpc.netty.shaded.io.netty.handler.ssl.CipherSuiteConverter - Cipher suite mapping: TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA => ECDHE-RSA-AES128-SHA

17:18:53.741 [main] DEBUG io.grpc.netty.shaded.io.netty.handler.ssl.CipherSuiteConverter - Cipher suite mapping: SSL_ECDHE_RSA_WITH_AES_128_CBC_SHA => ECDHE-RSA-AES128-SHA

17:18:53.741 [main] DEBUG io.grpc.netty.shaded.io.netty.handler.ssl.CipherSuiteConverter - Cipher suite mapping: TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA => ECDHE-PSK-AES128-CBC-SHA

17:18:53.741 [main] DEBUG io.grpc.netty.shaded.io.netty.handler.ssl.CipherSuiteConverter - Cipher suite mapping: SSL_ECDHE_PSK_WITH_AES_128_CBC_SHA => ECDHE-PSK-AES128-CBC-SHA

17:18:53.741 [main] DEBUG io.grpc.netty.shaded.io.netty.handler.ssl.CipherSuiteConverter - Cipher suite mapping: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA => ECDHE-ECDSA-AES256-SHA

17:18:53.742 [main] DEBUG io.grpc.netty.shaded.io.netty.handler.ssl.CipherSuiteConverter - Cipher suite mapping: SSL_ECDHE_ECDSA_WITH_AES_256_CBC_SHA => ECDHE-ECDSA-AES256-SHA

17:18:53.742 [main] DEBUG io.grpc.netty.shaded.io.netty.handler.ssl.CipherSuiteConverter - Cipher suite mapping: TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA => ECDHE-RSA-AES256-SHA

17:18:53.742 [main] DEBUG io.grpc.netty.shaded.io.netty.handler.ssl.CipherSuiteConverter - Cipher suite mapping: SSL_ECDHE_RSA_WITH_AES_256_CBC_SHA => ECDHE-RSA-AES256-SHA

17:18:53.742 [main] DEBUG io.grpc.netty.shaded.io.netty.handler.ssl.CipherSuiteConverter - Cipher suite mapping: TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA => ECDHE-PSK-AES256-CBC-SHA

17:18:53.742 [main] DEBUG io.grpc.netty.shaded.io.netty.handler.ssl.CipherSuiteConverter - Cipher suite mapping: SSL_ECDHE_PSK_WITH_AES_256_CBC_SHA => ECDHE-PSK-AES256-CBC-SHA

17:18:53.742 [main] DEBUG io.grpc.netty.shaded.io.netty.handler.ssl.CipherSuiteConverter - Cipher suite mapping: TLS_RSA_WITH_AES_128_GCM_SHA256 => AES128-GCM-SHA256

17:18:53.742 [main] DEBUG io.grpc.netty.shaded.io.netty.handler.ssl.CipherSuiteConverter - Cipher suite mapping: SSL_RSA_WITH_AES_128_GCM_SHA256 => AES128-GCM-SHA256

17:18:53.742 [main] DEBUG io.grpc.netty.shaded.io.netty.handler.ssl.CipherSuiteConverter - Cipher suite mapping: TLS_RSA_WITH_AES_256_GCM_SHA384 => AES256-GCM-SHA384

17:18:53.742 [main] DEBUG io.grpc.netty.shaded.io.netty.handler.ssl.CipherSuiteConverter - Cipher suite mapping: SSL_RSA_WITH_AES_256_GCM_SHA384 => AES256-GCM-SHA384

17:18:53.742 [main] DEBUG io.grpc.netty.shaded.io.netty.handler.ssl.CipherSuiteConverter - Cipher suite mapping: TLS_RSA_WITH_AES_128_CBC_SHA => AES128-SHA

17:18:53.742 [main] DEBUG io.grpc.netty.shaded.io.netty.handler.ssl.CipherSuiteConverter - Cipher suite mapping: SSL_RSA_WITH_AES_128_CBC_SHA => AES128-SHA

17:18:53.742 [main] DEBUG io.grpc.netty.shaded.io.netty.handler.ssl.CipherSuiteConverter - Cipher suite mapping: TLS_PSK_WITH_AES_128_CBC_SHA => PSK-AES128-CBC-SHA

17:18:53.742 [main] DEBUG io.grpc.netty.shaded.io.netty.handler.ssl.CipherSuiteConverter - Cipher suite mapping: SSL_PSK_WITH_AES_128_CBC_SHA => PSK-AES128-CBC-SHA

17:18:53.742 [main] DEBUG io.grpc.netty.shaded.io.netty.handler.ssl.CipherSuiteConverter - Cipher suite mapping: TLS_RSA_WITH_AES_256_CBC_SHA => AES256-SHA

17:18:53.742 [main] DEBUG io.grpc.netty.shaded.io.netty.handler.ssl.CipherSuiteConverter - Cipher suite mapping: SSL_RSA_WITH_AES_256_CBC_SHA => AES256-SHA

17:18:53.743 [main] DEBUG io.grpc.netty.shaded.io.netty.handler.ssl.CipherSuiteConverter - Cipher suite mapping: TLS_PSK_WITH_AES_256_CBC_SHA => PSK-AES256-CBC-SHA

17:18:53.743 [main] DEBUG io.grpc.netty.shaded.io.netty.handler.ssl.CipherSuiteConverter - Cipher suite mapping: SSL_PSK_WITH_AES_256_CBC_SHA => PSK-AES256-CBC-SHA

17:18:53.743 [main] DEBUG io.grpc.netty.shaded.io.netty.handler.ssl.CipherSuiteConverter - Cipher suite mapping: TLS_RSA_WITH_3DES_EDE_CBC_SHA => DES-CBC3-SHA

17:18:53.743 [main] DEBUG io.grpc.netty.shaded.io.netty.handler.ssl.CipherSuiteConverter - Cipher suite mapping: SSL_RSA_WITH_3DES_EDE_CBC_SHA => DES-CBC3-SHA

17:18:53.743 [main] DEBUG io.grpc.netty.shaded.io.netty.handler.ssl.OpenSsl - Supported protocols (OpenSSL): [SSLv2Hello, TLSv1, TLSv1.1, TLSv1.2, TLSv1.3] 

17:18:53.743 [main] DEBUG io.grpc.netty.shaded.io.netty.handler.ssl.OpenSsl - Default cipher suites (OpenSSL): [TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_AES_128_GCM_SHA256, TLS_AES_256_GCM_SHA384]

17:18:53.817 [main] DEBUG io.grpc.netty.shaded.io.netty.channel.MultithreadEventLoopGroup - -Dio.netty.eventLoopThreads: 24

17:18:53.828 [main] DEBUG io.grpc.netty.shaded.io.netty.channel.nio.NioEventLoop - -Dio.netty.noKeySetOptimization: false

17:18:53.828 [main] DEBUG io.grpc.netty.shaded.io.netty.channel.nio.NioEventLoop - -Dio.netty.selectorAutoRebuildThreshold: 512

17:18:53.832 [main] DEBUG io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent - org.jctools-core.MpscChunkedArrayQueue: available

17:18:57.667 [grpc-default-executor-0] DEBUG io.grpc.netty.shaded.io.netty.channel.DefaultChannelId - -Dio.netty.processId: 56481 (auto-detected)

17:18:57.670 [grpc-default-executor-0] DEBUG io.grpc.netty.shaded.io.netty.util.NetUtil - -Djava.net.preferIPv4Stack: false

17:18:57.670 [grpc-default-executor-0] DEBUG io.grpc.netty.shaded.io.netty.util.NetUtil - -Djava.net.preferIPv6Addresses: false

17:18:57.676 [grpc-default-executor-0] DEBUG io.grpc.netty.shaded.io.netty.util.NetUtil - Loopback interface: lo0 (lo0, 0:0:0:0:0:0:0:1%lo0)

17:18:57.676 [grpc-default-executor-0] DEBUG io.grpc.netty.shaded.io.netty.util.NetUtil - Failed to get SOMAXCONN from sysctl and file /proc/sys/net/core/somaxconn. Default: 128

17:18:57.678 [grpc-default-executor-0] DEBUG io.grpc.netty.shaded.io.netty.channel.DefaultChannelId - -Dio.netty.machineId: ac:de:48:ff:fe:00:11:22 (auto-detected)

17:18:58.195 [grpc-nio-worker-ELG-1-3] DEBUG io.grpc.netty.shaded.io.netty.util.ResourceLeakDetectorFactory - Loaded default ResourceLeakDetector: io.grpc.netty.shaded.io.netty.util.ResourceLeakDetector@5e64e47

17:18:59.317 [grpc-nio-worker-ELG-1-3] DEBUG io.grpc.netty.shaded.io.netty.handler.ssl.SslHandler - [id: 0x74166695, L:/10.2.115.231:57124 - R:googleads.googleapis.com/172.217.167.170:443] HANDSHAKEN: TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256

17:18:59.321 [grpc-nio-worker-ELG-1-3] DEBUG io.grpc.netty.shaded.io.grpc.netty.NettyClientHandler - [id: 0x74166695, L:/10.2.115.231:57124 - R:googleads.googleapis.com/172.217.167.170:443] OUTBOUND SETTINGS: ack=false settings={ENABLE_PUSH=0, MAX_CONCURRENT_STREAMS=0, INITIAL_WINDOW_SIZE=1048576, MAX_HEADER_LIST_SIZE=16777216}

17:18:59.322 [grpc-nio-worker-ELG-1-3] DEBUG io.grpc.netty.shaded.io.grpc.netty.NettyClientHandler - [id: 0x74166695, L:/10.2.115.231:57124 - R:googleads.googleapis.com/172.217.167.170:443] OUTBOUND WINDOW_UPDATE: streamId=0 windowSizeIncrement=983041

17:18:59.325 [grpc-nio-worker-ELG-1-3] DEBUG io.grpc.netty.shaded.io.grpc.netty.NettyClientHandler - [id: 0x74166695, L:/10.2.115.231:57124 - R:googleads.googleapis.com/172.217.167.170:443] INBOUND SETTINGS: ack=false settings={MAX_CONCURRENT_STREAMS=100, INITIAL_WINDOW_SIZE=1048576, MAX_HEADER_LIST_SIZE=16384}

17:18:59.326 [grpc-nio-worker-ELG-1-3] DEBUG io.grpc.netty.shaded.io.grpc.netty.NettyClientHandler - [id: 0x74166695, L:/10.2.115.231:57124 - R:googleads.googleapis.com/172.217.167.170:443] OUTBOUND SETTINGS: ack=true

17:18:59.327 [grpc-nio-worker-ELG-1-3] DEBUG io.grpc.netty.shaded.io.grpc.netty.NettyClientHandler - [id: 0x74166695, L:/10.2.115.231:57124 - R:googleads.googleapis.com/172.217.167.170:443] INBOUND WINDOW_UPDATE: streamId=0 windowSizeIncrement=983041

17:18:59.812 [grpc-nio-worker-ELG-1-3] DEBUG io.grpc.netty.shaded.io.grpc.netty.NettyClientHandler - [id: 0x74166695, L:/10.2.115.231:57124 - R:googleads.googleapis.com/172.217.167.170:443] INBOUND SETTINGS: ack=true

17:19:02.017 [grpc-nio-worker-ELG-1-3] DEBUG io.grpc.netty.shaded.io.grpc.netty.NettyClientHandler - [id: 0x74166695, L:/10.2.115.231:57124 - R:googleads.googleapis.com/172.217.167.170:443] OUTBOUND HEADERS: streamId=3 headers=GrpcHttp2OutboundHeaders[:authority: googleads.googleapis.com:443, :path: /google.ads.googleads.v6.services.GoogleAdsService/Search, :method: POST, :scheme: https, content-type: application/grpc, te: trailers, user-agent: grpc-java-netty/1.21.0, developer-token: Ew0Hd8EElOzEWq8XucCZIA, login-customer-id: 3637526548, x-goog-api-client: gl-java/1.8.0_252 gapic/ gax/1.45.0 grpc/1.21.0, x-goog-request-params: customer_id=3637526548, grpc-accept-encoding: gzip, authorization: Bearer ya29.a0AfH6SMCZBPiA9hi6KgQO7-rq-MVFdysH4lBotsmP2ug0BWO-TYUiFMfeLOddA_j1WmXpjyHTTiD_qnKIwTMg60bmxKY2-L9r6QK5rcSo5HJrxrfyEqgX08eI_ar188TvF0utro0wjemRBNQieXTMzv8lX5ggFC1OQtk9sX_73a7w3A, grpc-timeout: 3591925m] streamDependency=0 weight=16 exclusive=false padding=0 endStream=false

17:19:02.021 [grpc-nio-worker-ELG-1-3] DEBUG io.grpc.netty.shaded.io.grpc.netty.NettyClientHandler - [id: 0x74166695, L:/10.2.115.231:57124 - R:googleads.googleapis.com/172.217.167.170:443] OUTBOUND DATA: streamId=3 padding=0 endStream=true length=153 bytes=00000000940a0a3336333735323635343812800173656c6563742061645f67726f75702e69642066726f6d2061645f67726f75702077686572652061645f6772...

17:19:02.902 [grpc-nio-worker-ELG-1-3] DEBUG io.grpc.netty.shaded.io.grpc.netty.NettyClientHandler - [id: 0x74166695, L:/10.2.115.231:57124 - R:googleads.googleapis.com/172.217.167.170:443] INBOUND HEADERS: streamId=3 headers=GrpcHttp2ResponseHeaders[:status: 200, content-type: application/grpc, request-id: Lw73LVevO0PjM-n1TmkUJA, date: Thu, 14 Jan 2021 11:49:02 GMT, alt-svc: h3-29=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"] padding=0 endStream=false

17:19:02.904 [grpc-nio-worker-ELG-1-3] DEBUG io.grpc.netty.shaded.io.grpc.netty.NettyClientHandler - [id: 0x74166695, L:/10.2.115.231:57124 - R:googleads.googleapis.com/172.217.167.170:443] INBOUND HEADERS: streamId=3 headers=GrpcHttp2ResponseHeaders[grpc-status: 3, grpc-message: Request contains an invalid argument., google.ads.googleads.v6.errors.googleadsfailure-bin: Ck0KAggdEkdDYW4gbm90IHJldHVybiBzdW1tYXJ5IHJvdyBpZiByZXF1ZXN0IGRpZCBub3Qgc2VsZWN0IGFueSBtZXRyaWNzIGZpZWxkLg==, grpc-status-details-bin: CAMSJVJlcXVlc3QgY29udGFpbnMgYW4gaW52YWxpZCBhcmd1bWVudC4algEKQ3R5cGUuZ29vZ2xlYXBpcy5jb20vZ29vZ2xlLmFkcy5nb29nbGVhZHMudjYuZXJyb3JzLkdvb2dsZUFkc0ZhaWx1cmUSTwpNCgIIHRJHQ2FuIG5vdCByZXR1cm4gc3VtbWFyeSByb3cgaWYgcmVxdWVzdCBkaWQgbm90IHNlbGVjdCBhbnkgbWV0cmljcyBmaWVsZC4=, request-id: Lw73LVevO0PjM-n1TmkUJA] padding=0 endStream=true

17:19:02.906 [grpc-nio-worker-ELG-1-3] DEBUG io.grpc.netty.shaded.io.grpc.netty.NettyClientHandler - [id: 0x74166695, L:/10.2.115.231:57124 - R:googleads.googleapis.com/172.217.167.170:443] INBOUND PING: ack=false bytes=0

17:19:02.906 [grpc-nio-worker-ELG-1-3] DEBUG io.grpc.netty.shaded.io.grpc.netty.NettyClientHandler - [id: 0x74166695, L:/10.2.115.231:57124 - R:googleads.googleapis.com/172.217.167.170:443] OUTBOUND PING: ack=true bytes=0

17:19:02.914 [Gax-3] WARN  com.google.ads.googleads.lib.request.summary - FAILURE REQUEST SUMMARY. Method: google.ads.googleads.v6.services.GoogleAdsService/Search, Endpoint: googleads.googleapis.com:443, CustomerID: 3637526548, RequestID: Lw73LVevO0PjM-n1TmkUJA, ResponseCode: INVALID_ARGUMENT, Fault: Request contains an invalid argument..

17:19:02.975 [Gax-3] INFO  com.google.ads.googleads.lib.request.detail - FAILURE REQUEST DETAIL.

Request

-------

MethodName: google.ads.googleads.v6.services.GoogleAdsService/Search

Endpoint: googleads.googleapis.com:443

Headers: {developer-token=REDACTED, login-customer-id=3637526548, x-goog-api-client=gl-java/1.8.0_252 gapic/ gax/1.45.0 grpc/1.21.0}

Body: [!!!com.google.ads.googleads.v6.services.SearchGoogleAdsRequest@5ebe3521=>java.lang.NoSuchMethodError:com.google.protobuf.Descriptors$FileDescriptor.internalBuildGeneratedFileFrom([Ljava/lang/String;[Lcom/google/protobuf/Descriptors$FileDescriptor;)Lcom/google/protobuf/Descriptors$FileDescriptor;!!!]

Response

--------

Headers: Metadata(content-type=application/grpc,request-id=Lw73LVevO0PjM-n1TmkUJA,date=Thu, 14 Jan 2021 11:49:02 GMT,alt-svc=h3-29=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43")

Body: null

Failure message: [!!!com.google.ads.googleads.v6.errors.GoogleAdsFailure@5e9e0d97=>java.lang.NoSuchMethodError:com.google.protobuf.Descriptors$FileDescriptor.internalBuildGeneratedFileFrom([Ljava/lang/String;[Lcom/google/protobuf/Descriptors$FileDescriptor;)Lcom/google/protobuf/Descriptors$FileDescriptor;!!!]

Status: Status{code=INVALID_ARGUMENT, description=Request contains an invalid argument., cause=null}.

17:23:02.851 [grpc-nio-worker-ELG-1-3] DEBUG io.grpc.netty.shaded.io.grpc.netty.NettyClientHandler - [id: 0x74166695, L:/10.2.115.231:57124 - R:googleads.googleapis.com/172.217.167.170:443] INBOUND GO_AWAY: lastStreamId=2147483647 errorCode=0 length=17 bytes=73657373696f6e5f74696d65645f6f7574

17:23:02.854 [grpc-nio-worker-ELG-1-3] DEBUG io.grpc.netty.shaded.io.grpc.netty.NettyClientHandler - [id: 0x74166695, L:/10.2.115.231:57124 - R:googleads.googleapis.com/172.217.167.170:443] INBOUND PING: ack=false bytes=2

17:23:02.854 [grpc-nio-worker-ELG-1-3] DEBUG io.grpc.netty.shaded.io.grpc.netty.NettyClientHandler - [id: 0x74166695, L:/10.2.115.231:57124 - R:googleads.googleapis.com/172.217.167.170:443] OUTBOUND PING: ack=true bytes=2

17:23:03.345 [grpc-nio-worker-ELG-1-3] DEBUG io.grpc.netty.shaded.io.grpc.netty.NettyClientHandler - [id: 0x74166695, L:/10.2.115.231:57124 - R:googleads.googleapis.com/172.217.167.170:443] INBOUND GO_AWAY: lastStreamId=3 errorCode=0 length=17 bytes=73657373696f6e5f74696d65645f6f7574
anil-patel-pcln commented 3 years ago

Did I miss something in the above code because this code seems to be working with v3 version of google-ads-5.0.0.jar with just minor change

below is the working section for v3

SearchGoogleAdsRequest request =
                      SearchGoogleAdsRequest.newBuilder()
                          .setCustomerId("xxxxx")
                          .setPageSize(PAGE_SIZE)
                          .setQuery(searchQuery)
                          .setReturnSummaryRow(true)
                                       .build();

but for v5/v6 I made the change to have

              SearchGoogleAdsRequest request =
                  SearchGoogleAdsRequest.newBuilder()
                      .setCustomerId("xxxxx")
                      .setPageSize(PAGE_SIZE)
                      .setQuery(searchQuery)
                     .setSummaryRowSetting(SummaryRowSetting.SUMMARY_ROW_WITH_RESULTS)
                      .build();

I don't know the actual issue by looking at the logs and docs please let me know if I am missing anything any help will be appreciated.

jradcliff commented 3 years ago

Hi,

I looked in our logs and the underlying error for that request is CANNOT_RETURN_SUMMARY_ROW_FOR_REQUEST_WITHOUT_METRICS, which means that you are requesting SUMMARY_ROW_WITH_RESULTS, but your query does not request any fields starting with metrics..

Does the request succeed if you remove that option?

Thanks, Josh

nwbirnie commented 3 years ago

So the code should be fine, I tweaked it to run with my credentials and I get back a fairly normal error (the API rejects the query though, see logs.

You can see the root cause of your error in your original post, it's hidden deep inside the response payload:

com.google.ads.googleads.v6.errors.GoogleAdsFailure@5e9e0d97=>java.lang.NoSuchMethodError:com.google.protobuf.Descriptors$FileDescriptor.internalBuildGeneratedFileFrom([Ljava/lang/String;[Lcom/google/protobuf/Descriptors$FileDescriptor;)Lcom/google/protobuf/Descriptors$FileDescriptor;!!!

It appears that you have an incompatible version of protobuf being loaded. This is quite a common issue, since protobuf is a popular open source project.

One way to avoid this would be to just set the version of protobuf in your pom.xml to the version that the Ads API requires.

Just adding the following to your pom.xml will likely fix the problem. I got this by running mvn dependency:tree -f google-ads/pom.xml on the root of the client library.

<dependency>
  <groupId>com.google.protobuf</groupId>
  <artifactId>protobuf-java</artifactId>
  <version>3.12.0</version>

Just be careful that this doesn't break somewhere else in your project. It shouldn't be a problem, since protobuf should be backwards compatible, but worth making sure.

You can also figure this out by looking at your project's depednency tree in verbose mode: mvn dependency:tree -f path-to-your/pom.xml -Dverbose will show the dependency conflicts that you have. Then you can often resolve these by selecting the newer version of the dependency.

anil-patel-pcln commented 3 years ago

Thanks, Josh and Nick for helping me I have tried to update the protobub version and it worked. @jradcliff you were correct no need to add SUMMARY_ROW_WITH_RESULTS and I have removed it from my code.

I am closing the issue. Thanks, Josh and Nick.