googleads / google-ads-php

Google Ads API Client Library for PHP
https://developers.google.com/google-ads/api/docs/client-libs/php
Apache License 2.0
295 stars 262 forks source link

Failed to parse binary descriptor : getting error. #851

Closed Anil-Chaudhary-netclues closed 1 year ago

Anil-Chaudhary-netclues commented 2 years ago

Hello Team,

We are getting error and i have try many but i am not able to fix them. Can you please let us know what is the exact issue about this error.

PHP version: 7.4 Laravel version : 6 Google Ads API Version: 11

Please find attached screenshot for more info. Attachment: https://user-images.githubusercontent.com/53938165/198531871-881d8677-8818-4447-843c-b2475969f412.png

fiboknacky commented 2 years ago

Could you please share log files? See this section for the details on how to turn the logging on.

Anil-Chaudhary-netclues commented 2 years ago

See [this section] for the details on how to turn the logging on. -Means Which one [this section] can you please send me link.

Anil-Chaudhary-netclues commented 2 years ago

I have update some package and upload code on demo now and getting another error like below: cURL error 6: Could not resolve host: https (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)

fiboknacky commented 2 years ago

Apology. I've updated the link. From your error, however, it looks like you have a problem with the connection. If you run this via containers, you may need to consult the service or the container provider.

I'd recommend you run this locally first to identify the root cause. If it is an issue of using this library, then I can provide help properly. Could you try doing so by following this section?

Anil-Chaudhary-netclues commented 2 years ago

Hi,

I have many try but still not fixed the issue in local and demo server both the place getting same error.

Can you please help me about this issue. How can i fix them and move on...

Error Below: cURL error 6: Could not resolve host: https (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)

i have all the try from Google but nothing is working.

fiboknacky commented 2 years ago

Could you elaborate in detail how you followed the steps I mentioned above?

Anil-Chaudhary-netclues commented 2 years ago

Yes, i have follow all the step but according to my Laravel Project version 6 existing project.

fiboknacky commented 2 years ago

I'm sorry but did you try running GetCampaigns without using Laravel?

Anil-Chaudhary-netclues commented 2 years ago

php examples/BasicOperations/GetCampaigns.php --customerId

I have to run this in the command line interface ?

fiboknacky commented 2 years ago

Yes, that's what I asked you to do by following all the steps including that one.

Anil-Chaudhary-netclues commented 2 years ago

i think i have to setup project with PHP core and then try this one Right ?
anyway to check this file in laravel ?

Anil-Chaudhary-netclues commented 2 years ago

i have run get campaigns file in laravel and that goes to "public static function runExample(GoogleAdsClient $googleAdsClient, int $customerId)' function after that goes to this one. $stream = $googleAdsServiceClient->searchStream($customerId, $query) function of vender file goes to this E:\wamp64\www\laravel-googleads\vendor\googleads\google-ads-php\src\Google\Ads\GoogleAds\V11\Services\Gapic\GoogleAdsServiceGapicClient.php of 'startCall' function and getting error like below

cURL error 6: Could not resolve host: https (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)

fiboknacky commented 2 years ago

Could you try all the steps I asked first, so we can identify where the problem lies? Without that, it'd be hard to help resolve the issue. Thank you.

Anil-Chaudhary-netclues commented 2 years ago

Hi,

I have setup everything and now i am getting something different error. Can you please let me know how can we fix them. Error below: DNS resolution failed for https:\/\/googleads.googleapis.com\/: UNKNOWN: Servname not supported for ai_socktype unknown

fiboknacky commented 2 years ago

In what line of GetCampaigns did you get this error?

Anil-Chaudhary-netclues commented 2 years ago

when submit requests and that does not end and continues adding log in the file.log file

Here are the details of the log file details below:

we are still getting same error like below one:

[2022-11-03T12:20:57.932898+00:00] google-ads.WARNING: Request made: Host: "https://googleads.googleapis.com/", Method: "/google.ads.googleads.v11.services.GoogleAdsService/Search", CustomerId: 6628345195, RequestId: "", IsFault: 1, FaultMessage: "None"
[2022-11-03T12:20:57.933291+00:00] google-ads.NOTICE: Request

Method Name: /google.ads.googleads.v11.services.GoogleAdsService/Search Host: https://googleads.googleapis.com/ Headers: { "x-goog-api-client": "gl-php\/7.4.32 gccl\/17.0.0 gapic\/17.0.0 gax\/1.17.0 grpc\/1.50.0 rest\/1.17.0 pb\/3.21.9+c", "x-goog-request-params": "customer_id=6628345195", "developer-token": "REDACTED", "login-customer-id": "8980743068" } Request: {"customerId":"6628345195","query":"SELECT customer.id FROM customer WHERE metrics.impressions > 0 AND segments.date DURING LAST_MONTH LIMIT 100","pageSize":20,"returnTotalResultsCount":true}

Response

Headers: []

Fault

Status code: 14 Details: DNS resolution failed for https://googleads.googleapis.com/: UNKNOWN: Servname not supported for ai_socktype Failure: {}


Please help me with this. How can we fix this. we are working with testing Google Ads accounts.

Anil-Chaudhary-netclues commented 2 years ago

Hi Dear,

Any Update about this. I am waiting for your response. Please help me about this issue.

fiboknacky commented 2 years ago

The query of GetCampaigns is SELECT campaign.id, campaign.name FROM campaign ORDER BY campaign.id.

Could you confirm if you modify that line when you run it?

And did you install grpc as we suggest in Requirements? I ask because based on your log, it seems rest is used instead.

Anil-Chaudhary-netclues commented 2 years ago

please find above image where i have print as i am receiving last data from api. image

Here,. you can find a code where not work in the last step of for loop of "$stream->iterateAllElements()" getting error here. untile that work fine. image

Anil-Chaudhary-netclues commented 2 years ago

that also work on POSTMAN. image

also, work with PHP - curl url through but NOT working with PHP Client Library. i think any server configuration is not proper but we are not able to what is exact issue. can you please let me know what need to do then it will be fix. we have to do anything on the SERVER ? if this is SERVER related issue and if Yes then how can we fix ?

fiboknacky commented 2 years ago

Could you please step back and follow what I asked you to do in this comment? I think there might be a problem with your settings of Laravel, but we cannot be sure until you really follow those steps and run GetCampaigns from the command line as I asked before. So far, it looks like you try to modify the code inside Laravel, which complicates things and makes it hard for us to troubleshoot.

If you can cooperate doing so, we might be able to get a solution faster. Thank you.

fiboknacky commented 1 year ago

Closing due to inactivity.