(500) Internal Server Error - CAMPAIGN_PERFORMANCE_REPORT

166 views
Skip to first unread message

Zweitze

unread,
Dec 8, 2014, 12:37:17 PM12/8/14
to adwor...@googlegroups.com
Hello,

At development of the v201409 migration I noticed this error on a report of type CAMPAIGN_PERFORMANCE_REPORT. The error happened four times in a row (30 seconds interval), and never happened four times in a row on earlier versions.

This is the report:
<?xml version="1.0"?>
<reportDefinition>
  <selector xmlns="https://adwords.google.com/api/adwords/cm/v201409">
    <fields>AccountDescriptiveName</fields>
    <fields>AccountCurrencyCode</fields>
    <fields>AccountTimeZoneId</fields>
    <fields>CampaignId</fields>
    <fields>CampaignName</fields>
    <fields>CampaignStatus</fields>
    <fields>Amount</fields>
    <fields>AdvertisingChannelType</fields>
    <predicates>
      <field>Status</field>
      <operator>IN</operator>
      <values>UNKNOWN</values>
      <values>ENABLED</values>
      <values>PAUSED</values>
      <values>REMOVED</values>
    </predicates>
  </selector>
  <reportName xmlns="https://adwords.google.com/api/adwords/cm/v201409">CampaignInfo_All_Time</reportName>
  <reportType xmlns="https://adwords.google.com/api/adwords/cm/v201409">CAMPAIGN_PERFORMANCE_REPORT</reportType>
  <dateRangeType xmlns="https://adwords.google.com/api/adwords/cm/v201409">ALL_TIME</dateRangeType>
  <downloadFormat xmlns="https://adwords.google.com/api/adwords/cm/v201409">GZIPPED_XML</downloadFormat>
  <includeZeroImpressions xmlns="https://adwords.google.com/api/adwords/cm/v201409">true</includeZeroImpressions>
</reportDefinition>

Our request headers:
Content-Type
application/x-www-form-urlencoded
Authorization
Bearer ya29.1...3Leq25
clientCustomerId
8928384200
developerToken
kNkfox...m9qg_g
skipReportHeader
True
skipReportSummary
True
User-Agent
Adwords API by Maxlead
Host
Content-Length
1445
Expect
100-continue
Accept-Encoding
gzip, deflate

AdWords API Response headers:
X-Content-Type-Options
nosniff
X-Frame-Options
SAMEORIGIN
X-XSS-Protection
1; mode=block
Transfer-Encoding
chunked
Cache-Control
private, max-age=0
Content-Type
text/xml
Date
Mon, 08 Dec 2014 16:38:32 GMT
Expires
Mon, 08 Dec 2014 16:38:32 GMT
Server
GSE

As stated before, this is an exact copy of the report we requested in earlier versions. But there is one small difference, we use flags skipHeaderReport and skipHeaderSummary in this version.

Is v201409 not stable yet?

Thank in advance,
Zweitze de Vries

Zweitze

unread,
Dec 8, 2014, 3:04:30 PM12/8/14
to adwor...@googlegroups.com
I found it. Apparently you cannot use value "UNKNOWN" for a predicate on Status.

But I need those campaigns too. As I recall, when you leave out a predicate on Status, your results may get filtered on certain status values. This happened in the past (remember the 'automatic' filters on creatives etc.) and I never got word that the issue with auto-filters was resolved. So I need to include this predicate.
Mind you, if I add a filter with all predicate values *except* "UNKNOWN", I would assume that campaigns with status "unknown" will be left out from the result. I don't want that.

According to the documentation, "UNKNOWN" is a valid predicate value, and "unknown" is a valid display value. So the documentation is wrong and/or the implementation is wrong.
How do I go on from here? How can I get campaigns with status "unknown"?

Thanks in advance!

Michael Cloonan (AdWords API Team)

unread,
Dec 8, 2014, 3:16:59 PM12/8/14
to adwor...@googlegroups.com
Hello,

Are you consistently getting 500 errors when using UNKNOWN in the predicate? If so, I will file a bug with the team, as even if this is an error case, an HTTP 500 error is not the right way to indicate that.

Regards,
Mike, AdWords API Team

Zweitze

unread,
Dec 9, 2014, 4:26:30 AM12/9/14
to adwor...@googlegroups.com
Yes,

This is happens all the time - reproduction should be no issue. I also found out that groups now have a status "UNKNOWN" as well, and the same problems arise - including the HTTP 500.

Zweitze.

Michael Cloonan (AdWords API Team)

unread,
Dec 9, 2014, 9:15:28 AM12/9/14
to adwor...@googlegroups.com
Hello Zweitze,

I was also able to reproduce this. I will file a bug with the team and let you know when I hear more.

Regards,
Mike, AdWords API Team

Zweitze

unread,
Dec 30, 2014, 6:18:53 AM12/30/14
to adwor...@googlegroups.com
Any progress?

Michael Cloonan (AdWords API Team)

unread,
Dec 30, 2014, 9:08:14 AM12/30/14
to adwor...@googlegroups.com
Hello Zweitze,

I haven't heard anything back yet. I will follow up with the team again to check their progress.

Regards,
Mike, AdWords API Team

Oliver

unread,
Dec 31, 2014, 3:56:51 AM12/31/14
to adwor...@googlegroups.com
Sorry to hijack this thread, but what is the semantic of the status 'unknown'?  Under what conditions can an adgroup or a campaign have such a status?

Oliver

Michael Cloonan (AdWords API Team)

unread,
Jan 5, 2015, 9:18:23 AM1/5/15
to adwor...@googlegroups.com
Hello Oliver,

