Insideall / dfp-prebid-lineitems

A PHP script to setup and update your Prebid Line Items in DFP
19 stars 11 forks source link

Getting error CommonError.CANNOT_UPDATE @ lineItem[0].orderId; #3

Open adRUPT opened 6 years ago

adRUPT commented 6 years ago

Hello,

When I run php script/hb/HeaderBiddingCreationWithoutSSP.php i get the error CommonError.CANNOT_UPDATE @ lineItem[0].orderId;

My SOAP is below. Not sure what the issue might be. Do I ned to use an older API version?

da80f94b6231da57dffe324e0f021db6242soap:Server[CommonError.CANNOT_UPDATE @ lineItem[0].orderId; trigger:'XXXXXXXXXX'][CommonError.CANNOT_UPDATE @ lineItem[0].orderId; trigger:'XXXXXXXXXX']lineItem[0].orderIdlineItem0orderIdXXXXXXXXXXCommonError.CANNOT_UPDATECANNOT_UPDATE Thanks
adRUPT commented 6 years ago

This only happens when I try to run without the SSP set, using php script/hb/HeaderBiddingCreationWithoutSSP.php

gchicoye commented 6 years ago

Hi, I will have a look on it on Wednesday, I’m traveling currently, sorry about this!

Gabriel

Le lun. 20 août 2018 à 22:38, adRUPT notifications@github.com a écrit :

This only happens when I try to run without the SSP set, using php script/hb/HeaderBiddingCreationWithoutSSP.php

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Insideall/dfp-prebid-lineitems/issues/3#issuecomment-414455123, or mute the thread https://github.com/notifications/unsubscribe-auth/AVSqWGyx8-Bp26El69faeUYVc5DRT0XFks5uSx5ZgaJpZM4WDSIF .

gchicoye commented 6 years ago

Hi, at what stage of the process does this error occur? Can you provide me the complete log?

adRUPT commented 6 years ago

Hi, Thank you for following up here. It looks like it fails on the line item creation service

[2018-08-20 20:38:26] DFP_SOAP.INFO: networkCode=59900373 service=NetworkService method=getCurrentNetwork responseTime=68 requestId=90b1af395e5dc23537d3557f72f075b7 server=ads.google.com isFault=0 faultMessage=  
rootAdUnitId: 58900493
[2018-08-20 20:38:28] DFP_SOAP.INFO: networkCode=59900373 service=LineItemService method=getLineItemsByStatement responseTime=261 requestId=f6de19b5648babe0994964b8eb43542f server=ads.google.com isFault=0 faultMessage=  
[2018-08-20 20:38:28] DFP_SOAP.WARNING: networkCode=59900373 service=LineItemService method=updateLineItems responseTime=273 requestId=c5fc210d3bb42aaa8d96813ac7cc3b69 server=ads.google.com isFault=1 faultMessage=[CommonError.CANNOT_UPDATE @ lineItem[0].orderId; trigger:'2373912608']  
[2018-08-20 20:38:28] DFP_SOAP.NOTICE: POST /apis/ads/publisher/v201802/LineItemService?wsdl HTTP/1.1
Host: ads.google.com
Connection: close
User-Agent: PHP-SOAP/7.1.16
Content-Type: text/xml; charset=utf-8
SOAPAction: ""
Content-Length: 2201
Authorization: REDACTED

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://www.google.com/apis/ads/publisher/v201802" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SOAP-ENV:Header><ns1:RequestHeader><ns1:networkCode>59900373</ns1:networkCode><ns1:applicationName>Prebid Line Creator (DfpApi-PHP, googleads-php-lib/36.0.0, PHP/7.1.16)</ns1:applicationName></ns1:RequestHeader></SOAP-ENV:Header><SOAP-ENV:Body><ns1:updateLineItems><ns1:lineItems><ns1:orderId>2373912608</ns1:orderId><ns1:id>4771977832</ns1:id><ns1:name>Prebid_1.00</ns1:name><ns1:startDateTime><ns1:date><ns1:year>2018</ns1:year><ns1:month>8</ns1:month><ns1:day>19</ns1:day></ns1:date><ns1:hour>22</ns1:hour><ns1:minute>9</ns1:minute><ns1:second>0</ns1:second><ns1:timeZoneID>America/New_York</ns1:timeZoneID></ns1:startDateTime><ns1:unlimitedEndDateTime>true</ns1:unlimitedEndDateTime><ns1:creativeRotationType>EVEN</ns1:creativeRotationType><ns1:lineItemType>PRICE_PRIORITY</ns1:lineItemType><ns1:priority>12</ns1:priority><ns1:costPerUnit><ns1:currencyCode>USD</ns1:currencyCode><ns1:microAmount>1000000</ns1:microAmount></ns1:costPerUnit><ns1:costType>CPM</ns1:costType><ns1:creativePlaceholders><ns1:size><ns1:width>300</ns1:width><ns1:height>250</ns1:height><ns1:isAspectRatio>false</ns1:isAspectRatio></ns1:size></ns1:creativePlaceholders><ns1:creativePlaceholders><ns1:size><ns1:width>728</ns1:width><ns1:height>90</ns1:height><ns1:isAspectRatio>false</ns1:isAspectRatio></ns1:size></ns1:creativePlaceholders><ns1:allowOverbook>true</ns1:allowOverbook><ns1:primaryGoal><ns1:goalType>NONE</ns1:goalType></ns1:primaryGoal><ns1:targeting><ns1:inventoryTargeting><ns1:targetedAdUnits><ns1:adUnitId>58900493</ns1:adUnitId><ns1:includeDescendants>true</ns1:includeDescendants></ns1:targetedAdUnits></ns1:inventoryTargeting><ns1:customTargeting><ns1:logicalOperator>OR</ns1:logicalOperator><ns1:children xsi:type="ns1:CustomCriteria"><ns1:keyId>11775026</ns1:keyId><ns1:valueIds>447975064036</ns1:valueIds><ns1:operator>IS</ns1:operator></ns1:children></ns1:customTargeting></ns1:targeting></ns1:lineItems></ns1:updateLineItems></SOAP-ENV:Body></SOAP-ENV:Envelope>

