Method not found exception

201 views
Skip to first unread message

V Kuznetsov

unread,
Mar 31, 2020, 9:22:47 PM3/31/20
to AdWords API and Google Ads API Forum
Hi,

Simple call to get a service throws me this error:
System.MissingMethodException: Method not found: 'Grpc.Core.CallInvoker Grpc.Core.Interceptors.ChannelExtensions.Intercept(Grpc.Core.Channel, Grpc.Core.Interceptors.Interceptor)'.    
at
Google.Ads.GoogleAds.Lib.GoogleAdsServiceClientFactory.GetService[TService,TServiceSetting](ServiceTemplate`2 serviceTemplate, GoogleAdsConfig config)    
at Google.Ads.GoogleAds.Lib.GoogleAdsClient.GetService[TService,TServiceSetting](ServiceTemplate`
2 serviceTemplate)

This is the line that causes it:
CustomerServiceClient customerService = client.GetService(global::Google.Ads.GoogleAds.Services.V3.CustomerService);

My relevant packages:
 <PackageReference Include="Google.Ads.GoogleAds" Version="2.8.0" />
 
<PackageReference Include="Google.Apis.Auth.Mvc" Version="1.44.1" />
 
<PackageReference Include="Google.Apis.Oauth2.v2" Version="1.44.1.1869" />
 
<PackageReference Include="Google.Apis.ShoppingContent.v2_1" Version="1.44.1.1882" />

It's a class library, used in a web api project.
 <TargetFrameworks>net472;netcoreapp2.2</TargetFrameworks>

Please help to resolve the error. 

Thank you.

Google Ads API Forum Advisor Prod

unread,
Apr 1, 2020, 10:22:41 AM4/1/20
to vla...@gmail.com, adwor...@googlegroups.com
Hi,

The issue you are facing is Content API related. You will need to reach out to their team via their forum.

Regards,
Anthony
Google Ads API Team

ref:_00D1U1174p._5001UZVUjS:ref

V Kuznetsov

unread,
Apr 1, 2020, 12:55:54 PM4/1/20
to AdWords API and Google Ads API Forum
Please explain how is this Content API related. I explicitly call Google Ads methods. 

Google Ads API Forum Advisor Prod

unread,
Apr 1, 2020, 4:02:14 PM4/1/20
to vla...@gmail.com, adwor...@googlegroups.com
Hello,

I initially thought this was Content API related because of the package you mentioned below

 <PackageReference Include="Google.Apis.ShoppingContent.v2_1" Version="1.44.1.1882" />

Are you using our client libraries? Do you have any logs associated with these calls or only the errors being thrown?

Thanks,

V Kuznetsov

unread,
Apr 1, 2020, 4:14:33 PM4/1/20
to AdWords API and Google Ads API Forum
Hi Anthony, 

I installed the nugets listed in the original post. In the logs I see only the error I posted above.

V Kuznetsov

unread,
Apr 1, 2020, 4:15:56 PM4/1/20
to AdWords API and Google Ads API Forum
Please see my binding redirects, just in case:
 <dependentAssembly>
 
<assemblyIdentity name="Google.Protobuf" publicKeyToken="a7d26565bac4d604" culture="neutral" />
 
<bindingRedirect oldVersion="0.0.0.0-3.11.1.0" newVersion="3.11.1.0" />
 
</dependentAssembly>
 
<dependentAssembly>
 
<assemblyIdentity name="Grpc.Core" publicKeyToken="d754f35622e28bad" culture="neutral" />
 
<bindingRedirect oldVersion="1.0.0.0" newVersion="2.0.0.0" />
 
</dependentAssembly>
 
<dependentAssembly>
 
<assemblyIdentity name="Grpc.Core.Api" publicKeyToken="d754f35622e28bad" culture="neutral" />
 
<bindingRedirect oldVersion="1.0.0.0" newVersion="2.0.0.0" />
 
</dependentAssembly>
 
<dependentAssembly>
 
<assemblyIdentity name="Google.Apis.Auth" publicKeyToken="4b01fa6e34db77ab" culture="neutral" />
 
<bindingRedirect oldVersion="0.0.0.0-1.44.1.0" newVersion="1.44.1.0" />
 
</dependentAssembly>

Google Ads API Forum Advisor Prod

unread,
Apr 2, 2020, 1:23:02 PM4/2/20
to vla...@gmail.com, adwor...@googlegroups.com
Hi,

I'll need to see if this something related to the actual API or the way you have it set up. Can you please reply privately to author your code and any files that contain the dependencies? 
Reply all
Reply to author
Forward
0 new messages