Google Ads API Integration Error - GRPC Error

2024-04-12 Thread Márcio Duarte
Hi there, 

I'm trying to integrate with Google Ads API using the available .NET 
package (Google.Ads.GoogleAds latest version - 19.0.1) on a .NET 8 project.

I'm setting up the API out of the samples provided, and currently getting a 
very generic GRPC error which I'm not able to figure out what is going on.

*Message: *Status(StatusCode="Internal", Detail="Internal error 
encountered.")
*Stacktrace: *   at 
Google.Ads.Gax.Interceptors.StreamingRpcInterceptor`1.MoveNext(CancellationToken
 
cancellationToken)
   at 
Google.Api.Gax.Grpc.AsyncResponseStream`1.MoveNextAsync(CancellationToken 
cancellationToken)
   at 
Google.Ads.GoogleAds.V16.Services.GoogleAdsServiceClient.<>c__DisplayClass32_0.<b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at Program.<>c.<<$>b__0_0>d.MoveNext() in \Program.cs:line 61

The sample application is as follows:

var builder = WebApplication.CreateBuilder(args);
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();

var app = builder.Build();

// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{
app.UseSwagger();
app.UseSwaggerUI();
}

app.UseHttpsRedirection();


app.MapGet("/sample", async () =>
{
  var config = new GoogleAdsConfig() {
 OAuth2Mode = Google.Ads.Gax.Config.OAuth2Flow.APPLICATION,
 DeveloperToken = "",
 OAuth2ClientId = "",
 OAuth2ClientSecret = "",
 LoginCustomerId = "",
 LinkedCustomerId = "",
 OAuth2RefreshToken =
""
  };

  // Create a Google Ads client.
  var client = new GoogleAdsClient(config);

  // Create the required service.
  var service =
 client.GetService(Services.V16.GoogleAdsService);

  // Create a query that will retrieve all campaigns.
  var query = $@"SELECT
campaign.id,
campaign.name,
campaign.network_settings.target_content_network
FROM campaign
ORDER BY campaign.id";

  var request = new SearchGoogleAdsStreamRequest();
  request.Query = query;

  try {

 await service.SearchStreamAsync(request, (response) => {

foreach (var googleAdsRow in response.Results) {
   Console.WriteLine("Campaign with ID {0} and name '{1}' was 
found.",
  googleAdsRow.Campaign.Id, googleAdsRow.Campaign.Name);
}

 });
  }
  catch (GoogleAdsException e) {
 Console.WriteLine("Failure:");
 Console.WriteLine($"Message: {e.Message}");
 Console.WriteLine($"Failure: {e.Failure}");
 Console.WriteLine($"Request ID: {e.RequestId}");
 throw;
  }
  catch (Exception ex) {
 
  }   
})
.WithName("GetSample")
.WithOpenApi();

app.Run();


Is there any other setup needed for GRPC to work as expected?
Would you be able to help me, please?

Much appreciated.


-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@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 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 adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/cdd90fa4-174f-4d3e-bf2e-84bccc3b6ec9n%40googlegroups.com.


RE: GRPC error: Received unexpected EOS on empty DATA frame from server

2022-06-16 Thread 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
Hi Dan,

Replying over here since I saw your issue on the Java client library issues 
list, but this looks like an API issue that's not specific to that client 
library.

For some reason, I'm having a hard time finding the request with ID 
amJbGo5ALKnf_ihJ5CMvvg in our logs. Could you click Reply privately to author 
on this message and send me the following so I can try to locate that request?

The customer_id of the request
The date and time of the request, including the time zone
The login-customer-id of the request, if set

Also, please let me know in that message if you have attempted to retry the 
failed request in these cases, and if so, whether the retries succeeded.

Thanks,
Josh, Google Ads API Team
ref:_00D1U1174p._5004Q2arOmu: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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@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 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 adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/_me7v0RDL1PU00buuFYle1QBaOBm20HIvPig%40sfdc.net.


GRPC error: Received unexpected EOS on empty DATA frame from server

