Prebid.js icon indicating copy to clipboard operation
Prebid.js copied to clipboard

Adform - No Handling for "No-Bid" Response

Open nickjacob opened this issue 10 years ago • 3 comments

Type of issue

Bug in Adform Adapter

Description

Adform's "adx" header bidding endpoint returns no response body when no bid is present:

screen shot 2016-11-14 at 9 50 50 am

This means that when no bid is present, prebid cannot call the bidsBackHandler before the timeout, since we aren't aware of the "nobid" response from adform (the bids are missing)

Steps to reproduce

  1. Call adform adapter
  2. Receive nobid (eg., on low-value/US traffic, with no cookies)
  3. observe no response body

Expected results

If adform response with no body/callback, we should create status "2" bid responses for each bid that we requested

Actual results

There is no response so the adform JSONP callback is not called

Platform details

All versions of adform adapter/all platforms

Other information

This may have to be solved by setting a timeout after script load, which will be cancelled by succesful execution of the callback, eg:

// in callbids, reset "global" variable
adformLoaded = false;

// on line 46 in adform adapter
adloader.loadScript(request.join('&'), () => {
  setTimeout(() => {
    if (adformLoaded) {
      return;
    }
    // create error bid responses
  }, 10); // would probably work if we just used 1ms, eg a JS stack
});

// in handleCallback, eg line 63:
adformLoaded = adItems && adItems.length;

nickjacob avatar Nov 14 '16 15:11 nickjacob

Thanks @nickjacob for the bug report. @prebid/adform any thoughts on this?

mkendall07 avatar Nov 15 '16 01:11 mkendall07

@nickjacob Could you provide additional information - Adform adapter config and/or request url to Adform ADX?

Empty response is possible only in case of invalid request. Most probably it's setup issue. I don't see a need to somehow workaround this behaviour. If there are some bugs in request url forming or request handling they will be fixed.

braizhas avatar Nov 15 '16 09:11 braizhas

@braizhas sorry for the delay. You're right—it's invalid parameters. I think we can close this. Thanks!

nickjacob avatar Nov 21 '16 15:11 nickjacob