java.lang.NoSuchMethodError: 'com.google.api.gax.rpc.StubSettings$Builder com.google.ads.googleads.v8.services.stub.GoogleAdsServiceStubSettings$Builder.setMtlsEndpoint(java.lang.String)'

3,754 views
Skip to first unread message

Suchitra Theruvath

unread,
Jul 6, 2021, 9:38:39 AM7/6/21
to AdWords API and Google Ads API Forum
Hi Team,

We are trying to build an application which will authenticate based on user logged in and then should fetch the MCC accounts to which user is having access to.

We are fine with the authentication part, but we are unable to gather the MCC accounts using the Java client library version 8.
Using reporting : 
GoogleAdsServiceClient googleAdsServiceClient =
        googleAdsClient.getLatestVersion().createGoogleAdsServiceClient()

This throws an error : "java.lang.NoSuchMethodError: 'com.google.api.gax.rpc.StubSettings$Builder com.google.ads.googleads.v8.services.stub.GoogleAdsServiceStubSettings$Builder.setMtlsEndpoint(java.lang.String)'"

Using Request Response format : 
CustomerServiceClient customerService =
        googleAdsClient.getVersion8().createCustomerServiceClient()

This throws an error : "java.lang.NoSuchMethodError: 'com.google.api.gax.rpc.StubSettings$Builder com.google.ads.googleads.v8.services.stub.CustomerServiceStubSettings$Builder.setMtlsEndpoint(java.lang.String)'"

Please let us know what we are missing here.

Regards,
Suchitra

Pete Lavetsky (AdWords API Guru)

unread,
Jul 6, 2021, 11:03:17 AM7/6/21
to AdWords API and Google Ads API Forum
Suchitra,

That's interesting. I don't get that error. Here's my gradle definition for the Ads library:

com.google.api-ads:google-ads:13.0.0

Coupled with this message this might be a bit concerning : https://groups.google.com/g/adwords-api/c/kgDoqrCMYw8

Creating an md5 hash on the jar gives me the following:

md5 google-ads-13.0.0.jar 

MD5 (google-ads-13.0.0.jar) = 8e676d1a46932bed9b605d0fd4c78db5

ls -lart google-ads-13.0.0.jar 

85934170 Jun 17 13:53 google-ads-13.0.0.jar

Wonder if you get the same?

Pete


Suchitra Theruvath

unread,
Jul 7, 2021, 1:16:21 AM7/7/21
to pete.l...@gmail.com, AdWords API and Google Ads API Forum, Parvathalu Paladhi
Hi Pete,

I am using a windows machine and maven in the project instead of gradle.
The size of jar is same as your have provided : 85934170 
while creating md5 hash, this is what I get : 8e676d1a46932bed9b605d0fd4c78db5

There is no exception when I tried using version 7. The bug is in version 8.

Best Regards,

Suchitra Theruvath




--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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...@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 a topic in the Google Groups "AdWords API and Google Ads API Forum" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/adwords-api/Su9ETbwTPL4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to adwords-api...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/a631fdc6-3ad3-4579-909d-bc7f7d8df9can%40googlegroups.com.

xu leo

unread,
Jul 7, 2021, 2:52:41 AM7/7/21
to AdWords API and Google Ads API Forum
I am the questioner of this article (https://groups.google.com/g/adwords-api/c/kgDoqrCMYw8
My jar file md5 is also 8e676d1a46932bed9b605d0fd4c78db5 after encryption. 
Then the problem is coming, the jar file is the same, why there will be errors.

xu leo

unread,
Jul 7, 2021, 10:39:07 PM7/7/21
to AdWords API and Google Ads API Forum
<dependency>
            <groupId>com.google.api-ads</groupId>
            <artifactId>google-ads</artifactId>
            <version>14.0.0</version>
</dependency>

Version 14 has the same problem as version 13

Google Ads API Forum Advisor

unread,
Jul 12, 2021, 2:10:04 PM7/12/21
to xuliang...@gmail.com, adwor...@googlegroups.com
Hi Suchitra and Xu,

Thank you for reaching out to Google Ads API support. Note that this forum can only support AdWords API  and  Google Ads API implementation issues, for the Java Client library build issues you can reach out to the Googleads Java Github issue tracker.

Regards,

Google Logo
Aryeh Baker
Google Ads API Team
 


ref:_00D1U1174p._5004Q2JYwIk:ref

Amal Dev

unread,
Jul 14, 2021, 4:29:58 PM7/14/21
to AdWords API and Google Ads API Forum
I faced the same situation. For me, the issue was a version conflict on com.google.api:gax. I got it fixed by matching the version for v8.
<dependency>
  <groupId>com.google.api</groupId>
  <artifactId>gax</artifactId>
  <version>1.65.1</version>
</dependency>

<dependency>
  <groupId>com.google.api</groupId>
  <artifactId>gax-grpc</artifactId>
  <version>1.65.1</version>
</dependency>

Regards,
Amal

Google Ads API Forum Advisor

unread,
Jul 15, 2021, 11:29:15 PM7/15/21
to adwor...@googlegroups.com

Hello Amal,

Thank you for reaching out to us.

It's good to hear that you already have fixed your issue by matching the version for v8.

Moving forward, for issues related to the client library, we highly suggest that you reach out to the Googleads Java Github issue tracker (as mentioned by Aryeh).

Regards,

Google Logo
Mark Kevin Albios
Google Ads API Team
 


ref:_00D1U1174p._5004Q2JYwIk:ref
Reply all
Reply to author
Forward
0 new messages