bidResponse and bidAdjustment called but pbjs.getBidResponses is empty
Type of issue
bidResponse and bidAdjustment called but pbjs.getBidResponses is empty. (it shouldn't be at this point)
Description
I've set up one bidder, and there is a bid response, I've set up a bidResponse event to call a timeout when all the bids are returned, in this case 1 bid only. but after the time out, when I am querying pbjs.getBidResponses or pbjs.getHighestCpmBids(); they are both empty. they should be filled with the bidder response.
Steps to reproduce
- create an example HTML with one bidder
call
pbjs.onEvent('bidResponse', function(a){ currentBidCount++; if (currentBidCount === adUnitNumer){ console.log(pbjs.getBidResponses()); } });
please include a more complete example and include what prebid.js version you are using.
full html example: (using the newest prebid version 0.34)
<script type='text/javascript'>
var pbjs = pbjs || {}; pbjs.que = pbjs.que || [];
var adUnits = [{code:"test","sizes":[[300,250]],bids:
[
{"bidder":"lifestreet","params":{"jstag_url":"//ads.lfstmedia.com/getad?site=267101","slot":"slot128345","adkey":"faf","ad_size":"300x250"}}
]
}];
</script>
<script type="text/javascript" src="prebid.js" async></script>
<script>
pbjs.que.push(function() {
pbjs.addAdUnits(adUnits);
pbjs.onEvent('bidResponse', function(a){
console.log(pbjs.getBidResponses());
});
pbjs.onEvent('bidAdjustment', function(a){
console.log(pbjs.getBidResponses());
});
pbjs.requestBids({
bidsBackHandler: sendAdserverRequest
});
});
function sendAdserverRequest() {
if (pbjs.adserverRequestSent) return;
pbjs.adserverRequestSent = true;
console.log(pbjs.getBidResponses());
}
</script>
<body>
</body>
while logging pbjs.getBidResponses we should get the bid response that was returned, but the dict is empty.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.