prebid / Prebid.js

Setup and manage header bidding advertising partners without writing code or confusing line items. Prebid.js is open source and free.
https://docs.prebid.org
Apache License 2.0
1.28k stars 2.05k forks source link

Adform - No Handling for "No-Bid" Response #790

Closed nickjacob closed 7 years ago

nickjacob commented 7 years ago

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;
mkendall07 commented 7 years ago

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

braizhas commented 7 years ago

@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.

nickjacob commented 7 years ago

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