Batch processing TextAds resulting in BatchJobProcessingError.FILE_FORMAT_ERROR

90 views
Skip to first unread message

Alan Coleman

unread,
Apr 11, 2016, 4:25:13 AM4/11/16
to AdWords API Forum
Hello everyone,

I'm migrating from MutateJobService to BatchJobService and to get started am experimenting with a test account and a script derived from v201601\CampaignManagement\AddKeywordsUsingIncrementalBatchJob.php

I can add batches of Keywords and Negative Keywords no problem.

However when I attempt to add a batch of TextAds I'm being returned the following error, which would indicate an issue with the input file.

Processing error [0]: errorType=BatchJobProcessingError, trigger=, errorString=BatchJobProcessingError.FILE_FORMAT_ERROR, fieldPath=, reason=FILE_FORMAT_ERROR

I'm building my TextAd in the usual fashion, but I don't know what I'm doing to disturb the file formatting.

I've output the upload request created in BatchJobUtils.php (see below - XML Opened up for viewing purposes) but can't see anything wrong with the XML Formatting.

Any help would be appreciated.

Many thanks

array (size=3)
  'headers' => 
    array (size=3)
      'Content-Type' => string 'application/xml' (length=15)
      'Content-Length' => int 1120
      'Content-Range' => string 'bytes 0-1119/1120' (length=17)
  'body' => string '<?xml version="1.0" encoding="UTF-8"?>
   <operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:AdGroupCriterionOperation">
      <operand xsi:type="ns1:AdGroupAd">
         <adGroupId>***</adGroupId>
         <ad xsi:type="ns1:TextAd">
            <headline>Mars570b5c9b812a4-0</headline>
            <description1>Visit the Red Planet.</description1>
            <description2>Low-gravity fun!</description2>
            <displayUrl>www.example.com</displayUrl>
            <finalUrls>http://www.example.com</finalUrls>
         </ad>
         <status>ENABLED</status>
      </operand>
      <operator>ADD</operator>
   </operations>
   <operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:AdGroupCriterionOperation">
      <operand xsi:type="ns1:AdGroupAd">
         <adGroupId>***</adGroupId>
         <ad xsi:type="ns1:TextAd">
            <headline>Mars570b5c9b812a4-1</headline>
            <description1>Visit the Red Planet.</description1>
            <description2>Low-gravity fun!</description2>
            <displayUrl>www.example.com</displayUrl>
            <finalUrls>http://www.example.com</finalUrls>
         </ad>
         <status>ENABLED</status>
      </operand>
      <operator>ADD</operator>
   </operations>
</ns1:mutate>' (length=1120)
  'length' => int 1120


Yin Niu

unread,
Apr 11, 2016, 10:07:47 AM4/11/16
to AdWords API Forum
Hi, 

Could you please send SOAP request and response log, so that we can investigate further? Please click Reply privately to author when responding. 

Thanks, 
Yin, AdWords API Team. 

Nadine Sundquist (AdWords API Team)

unread,
Apr 11, 2016, 3:13:24 PM4/11/16
to AdWords API Forum
Hi Alan,

Thank you for providing those additional logs. You're adding an AdGroupAd as the operation, but the operations tag says that the type is AdGroupCriterionOperation. I think you'll want to change that to AdGroupAdOperation

<operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:AdGroupCriterionOperation">

If that's within your own code, please try changing that type. If the issue is in the client library, then please file an issue on PHP's Ads client library GitHub.

Thanks,
Nadine, AdWords API Team
Reply all
Reply to author
Forward
0 new messages