2022-05-10 Thread 'Daan Groot' via Google Ads API and AdWords API Forum
Hi,

When querying ad_group_ad_asset_view we sometimes get back the following 
error: INTERNAL: Received unexpected EOS on empty DATA frame from server.
This seems to happen when the request has been running for an hour. 
Therefore, we thought this was a time-out and we increased the time-out to 
4 hours. Unfortunately, this did not make a difference, we are still 
getting errors.

Some more details:

   - We are on version 9
   - We use the java client
   - We use  SearchStream requests
   - Full query: "SELECT\n" +
   " asset.id,\n" +
   " asset.text_asset.text,\n" +
   " ad_group.id,\n" +
   " ad_group_ad.ad.id,\n" +
   " ad_group_ad.ad.responsive_search_ad.headlines\n" +
   "FROM\n" +
   " ad_group_ad_asset_view\n" +
   "WHERE\n" +
   " campaign.status != 'REMOVED' AND\n" +
   " ad_group.status != 'REMOVED' AND\n" +
   " ad_group_ad.status != 'REMOVED' AND\n" +
   " ad_group_ad.ad.type = 'RESPONSIVE_SEARCH_AD' AND\n" +
   " ad_group_ad_asset_view.enabled = true AND\n" +
   " ad_group_ad_asset_view.field_type = 'HEADLINE'"
   - Full java stack trace: Caused by: 
   com.google.api.gax.rpc.InternalException: io.grpc.StatusRuntimeException: 
   INTERNAL: Received unexpected EOS on empty DATA frame from server
   at 
   
com.google.api.gax.rpc.ApiExceptionFactory.createException(ApiExceptionFactory.java:67)
   at 
   
com.google.api.gax.grpc.GrpcApiExceptionFactory.create(GrpcApiExceptionFactory.java:72)
   at 
   
com.google.api.gax.grpc.GrpcApiExceptionFactory.create(GrpcApiExceptionFactory.java:60)
   at 
   
com.google.api.gax.grpc.ExceptionResponseObserver.onErrorImpl(ExceptionResponseObserver.java:82)
   at 
   
com.google.api.gax.rpc.StateCheckingResponseObserver.onError(StateCheckingResponseObserver.java:86)
   at 
   
com.google.api.gax.grpc.GrpcDirectStreamController$ResponseObserverAdapter.onClose(GrpcDirectStreamController.java:149)
   at 
   
io.grpc.PartialForwardingClientCallListener.onClose(PartialForwardingClientCallListener.java:39)
   at 
   
io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:23)
   at 
   
io.grpc.ForwardingClientCallListener$SimpleForwardingClientCallListener.onClose(ForwardingClientCallListener.java:40)
   at 
   
com.google.ads.googleads.lib.logging.LoggingInterceptor$1$1.onClose(LoggingInterceptor.java:113)
   at 
   
io.grpc.internal.DelayedClientCall$DelayedListener$3.run(DelayedClientCall.java:463)
   at 
   
io.grpc.internal.DelayedClientCall$DelayedListener.delayOrExecute(DelayedClientCall.java:427)
   at 
   
io.grpc.internal.DelayedClientCall$DelayedListener.onClose(DelayedClientCall.java:460)
   at 
   io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:557)
   at io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:69)
   at 
   
io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInternal(ClientCallImpl.java:738)
   at 
   
io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:717)
   at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
   at 
   io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:133)
   ... 3 more

We hope you can give us more insights on why this is happening. Thanks!

Best,
Daan Groot

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@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 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 adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/9dead67a-fe0b-4917-9d9b-b889c517f850n%40googlegroups.com.


Grpc error: Received unexpected EOS on empty DATA frame from server

2022-05-10 Thread 'Daan Groot' via Google Ads API and AdWords API Forum
Hi,

When querying ad_group_ad_asset_view we sometimes get back the following 
error: INTERNAL: Received unexpected EOS on empty DATA frame from server.
This seems to happen when the request has been running for an hour. 
Therefore, we thought this was a time-out and we increased the time-out to 
4 hours. Unfortunately, this did not make a difference, we are still 
getting errors.

