Closed waynew111 closed 10 months ago
Hi,
just by changing the google-ads-googleads
gem version to 25.0.0, I got the same error as reported above, for any Ruby version I tried (3.2.1, 2.7.8). Since the issue is with gapic
, I tried upgrading gapic-common
to the latest version (0.20.0). This made the error disappear and the googleads gem in version 25.0.0 started working.
I think the issue is in https://github.com/googleads/google-ads-ruby/blob/main/google-ads-googleads.gemspec#L37 , the version needs to be adjusted for gapic-common
in the gemspec, since the googleads gem in version 25.0.0 relies on the new channel pooling feature added in gapic-common
0.20.0, see https://github.com/googleapis/gapic-generator-ruby/releases/tag/gapic-common%2Fv0.20.0 .
Until the gemspec gets fixed, simply add following line in your local Gemfile and run bundle
:
gem 'gapic-common', '~> 0.20'
^ ^ Thanks for figuring out the cause! I tried the above and things started working.
However, this seems to require googleauth 1.0.0. Our code base also uses google_drive 3.0.7, which requires googleauth < 1.0.0. I'm assuming even when gemspec gets fixed, this conflict would still remain. Does anybody know?
Thank you for the report. I tested older versions of gapic-common
and confirmed that we need >0.20
. It will be fixed with https://github.com/googleads/google-ads-ruby/pull/469
I will make a release once thats merged.
Version 25.0.1
has been released to include the fix.
Amazing! Thanks so much @danielfrg!
Describe the bug: Calling client.service.offline_user_data_job results in
NameError: uninitialized constant Gapic::ServiceStub::ChannelPool
Steps to Reproduce:
Expected behavior: Return a new instance of
offline_user_data_job
Client library version and API version: Client library version: 25.0.0 Google Ads API version: v15
Gemfile.lock gems/dependencies:
Request/Response Logs: NameError: uninitialized constant Gapic::ServiceStub::ChannelPool /home/vagrant/.rvm/gems/ruby-2.6.3@automator/gems/google-ads-googleads-25.0.0/lib/google/ads/google_ads/v15/services/offline_user_data_job_service/operations.rb:721:in
channel_pool' /home/vagrant/.rvm/gems/ruby-2.6.3@automator/gems/google-ads-googleads-25.0.0/lib/google/ads/google_ads/v15/services/offline_user_data_job_service/operations.rb:98:in
initialize' /home/vagrant/.rvm/gems/ruby-2.6.3@automator/gems/google-ads-googleads-25.0.0/lib/google/ads/google_ads/v15/services/offline_user_data_job_service/client.rb:135:innew' /home/vagrant/.rvm/gems/ruby-2.6.3@automator/gems/google-ads-googleads-25.0.0/lib/google/ads/google_ads/v15/services/offline_user_data_job_service/client.rb:135:in
initialize' /home/vagrant/.rvm/gems/ruby-2.6.3@automator/gems/google-ads-googleads-25.0.0/lib/google/ads/google_ads/factories/v15/services.rb:1966:innew' /home/vagrant/.rvm/gems/ruby-2.6.3@automator/gems/google-ads-googleads-25.0.0/lib/google/ads/google_ads/factories/v15/services.rb:1966:in
offline_user_data_job'Anything else we should know about your project / environment: The exact same code snippet provided above works perfectly when using v13 / client library 22.0, as well as v14 / client library 24.0. It only fails for v15 / client library 25.0.