google-ads-ruby icon indicating copy to clipboard operation
google-ads-ruby copied to clipboard

uninitialized constant Gapic::ServiceStub::ChannelPool

Open jacob-braze opened this issue 1 year ago • 2 comments

Describe the bug: Getting uninitialized constant Gapic::ServiceStub::ChannelPool when running the get_account_hierarchy example

https://github.com/googleads/google-ads-ruby/blob/51e655cebb578cb5a9bf60ccc6732e2ac652c9ba/examples/account_management/get_account_hierarchy.rb#L45 Steps to Reproduce:

  1. clone this repo locally
  2. configure ~/google_ads_config.rb with the required secrets
  3. run ruby get_account_hierarchy.rb

Expected behavior: Did not expect uninitialized constant Gapic::ServiceStub::ChannelPool

Client library version and API version: Client library version: 25.0.1 Google Ads API version: V15

Request/Response Logs: ➜ script git:(develop) ✗ ruby get_account_hierarchy.rb

No manager customer ID is specified. The example will print the hierarchies of all accessible customer IDs:
/Users/xxx/.rbenv/versions/3.1.0/lib/ruby/gems/3.0.0/gems/google-ads-googleads-25.0.1/lib/google/ads/google_ads/v15/services/customer_service/client.rb:570:in `channel_pool': uninitialized constant Gapic::ServiceStub::ChannelPool (NameError)
        from /Users/xxx/.rbenv/versions/3.1.0/lib/ruby/gems/3.0.0/gems/google-ads-googleads-25.0.1/lib/google/ads/google_ads/v15/services/customer_service/client.rb:141:in `initialize'
        from /Users/xxx/.rbenv/versions/3.1.0/lib/ruby/gems/3.0.0/gems/google-ads-googleads-25.0.1/lib/google/ads/google_ads/factories/v15/services.rb:1420:in `new'
        from /Users/xxx/.rbenv/versions/3.1.0/lib/ruby/gems/3.0.0/gems/google-ads-googleads-25.0.1/lib/google/ads/google_ads/factories/v15/services.rb:1420:in `customer'
        from /Users/xxx/.rbenv/versions/3.1.0/lib/ruby/3.0.0/delegate.rb:87:in `method_missing'
        from get_account_hierarchy.rb:145:in `get_account_hierarchy'
        from get_account_hierarchy.rb:185:in `<main>'

Anything else we should know about your project / environment:

jacob-braze avatar Jan 25 '24 14:01 jacob-braze

I'm not able to reproduce. Can you double-check what version of gapic-common you have installed? Try updating that library and see if that resolves your issue.

mcloonan avatar Jan 25 '24 15:01 mcloonan

use version 25.0.2 for google-ads-googleads ruby gem and that uses gapic version 0.20.0 rather than old 0.6.0 gapic.

Refer

himanshu-patel-dev avatar Feb 15 '24 06:02 himanshu-patel-dev