Some more details:

   - We are on version 9
   - We use the java client
   - We use  SearchStream requests
   - Full query: "SELECT\n" +
   " asset.id,\n" +
   " asset.text_asset.text,\n" +
   " ad_group.id,\n" +
   " ad_group_ad.ad.id,\n" +
   " ad_group_ad.ad.responsive_search_ad.headlines\n" +
   "FROM\n" +
   " ad_group_ad_asset_view\n" +
   "WHERE\n" +
   " campaign.status != 'REMOVED' AND\n" +
   " ad_group.status != 'REMOVED' AND\n" +
   " ad_group_ad.status != 'REMOVED' AND\n" +
   " ad_group_ad.ad.type = 'RESPONSIVE_SEARCH_AD' AND\n" +
   " ad_group_ad_asset_view.enabled = true AND\n" +
   " ad_group_ad_asset_view.field_type = 'HEADLINE'"
   - Full java stack trace: Caused by: 
   com.google.api.gax.rpc.InternalException: io.grpc.StatusRuntimeException: 
   INTERNAL: Received unexpected EOS on empty DATA frame from server
   at 
   
com.google.api.gax.rpc.ApiExceptionFactory.createException(ApiExceptionFactory.java:67)
   at 
   
com.google.api.gax.grpc.GrpcApiExceptionFactory.create(GrpcApiExceptionFactory.java:72)
   at 
   
com.google.api.gax.grpc.GrpcApiExceptionFactory.create(GrpcApiExceptionFactory.java:60)
   at 
   
com.google.api.gax.grpc.ExceptionResponseObserver.onErrorImpl(ExceptionResponseObserver.java:82)
   at 
   
com.google.api.gax.rpc.StateCheckingResponseObserver.onError(StateCheckingResponseObserver.java:86)
   at 
   
com.google.api.gax.grpc.GrpcDirectStreamController$ResponseObserverAdapter.onClose(GrpcDirectStreamController.java:149)
   at 
   
io.grpc.PartialForwardingClientCallListener.onClose(PartialForwardingClientCallListener.java:39)
   at 
   
io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:23)
   at 
   
io.grpc.ForwardingClientCallListener$SimpleForwardingClientCallListener.onClose(ForwardingClientCallListener.java:40)
   at 
   
com.google.ads.googleads.lib.logging.LoggingInterceptor$1$1.onClose(LoggingInterceptor.java:113)
   at 
   
io.grpc.internal.DelayedClientCall$DelayedListener$3.run(DelayedClientCall.java:463)
   at 
   
io.grpc.internal.DelayedClientCall$DelayedListener.delayOrExecute(DelayedClientCall.java:427)
   at 
   
io.grpc.internal.DelayedClientCall$DelayedListener.onClose(DelayedClientCall.java:460)
   at 
   io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:557)
   at io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:69)
   at 
   
io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInternal(ClientCallImpl.java:738)
   at 
   
io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:717)
   at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
   at 
   io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:133)
   ... 3 more
   Suppressed: java.lang.RuntimeException: Asynchronous task failed
   at 
   
com.google.api.gax.rpc.ServerStreamIterator.hasNext(ServerStreamIterator.java:105)
   at 
   
com.bgenius.api.connector.googleads.GoogleAdsRowSynchronizer.execute_aroundBody0(GoogleAdsRowSynchronizer.java:64)
   at 
   
com.bgenius.api.connector.googleads.GoogleAdsRowSynchronizer.execute_aroundBody1$advice(GoogleAdsRowSynchronizer.java:19)
   at 
   
com.bgenius.api.connector.googleads.GoogleAdsRowSynchronizer.execute(GoogleAdsRowSynchronizer.java:1)
   at 
   
com.bgenius.api.connector.adwords.synchronizer.account.AdwordsStructureSynchronizer.execute_aroundBody0(AdwordsStructureSynchronizer.java:92)
   at 
   
