Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Index ignores unsupported sizes, bid manager still expects bid response #1341

Closed
dmitriyshashkin opened this issue Jun 30, 2017 · 4 comments · Fixed by #1406 or #1487
Closed

Index ignores unsupported sizes, bid manager still expects bid response #1341

dmitriyshashkin opened this issue Jun 30, 2017 · 4 comments · Fixed by #1406 or #1487
Labels

Comments

@dmitriyshashkin
Copy link
Contributor

Type of issue

Bug

Description

bidsBackAll method in bidmanager compares the number of requests with the number of responses. As indexExchange issues a response for every size in the ad unit, bidsBackAll counts all the sizes to determine the number of requests. But if some size is not supported by indexExchange, it will be ignored inside the adapter and there won't be any response for this size. So the number of requests will always exceed the number of responses. Which means that the only condition on which the auction ends is the timeout.

Not sure what's the best way to fix that. As a temporary measure, I've modified the bidmanager to count only those sizes that are supported by Index Exchange. But I had to copy the list of supported sizes to bidmanager and it doesn't seem to be a good practice. But if it's ok, I can submit my fix as a PR.

Steps to reproduce

  1. Set up an ad unit with two sizes: [300, 250] and [300, 610]
  2. Add indexExchange as the only bidder to this ad unit
  3. Setup a lengthy timeout, say, 10 seconds
  4. Request the bids

Expected results

Auction ends as soon as response from indexExchange is received

Actual results

Auction ends only after 10 seconds

Platform details

prebid v 0.25

@ptomasroos
Copy link
Contributor

There is some custom code for this already in here, can probably be fixed in a similar way?

return bid.bidder === 'indexExchange'
? bid.sizes.length
: 1;
}).reduce(add, 0);
const received = $$PREBID_GLOBAL$$._bidsReceived.filter(bid => bid.adUnitCode === adUnitCode).length;
return requested === received;
}
function add(a, b) {
return a + b;
}
function bidsBackAll() {
const requested = $$PREBID_GLOBAL$$._bidsRequested
.map(request => request.bids)
.reduce(flatten, [])
.filter(adUnitsFilter.bind(this, $$PREBID_GLOBAL$$._adUnitCodes))
.map(bid => {
return bid.bidder === 'indexExchange'

@mkendall07
Copy link
Member

@indexexchange should adjust their adapter to send bid responses back so we can get rid of the workaround in that bit of the code.

@michaelharris2
Copy link
Contributor

Hi. We're looking into this and will have a fix out shortly.

@mkendall07
Copy link
Member

Since this is fixed, we need to drop this https://github.com/prebid/Prebid.js/blob/master/src/bidmanager.js#L52 now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
5 participants