Hello,
I am receiving the same error. I am able to authenticate with OAuth2
successfully and retrieve the refresh token, but when I try to use either
the `#search` or `#search_stream` methods I receive the
`GRPC::Unimplemented` error when the stream tries to open. The synchronous
`#search` method returns the error immediately while the `#search_stream`
error returns an `Enumerable` object which throws the error when trying to
navigate the enumerable with a method like `#next` or `#to_a`.
I have a Ruby module with a client method that returns the Ads client:
```
def self.client
Google::Ads::GoogleAds::GoogleAdsClient.new(Rails.root.join("google_ads_config.rb").to_s)
end
```
Then I've implemented a `.get_campaigns` method as:
```
def self.get_campaigns
responses = client.service.google_ads.search_stream(
:customer_id => CUSTOMER_ID,
:query => "SELECT campaign.id, campaign.name FROM campaign ORDER BY
campaign.id"
)
responses.each do |response|
response.results.each do |row|
puts "Campaign with ID #{row.campaign.id} and name
'#{row.campaign.name}' was found."
end
end
end
```
Here's the full output with logging enabled:
```
irb(main):001:0> GoogleAdsService.get_campaigns
I, [2022-04-25T09:11:58.498912 #1828] INFO -- : CID: 9380164633, Host:
googleads.googleapis.com:443, Method:
/google.ads.googleads.v6.services.GoogleAdsService/SearchStream, IsFault: no
W, [2022-04-25T09:11:59.050785 #1828] WARN -- : CID: 9380164633, Host:
googleads.googleapis.com:443, Method:
/google.ads.googleads.v6.services.GoogleAdsService/SearchStream, IsFault:
yes
I, [2022-04-25T09:11:59.051284 #1828] INFO -- : Outgoing request: Headers:
{"developer-token":"REDACTED","login-customer-id":"9380164633","x-goog-api-client":"gl-ruby/2.7.4
gax/0.3.4 gapic/10.0.0
grpc/1.45.0","x-goog-request-params":"customer_id=9380164633"} Payload:
{"customerId":"9380164633","query":"SELECT campaign.id, campaign.name FROM
campaign ORDER BY campaign.id"}
I, [2022-04-25T09:11:59.051510 #1828] INFO -- : Incoming response (errors):
GRPC::Unimplemented(12:Operation is not implemented, or supported, or
enabled..
debug_error_string:{"created":"@1650892319.050462000","description":"Error
received from peer
ipv6:[2607:f8b0:4009:809::200a]:443","file":"src/core/lib/surface/call.cc","file_line":906,"grpc_message":"Operation
is not implemented, or supported, or enabled.","grpc_status":12}):
called from:
/Users/tylerchrestoff/code/data-warehouse/app/services/google_ads_service.rb:59:in
`each'
Traceback (most recent call last):
4: from (irb):1
3: from app/services/google_ads_service.rb:59:in `get_campaigns'
2: from app/services/google_ads_service.rb:59:in `each'
1: from app/services/google_ads_service.rb:59:in `each'
GRPC::Unimplemented (12:Operation is not implemented, or supported, or
enabled..
debug_error_string:{"created":"@1650892319.050462000","description":"Error
received from peer
ipv6:[2607:f8b0:4009:809::200a]:443","file":"src/core/lib/surface/call.cc","file_line":906,"grpc_message":"Operation
is not implemented, or supported, or enabled.","grpc_status":12})
irb(main):002:0>
```
Any help is greatly appreciated.
On Tuesday, April 19, 2022 at 2:04:26 AM UTC-4 adsapi wrote:
> Hi Kiran,
>
> Thanks for reaching out to the Google Ads API Forum.
>
> I can see that you’ve encountered an error with the message “*Operation
> is not implemented, or supported, or enabled.*”. However, could you
> provide us with the complete *request*
> <https://developers.google.com/google-ads/api/docs/concepts/field-service?hl=en#request>
>
> and *response*
> <https://developers.google.com/google-ads/api/docs/concepts/field-service?hl=en#response>
>
> logs with the *request-id*
> <https://developers.google.com/google-ads/api/docs/concepts/call-structure?hl=en#request-id>
>
> generated, so our team can investigate further?
>
> For the ruby library, logging can be enabled by following this *guide*
> <https://developers.google.com/google-ads/api/docs/client-libs/ruby/logging>.
> You may then send the requested information via the *Reply privately to
> author* option. If this option is not available, you may send the details
> directly to our [email protected] alias instead.
>
> Regards,
> [image: Google Logo]
> Yasar
> Google Ads API Team
>
>
> ref:_00D1U1174p._5004Q2a4EFe:ref
>
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
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 the Google Groups
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/ab2abe3a-fc1a-4dd9-8b6f-e33b4620fc6dn%40googlegroups.com.