IX adapter crashes when there is no interstitial size
Complaint
Mobile pubs sometimes report a crash on interstitial requests like:
500 error type: Critical error while running the auction: null
(talk to me in Prebid Slack I'll give you a curl)
Root cause analysis
formats is not null-checked here in the Index Exchange adapter:
| } else if (formats.size() == 1) { |
and it causes a crash when there was no formats specified and no matching sizes were computed due to device.ext.prebid.interstitial.min[width/height]perc being too high or not specified. imp will be returned unaltered from here in either of those cases:
Fix options
- implement a null check and a test case (but other adapters may have similar failures, thus see option 2)
- ensure
formatsis always an array before sending it to bid adapters either empty or with at least one size (but which?)