com.bgenius.api.connector.adwords.synchronizer.account.AdwordsStructureSynchronizer$AjcClosure1.run(AdwordsStructureSynchronizer.java:1)
   at 
   org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:167)
   at 
   
com.bgenius.api.synchronizer.apmtracing.TraceAspect.traceExecute(TraceAspect.java:19)
   at 
   
com.bgenius.api.connector.adwords.synchronizer.account.AdwordsStructureSynchronizer.execute(AdwordsStructureSynchronizer.java:81)
   at 
   
com.bgenius.api.synchronizer.context.SynchronizerContextHolder.executeInLocalContext(SynchronizerContextHolder.java:92)
   at 
   
com.bgenius.api.thread.SynchronizeAccountThread.synchronize(SynchronizeAccountThread.java:66)
   at 
   
com.bgenius.api.thread.SynchronizeAccountThread.execute(SynchronizeAccountThread.java:48)
   at nl.traffic4u.sch.SchedulerThread.run(SchedulerThread.java:95)
   ... 3 more
   Caused by: io.grpc.StatusRuntimeException: INTERNAL: R

Re: GRPC error

2022-04-25 Thread Tyler Chrestoff
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: REDACTED, 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: REDACTED, 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":"REDACTED","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":"REDACTED","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* 
> 
>  
> and *response* 
> 
>  
> logs with the *request-id* 
> 
>  
> generated, so our team can investigate further?
>
> For the ruby library, logging can be enabled by following this *guide* 
> . 
> 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 googleadsa...@google.com 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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@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 t

Re: GRPC error

2022-04-25 Thread Tyler Chrestoff
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* 
> 
>  
> and *response* 
> 
>  
> logs with the *request-id* 
> 
>  
> generated, so our team can investigate further?
>
> For the ruby library, logging can be enabled by following this *guide* 
> . 
> 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 googleadsa...@google.com 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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@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 subs

Re: GRPC Error StatusRuntimeException: INTERNAL

2022-04-20 Thread 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
Hi Ashir,

Thank you for sending the requested information. I'm also a member of the 
Google Ads API team and allow me to assist you here.

I would like to inform you first that I am going to delete your initial post as 
it contains sensitive information. Moving forward to your issue, I can see that 
you are using the V9 API version. With this, before I raise this issue to our 
team, I recommend upgrading to the V10 to check if the issue can be fixed using 
that updated API version. If the issue still persists, could you please provide 
the updated request and response logs with request ID and request header that 
generated on your end using V10?

If you haven't yet, logging can be enabled by navigating to the Client 
libraries > Your client library (ex. Java) > Logging documentation, which you 
can access from this link. You can provide it via Reply privately to the author 
option. If this option is not available, then send it instead on this email 
address googleadsapi-supp...@google.com.

Best regards,

Jinky
Google Ads API Team
ref:_00D1U1174p._5004Q2a3MPE: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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@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 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 adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/QJWTM0RAMN6G00fFCzP_AFSQm5qSr3K4zH3A%40sfdc.net.


Re: GRPC Error StatusRuntimeException: INTERNAL

2022-04-19 Thread Ashir Khan
*Request_id:*
com.google.ads.googleads.v9.errors.GoogleAdsException: request_id: 
"7NTIcOGtlJhgMyBBeMXJSQ"
*Execute this query :*
   String query="SELECT customer.descriptive_name, 
customer.id,campaign.id, campaign.name, campaign.status, metrics.ctr, 
metrics.impressions, metrics.relative_ctr,"
+ " metrics.value_per_conversion,metrics.cost_micros 
,metrics.average_cpc, metrics.cost_per_conversion, 
metrics.cost_per_all_conversions, metrics.clicks, "
+ 
"metrics.conversions,campaign.network_settings.target_search_network,customer.currency_code,
 
metrics.conversions_value, campaign.labels,"
+ " 
metrics.conversions_from_interactions_rate,segments.month,metrics.all_conversions_from_interactions_rate,
 
metrics.all_conversions_value, metrics.all_conversions "
+ " FROM campaign WHERE segments.month =  '"+Date+"' AND 
metrics.impressions > 0";