HTTP/1.1 500 Internal Server Error
Content-Type: text/xml; charset=UTF-8
Date: Mon, 20 Aug 2018 20:37:59 GMT
Expires: Mon, 20 Aug 2018 20:37:59 GMT
Cache-Control: private, max-age=0
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Server: GSE
Alt-Svc: quic=":443"; ma=2592000; v="44,43,39,35"
Accept-Ranges: none
Vary: Accept-Encoding
Connection: close

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Header><ResponseHeader xmlns="https://www.google.com/apis/ads/publisher/v201802"><requestId>c5fc210d3bb42aaa8d96813ac7cc3b69</requestId><responseTime>273</responseTime></ResponseHeader></soap:Header><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>[CommonError.CANNOT_UPDATE @ lineItem[0].orderId; trigger:'2373912608']</faultstring><detail><ApiExceptionFault xmlns="https://www.google.com/apis/ads/publisher/v201802"><message>[CommonError.CANNOT_UPDATE @ lineItem[0].orderId; trigger:'2373912608']</message><errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CommonError"><fieldPath>lineItem[0].orderId</fieldPath><fieldPathElements><field>lineItem</field><index>0</index></fieldPathElements><fieldPathElements><field>orderId</field></fieldPathElements><trigger>2373912608</trigger><errorString>CommonError.CANNOT_UPDATE</errorString><reason>CANNOT_UPDATE</reason></errors></ApiExceptionFault></detail></soap:Fault></soap:Body></soap:Envelope>

Fatal error: Uncaught Google\AdsApi\Dfp\v201802\ApiException: [CommonError.CANNOT_UPDATE @ lineItem[0].orderId; trigger:'2373912608'] in /htdocs/subDirectory/prebid/line-test/dfp-prebid-lineitems/vendor/googleads/googleads-php-lib/src/Google/AdsApi/Common/Util/Reflection.php:43
Stack trace:
#0 /htdocs/subDirectory/prebid/line-test/dfp-prebid-lineitems/vendor/googleads/googleads-php-lib/src/Google/AdsApi/Common/Util/Reflection.php(43): ReflectionClass->newInstanceArgs(Array)
#1 /htdocs/subDirectory/prebid/line-test/dfp-prebid-lineitems/vendor/googleads/googleads-php-lib/src/Google/AdsApi/Common/AdsSoapClient.php(202): Google\AdsApi\Common\Util\Reflection->createInstance('Google\\AdsApi\\D...', Array)
#2 /htdocs/subDirectory/prebid/line-test/dfp-prebid-lineitems/vendor/googleads/googleads-php-lib/src/Google/AdsApi/Common/AdsSoapClient.php(164): Google\AdsApi\Common\AdsSoapClient->parseApiExceptionFromSoapFault(Object(SoapFault))
#3 /ht in /htdocs/subDirectory/prebid/line-test/dfp-prebid-lineitems/vendor/googleads/googleads-php-lib/src/Google/AdsApi/Common/Util/Reflection.php on line 43
adRUPT commented 6 years ago

Hi @gchicoye wanted to follow up here.