The 'UNKNOWN' status simply means that it doesn't fit into any other available status. This could happen for a variety of reasons, but should be generally rare and mostly treated as a strange error/corner case. To my knowledge you shouldn't be able to intentionally create items with this status.

Regards,
Mike, AdWords API Team

Michael Cloonan (AdWords API Team)

unread,
Jan 8, 2015, 4:09:30 PM1/8/15
to adwor...@googlegroups.com
Hello Zweitze,

If you know of any campaigns or ad groups that have the 'UNKNOWN' status in your account, can you please provide me their IDs so that the engineering team can take a closer look? If you aren't aware of any specific items, then you should be safe leaving out the predicate on 'UNKNOWN' values, which would hopefully solve the issue.

Regards,
Mike, AdWords API Team

Zweitze

unread,
Jan 12, 2015, 7:11:09 AM1/12/15
to adwor...@googlegroups.com
Well, I'm curious about those campaigns too. Note that current implementation prevents me from getting them, so, I cannot get those campaigns.

Anyway, take 279-999-6021. It has a video campaign. Now, leaving out the predicate on status UNKNOWN means that all campaigns except the video campaign is returned. So I assume that with UNKNOWN I will get those campaigns.

Further you suggest to leave out that particular status in the predicate. Indeed we do that now, but we like to make sure we get everything.


Thanks!

Michael Cloonan (AdWords API Team)

unread,
Jan 12, 2015, 8:34:35 AM1/12/15
to adwor...@googlegroups.com
Hello Zweitze,

Those campaigns will not return at all, even if you were able to return campaigns with an UNKNOWN status. Currently, the Adwords API does not support video campaigns, which means that those results are also excluded from reporting. If you don't filter on Status at all, then you will get all results from all statuses.

I'll follow up on the bug I filed to try to get a more useful error message for this case, but you should be able to just remove that predicate and things will work fine.

Regards,
Mike, AdWords API Team

Zweitze

unread,
Feb 4, 2015, 10:41:45 AM2/4/15
to adwor...@googlegroups.com
Michael,

First, the 500-error still appears when you include UNKNOWN in the predicate. It appears that nothing is changed.

Second, according to the docs, when the software is using an "old" version of the API, the API may return UNKNOWN. So, in my understanding UNKNOWN is used for all campaigns that are not supported by the API. So I would think that in the future the API will report campaigns not supported by this version, but only with status UNKNOWN. If that is not the case, how should I interprete the statement in the docs?

Third, you suggest not to set a filter to get all statuses. However, multiple times we've seen issues where *not* including a status on all values results in inclompete reports - usually deleted items were left out. Even AdWords API Team members suggest to always include a predicate filtering on all possible status values.
Well, that was the past and now you suggest a completely different approach. Is this a recent change? Do you know an article on the Developer blog confirming this new behaviour?

Thanks in advance!

Michael Cloonan (AdWords API Team)

unread,
Feb 4, 2015, 11:16:28 AM2/4/15
to adwor...@googlegroups.com
Hello Zweitze,

Indeed, nothing has changed. Trying to filter on UNKNOWN is an intentional error case. I have asked them to change the HTTP code to something more meaningful, but they have not implemented such a change yet.

No useful results will be in the UNKNOWN status. The "incompatibility with your WSDL version" does not mean from an older version of the API, but rather something that doesn't fit into the API framework at all. These are not meaningful to users. It is there as a precaution only, just in case something goes wrong. We double-checked the existence of any such items when you brought up this issue. You needn't worry yourself with the UNKNOWN status.

I haven't ever seen results being left out because you didn't use a filter. You can still filter on all statuses other than UNKNOWN, but in practice, filtering on all values should have the same practical effect as not having a filter at all. If you are able to reliably produce results that act otherwise, I will gladly forward your findings to the team so they can investigate and fix the cause of the discrepancy.

Regards,
Mike, AdWords API Team

Zweitze

unread,
Feb 19, 2015, 11:08:39 AM2/19/15
to adwor...@googlegroups.com
Michael,

You wrote

"I haven't ever seen results being left out because you didn't use a filter."

This has been reported quite a few times.
Example (ads)
Another example

In the last example, see the response of Eric Koleda, representing the AdWords API team:
"My understanding was that the report always behaved this way, which is how the AdGroupAdService also behaves.  You will need to add a predicate for Status IN (ENABLED, PAUSED, DISABLED) to retrieve all ads."

Similar problems with the CRITERIA_PERFORMANCE_REPORT and/or PLACEMENT_PERFORMANCE_REPORT were also mentioned in this forum.

So the word is: when you do not include a predicate on status, you may not get all items you are interested in. As a result, quite a few developers started to include predicates for all statusses in their report requests - with such a predicate on all statusses, one would always get everything. (Really, I'm not alone. Just scan for report requests in topics, an amazing amount has predicates on all statusses.)

Hence my question for a more official announcement that it is no longer necessary to put a predicate on a status to turn of that auto-filtering.


Regards,
Zweitze.

Michael Cloonan (AdWords API Team)

unread,
Feb 19, 2015, 11:22:52 AM2/19/15
to adwor...@googlegroups.com
Hello Zweitze,

I apologize; I was incorrect. You do currently have to explicitly include certain statuses in order to retrieve them in certain reports. We are working on a fix for this, however, which led to my confusion.

In any case, the UNKNOWN status is never useful; you cannot filter on it, but that is fine because you will never get any meaningful result in that status.

Regards,
Mike, AdWords API Team
Reply all
Reply to author
Forward
0 new messages