*Request:*SearchGoogleAdsStreamRequest request 
=SearchGoogleAdsStreamRequest.newBuilder().setCustomerId(customerId2.toString()).setQuery(gaqlQuery).build();
ServerStream stream 
=serviceClient.searchStreamCallable().call(request);  

I download records against the MCC account hierarchy and after some time *grpc 
internal error* occurs. I retry my code but this error occurs frequently.
Thanks.

On Friday, April 15, 2022 at 1:24:41 AM UTC+5 adsapi wrote:

> Hi Ashir,
>
> Thank you for reaching out. 
>
> To investigate the issue further, could you please provide the complete 
> request 
> 
>  
> and response 
> 
>  
> logs, with the request-id 
> 
> ?
> If you haven't yet, logging can be enabled by navigating to the Client 
> libraries > Your client library (ex. Java) > Logging documentation, which 
> you can access from this link 
> . 
> You can provide it via Reply privately to author option. If this option is 
> not available, then send it instead on this email address 
> googleadsa...@google.com .
>
> Thanks,
> [image: Google Logo] 
> Nirmita 
> Google Ads API Team 
>   
>
> ref:_00D1U1174p._5004Q2a3MPE: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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@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 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 adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/4fba7861-c125-410b-954f-f83627ac231dn%40googlegroups.com.


GRPC error

2022-04-18 Thread Kiran MK
Hi,
I have been trying to use Google Ads API for a project.
ruby version: 2.6.9
rails version: 5.1.7

I was just trying out this example here 

 from 
the google ads repo , to get 
the campaigns info in the console. While running the block of code below




*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*

its showing an error like this 

*GRPC::Unimplemented: 12:Operation is not implemented, or supported, or 
enabled.. 
debug_error_string:{"created":"@1650273920.527183000","description":"Error 
received from peer 
ipv4:142.250.183.202:443","file":"src/core/lib/surface/call.cc","file_line":906,"grpc_message":"Operation
 
is not implemented, or supported, or enabled.","grpc_status":12}*


If the code is run again its showing another error 

*GRPC::Core::CallError: Cannot run batch on closed call*


*Complete code I tried *

client = Google::Ads::GoogleAds::GoogleAdsClient.new do |config|

  config.client_id = *'* *'*

  config.client_secret = *'* *'*

  config.refresh_token = *'* *'*

  config.developer_token = *'* *'*

end


responses = client.service.google_ads.search_stream(
customer_id: ' ',
query: 'SELECT campaign.id, campaign.name FROM campaign ORDER BY 
campaign.id',
)


# Output of responses  

*#*



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


-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@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 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 adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/5a6d5363-fd5d-4c9e-8564-2d30a8fc2fccn%40googlegroups.com.


RE: GRPC Error StatusRuntimeException: INTERNAL

2022-04-14 Thread 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
Hi Ashir,

Thank you for reaching out.

To investigate the issue further, could you please provide the complete request 
and response logs, with the request-id?

If you haven't yet, logging can be enabled by navigating to the Client 
libraries > Your client library (ex. Java) > Logging documentation, which you 
can access from this link. You can provide it via Reply privately to author 
option. If this option is not available, then send it instead on this email 
address googleadsa...@google.com.

Thanks,

Nirmita
Google Ads API Team
ref:_00D1U1174p._5004Q2a3MPE: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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@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 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 adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/UtDop0RACJCM00lJooY-foS5OLLENlXVWUuQ%40sfdc.net.


GRPC Error StatusRuntimeException: INTERNAL

2022-04-14 Thread Ashir Khan
Hi 
I faced *io. grpc.StatusRuntimeException: INTERNAL:Internal error 
encountered.Error *very frequently when I download adgroup reporting during 
LAST_7_DAYS. Any solution to get rid of this error?

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@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 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 adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/90257684-d320-4a39-b0c3-b2f161fdd2d8n%40googlegroups.com.


RE: Google Ads call produces a grpc error: InvalidFlags

2020-04-15 Thread Google Ads API Forum Advisor Prod
Hi V,

Thank you for reaching out to us. This error looks to be an issue with the 
client library. Could you go to the github page for the client library you've 
chosen and post this concern under the "Issues" tab, and our client library 
support team will be more than happy to assist you with your concern. Let me 
know if you have further questions.

Thank you,
Bryan, Google Ads API Team
ref:_00D1U1174p._5001UZY963: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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@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 the Google Groups 
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/Bjccu0Q8UCID00y5FAgcj9QTSc7E4rnLeyfw%40sfdc.net.


Google Ads call produces a grpc error: InvalidFlags

2020-04-14 Thread V Kuznetsov
Hello, 

I am getting this cryptic error when I call Google Ads api:
System.InvalidOperationException: Call error: InvalidFlags
   at Grpc.Core.Internal.CallErrorExtensions.CheckOk(CallError callError)
   at 
Grpc.Core.Internal.CallSafeHandle.StartUnary(IUnaryResponseClientCallback 
callback, Byte[] payload, WriteFlags writeFlags, MetadataArraySafeHandle 
metadataArray, CallFlags callFlags)
   at Grpc.Core.Internal.AsyncCall`2.UnaryCallAsync(TRequest msg)
   at 
Grpc.Core.Calls.AsyncUnaryCall[TRequest,TResponse](CallInvocationDetails`2 
call, TRequest req)
   at 
