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.33k stars 2.08k forks source link

Mismatched type for Prebid Server #1792

Closed YOzaz closed 7 years ago

YOzaz commented 7 years ago

Type of issue

Bug / question

Description

Configuration for Rubicon is correct as client-side request (well, it's working), but once prebidServer is enabled - I'm getting errors on parameter types. Suspecting something is wrong with type conversion. Plus, debug / error message is unhelpful :(

Steps to reproduce

Configuration (sample):

pbjs.setConfig({
    bidderTimeout: PREBID_TIMEOUT,
    enableSendAllBids: true,
    s2sConfig: {
        accountId: 'e7445f8d-ee19-4a94-a234-a271cb3e6bc0',
        enabled: true,
        bidders: ['facebook', 'pulsepoint', 'rubicon'],
        timeout: PREBID_TIMEOUT
    } 
});

pbjs.addAdUnits([{
    code: "div-gpt-ad-1418309082456-0",
    sizes: [
        [728, 90],
        [970, 250]
    ],
    bids: [{
        bidder: "rubicon",
        params: {
            accountId: "14346",
            siteId: "154972",
            zoneId: "738672",
            sizes: "[2,57]"
        }
    }]
}]);

Result with ?pbjs_debug=true - no call is made:

MESSAGE: CALLING S2S HEADER BIDDERS ==== facebook,pulsepoint,rubicon
MESSAGE: Mismatched type for Prebid Server : rubicon : accountId. Required Type:function () { [native code] }
MESSAGE: Mismatched type for Prebid Server : rubicon : siteId. Required Type:function () { [native code] }
MESSAGE: Mismatched type for Prebid Server : rubicon : zoneId. Required Type:function () { [native code] }

Test page

Expected results

Rubicon bidding is done in server side.

Actual results

Rubicon adapter rejects bid as invalid - parameters are mismatched - therefore bid is not called.

Platform details

prebid.js build 0.32.0 +Rubicon adapter +PrebidServer adapter

Other information

https://github.com/prebid/prebid-server/issues/182#issuecomment-341414895

YOzaz commented 7 years ago

Found it. Prebid Server requires parameters to be as of integer, but official docs say it must be wrapped in quotes (string). It works either way, but docs must be updated then: http://prebid.org/dev-docs/bidders.html#rubicon