UAC Campaign create ad failed with error: The error code is not in this version.

44 views
Skip to first unread message

jin gang

unread,
Jun 23, 2020, 5:19:34 AM6/23/20
to AdWords API and Google Ads API Forum
Hi,

    I create uac campaigns using google ads api v2. I found that some of assets may cause the create_ad failed with message below.

    And I query the detail info of the failed-asset, the image url of the asset is OK, no error or weird stuff found. Could anyone to help me? Thx.


     Request with ID "9PAXX_a3mVXF4meoQCePhA" failed with status "INVALID_ARGUMENT" and includes the following errors:
Error with message "The error code is not in this version.".
On field: operations
On field: create
On field: ad
On field: app_ad
On field: images
On field: asset

Google Ads API Forum Advisor Prod

unread,
Jun 23, 2020, 2:42:56 PM6/23/20
to gang...@newsbreak.com, adwor...@googlegroups.com
Hi Jin,

Thanks for reaching out. The error you are encountering INVALID_ARGUMENT, based from the description, means that you are missing is required in one of your operations. Could you please share the complete detailed request and response logs of the call via Reply privately to the author so that I can further investigate the issue.You can find information on enabling logging in the ReadMe of your Client library.

Thanks,
Nirmita Patel Google Ads Team

ref:_00D1U1174p._5004Q218eEV:ref

Gang JIN

unread,
Jun 24, 2020, 12:45:42 AM6/24/20
to Google Ads API Forum Advisor Prod, adwor...@googlegroups.com
Thank your for reply. Finally I found a error said that : unpublished_error_code: “ImageError.IMAGE_CONSTRAINTS_VIOLATED”

I want to know how I can handle this error or could I filter these bad image assets before creating ad?

Thank you very much!!

The whole debug info as follows:

Method: /google.ads.googleads.v2.services.AdGroupAdService/MutateAdGroupAds
Headers: {
  "developer-token": "REDACTED",
  "login-customer-id": "4195662382",
  "x-goog-api-client": "gl-python/3.7.1 grpc/1.30.0 gax/1.21.0 gapic/5.1.0",
  "x-goog-request-params": "customer_id=6462904560"
}
Request: customer_id: "6462904560"
operations {
  create {
    status: ENABLED
    ad_group {
      value: "customers/6462904560/adGroups/104893913684"
    }
    ad {
      app_ad {
        headlines {
          text {
            value: "Over 25 million readers."
          }
        }
        headlines {
          text {
            value: "Best for St. Clair news."
          }
        }
        headlines {
          text {
            value: "Stay informed St. Clair."
          }
        }
        headlines {
          text {
            value: "St. Clair crime alert."
          }
        }
        descriptions {
          text {
            value: "St. Clair County News"
          }
        }
        descriptions {
          text {
            value: "Trusted by Millions"
          }
        }
        descriptions {
          text {
            value: "Best Local News App"
          }
        }
        descriptions {
          text {
            value: "Your Neighborhood News"
          }
        }
        images {
          asset {
            value: "customers/6462904560/assets/9067412701"
          }
        }
      }
    }
  }
}


Response
-------
Headers: {
  "google.ads.googleads.v2.errors.googleadsfailure-bin": "\n\u0001\n\u0003\u0002\u0001\u0012&The error code is not in this version.\u001a\u0002*\u0000\"?\u0012\u000e\n\noperations\u0012\u0000\u0012\b\n\u0006create\u0012\u0004\n\u0002ad\u0012\b\n\u0006app_ad\u0012\n\n\u0006images\u0012\u0000\u0012\u0007\n\u0005asset*'\n%ImageError.IMAGE_CONSTRAINTS_VIOLATED",
  "grpc-status-details-bin": "\b\u0003\u0012%Request contains an invalid argument.\u001a\u0001\nCtype.googleapis.com/google.ads.googleads.v2.errors.GoogleAdsFailure\u0012\u0001\n\u0001\n\u0003\u0002\u0001\u0012&The error code is not in this version.\u001a\u0002*\u0000\"?\u0012\u000e\n\noperations\u0012\u0000\u0012\b\n\u0006create\u0012\u0004\n\u0002ad\u0012\b\n\u0006app_ad\u0012\n\n\u0006images\u0012\u0000\u0012\u0007\n\u0005asset*'\n%ImageError.IMAGE_CONSTRAINTS_VIOLATED",
  "request-id": "AlcXN2uh1SEehK1WkFVOZQ"
}
Fault: errors {
  error_code {
    image_error: UNKNOWN
  }
  message: "The error code is not in this version."
  trigger {
    string_value: ""
  }
  location {
    field_path_elements {
      field_name: "operations"
      index {
      }
    }
    field_path_elements {
      field_name: "create"
    }
    field_path_elements {
      field_name: "ad"
    }
    field_path_elements {
      field_name: "app_ad"
    }
    field_path_elements {
      field_name: "images"
      index {
      }
    }
    field_path_elements {
      field_name: "asset"
    }
  }
  details {
    unpublished_error_code: "ImageError.IMAGE_CONSTRAINTS_VIOLATED"
  }
}


WARNING:google.ads.google_ads.client:Request made: ClientCustomerId: 6462904560, Host: googleads.googleapis.com:443, Method: /google.ads.googleads.v2.services.AdGroupAdService/MutateAdGroupAds, RequestId: AlcXN2uh1SEehK1WkFVOZQ, IsFault: True, FaultMessage: The error code is not in this version.
Request with ID "AlcXN2uh1SEehK1WkFVOZQ" failed with status "INVALID_ARGUMENT" and includes the following errors:
        Error with message "The error code is not in this version.".
                On field: operations
                On field: create
                On field: ad
                On field: app_ad
                On field: images
                On field: asset

jin gang

unread,
Jun 24, 2020, 4:19:56 AM6/24/20
to AdWords API and Google Ads API Forum
Bug fixed, the image size is over 150kb, so I have to resize it smaller than 150kb, for now everything works well. 
Thank~
Reply all
Reply to author
Forward
0 new messages