Grpc.Core.DefaultCallInvoker.AsyncUnaryCall[TRequest,TResponse](Method`2 
method, String host, CallOptions options, TRequest request)
   at 
Grpc.Core.Interceptors.InterceptingCallInvoker.b__4_0[TRequest,TResponse](TRequest
 
req, ClientInterceptorContext`2 ctx)
   at 
Google.Ads.GoogleAds.Interceptors.GoogleAdsGrpcInterceptor.AsyncUnaryCall[TRequest,TResponse](TRequest
 
request, ClientInterceptorContext`2 context, AsyncUnaryCallContinuation`2 
continuationCallback)
   at 
Grpc.Core.Interceptors.InterceptingCallInvoker.AsyncUnaryCall[TRequest,TResponse](Method`2
 
method, String host, CallOptions options, TRequest request)
   at 
Grpc.Core.Interceptors.InterceptingCallInvoker.b__4_0[TRequest,TResponse](TRequest
 
req, ClientInterceptorContext`2 ctx)
   at 
Grpc.Core.ClientBase.ClientBaseConfiguration.ClientBaseConfigurationInterceptor.AsyncUnaryCall[TRequest,TResponse](TRequest
 
request, ClientInterceptorContext`2 context, AsyncUnaryCallContinuation`2 
continuation)
   at 
Grpc.Core.Interceptors.InterceptingCallInvoker.AsyncUnaryCall[TRequest,TResponse](Method`2
 
method, String host, CallOptions options, TRequest request)
   at 
Google.Ads.GoogleAds.V3.Services.CustomerService.CustomerServiceClient.ListAccessibleCustomersAsync(ListAccessibleCustomersRequest
 
request, CallOptions options)
   at Google.Api.Gax.Grpc.ApiCall.GrpcCallAdapter`2.CallAsync(TRequest 
request, CallSettings callSettings)
   at Google.Api.Gax.Grpc.ApiCall.GrpcCallAdapter`2.CallSync(TRequest 
request, CallSettings callSettings)
   at 
Google.Api.Gax.Grpc.ApiCallRetryExtensions.<>c__DisplayClass1_0`2.b__0(TRequest
 
request, CallSettings callSettings)
   at 
Google.Ads.GoogleAds.V3.Services.CustomerServiceClientImpl.ListAccessibleCustomers(ListAccessibleCustomersRequest
 
request, CallSettings callSettings)
   at 
Google.Ads.GoogleAds.V3.Services.CustomerServiceClient.ListAccessibleCustomers()

What possibly could be the reason for this?
Thank you.

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@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 the Google Groups 
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/7722167f-dbf6-4aac-abc6-edf28a339b4b%40googlegroups.com.