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

Google Ads failure details: collection_size_error: Too few. #599

Closed divyeshgajja closed 3 years ago

divyeshgajja commented 3 years ago

Hello everyone, i am facing some error when i am trying to create adgroup .

ERROR: Google Ads failure details: collection_size_error: Too few.

i dont know why? can you guys please tell me how to solve this.

fiboknacky commented 3 years ago

Could you please ask in this forum? Chances are you've specified something wrong in the request. Experts on the forum will help you identify what's wrong based on your log. Thanks.

divyeshgajja commented 3 years ago

I am facing some warning .

proto descriptor was previously loaded (included in multiple metadata bundles?): google/ads/googleads/v6/common/custom_parameter.proto [ROOT/plugins/googleads/metadata/Google/Ads/GoogleAds/V6/Resources/AdGroup.php, line 180]

How to solve this warning.

Please tell me.

Thanks, Divyesh

On 24-May-2021, at 4:35 PM, Thanet Knack Praneenararat @.***> wrote:

Could you please ask in this forum https://groups.google.com/g/adwords-api? Chances are you've specified something wrong in the request. Experts on the forum will help you identify what's wrong based on your log. Thanks.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/googleads/google-ads-php/issues/599#issuecomment-846967086, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARRKMPHD4PMROA3WENIP273TPIXIVANCNFSM45KNIAXQ.

PierrickVoulet commented 3 years ago

Hi @divyeshgajja - An issue is already opened for this particular problem, see #540.

adamgen commented 2 years ago

I had a similar problem when I was sending this request:

{
    "status": "ENABLED",
    "resource_name": "customers/1310914546/adGroupAds/138411489117~-1",
    "ad": {
         // ... ad data...
    }
}

I got thie error:

{
  "errors": [
    {
      "error_code": {
        "collection_size_error": "TOO_FEW"
      },
      "message": "Too few.",
      "location": {
        "field_path_elements": [
          {
            "field_name": "operations",
            "index": 0
          },
          {
            "field_name": "create"
          },
          {
            "field_name": "ad"
          },
          {
            "field_name": "responsive_display_ad"
          }
        ]
      }
    }
  ],
  "request_id": "mgwfdaAiCjDqvtX71qFfSQ"
}

I've contacted the adwords forum as @fiboknacky recommanded and they were fast and helpful.

In my case, it was because my resource_name ended with a -1 and such endings were saved for mutations and batch requests. Replacing the resource_name with an ad_group with a correct path resolved it for me.