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

RubiconBidAdapter: Error while converting bidRequest to ORTB imp; request skipped #10400

Closed
EskelCz opened this issue Aug 28, 2023 · 10 comments · Fixed by #10401
Closed

RubiconBidAdapter: Error while converting bidRequest to ORTB imp; request skipped #10400

EskelCz opened this issue Aug 28, 2023 · 10 comments · Fixed by #10401
Assignees
Labels

Comments

@EskelCz
Copy link
Contributor

EskelCz commented Aug 28, 2023

Type of issue

Bug, probably

Description

Bid request for Native format fails with an error, trying to set .pos at a video object, which for native isn't there.
(Cannot set properties of undefined (setting 'pos'))
This line: https://github.com/prebid/Prebid.js/blob/7.39.0/modules/rubiconBidAdapter.js#L197

Steps to reproduce

  1. Configure magnite adUnit with native mediaType and required assets
  2. Run auction

Test page

https://playground.cpex.cz/native
(position native-3)

Expected results

No error

Actual results

image

Platform details

Prebid 7.39 (but the culprit line is in the latest version as well)

@robertrmartinez
Copy link
Collaborator

robertrmartinez commented Aug 28, 2023

@EskelCz Thanks for flagging, will get a fix ASAP.

A workaround is to remove the position params in your rubicon bids for adUnits which have native (I know not really a "workaround", but the request will be sent)

Here is example code which will delete the rubicon param position for any adUnit that has native mediaType.

( Or you can just edit the adunits directly of course )

pbjs.onEvent('beforeRequestBids', adUnits => {
  adUnits.forEach(adUnit => {
    if (adUnit.mediaTypes.hasOwnProperty('native')) {
      adUnit.bids.forEach(bid => {
        if (bid.bidder === 'rubicon') delete bid.params.position;
      });
    }
  });
});

Executing this on your test page and then running an auction has the Rubicon Native Ad Request sent as expected:

  • First Auction failed
  • Executed code above
  • Second Auction worked

Thanks for finding and sorry for the inconvenience!

Also FYI, the Rubicon Prebid Server Adapter requires event trackers in native requests:

From Rubicon PBS Error Response: "Error in native object for imp with id native-3: Eventtrackers are not present or not of array type"

I have reached out to our team for more clarity on if this requirement will remain in the future or not.

@robertrmartinez
Copy link
Collaborator

PR: #10401

patmmccann pushed a commit that referenced this issue Aug 28, 2023
@EskelCz
Copy link
Contributor Author

EskelCz commented Aug 29, 2023

@robertrmartinez That was fast, I'm shocked. :) Thanks a lot for the quick fix.

As for the event trackers issue, I must admit I have no idea what is happening there. Can you please elaborate? Is it something I need to handle on our end, or is that another adapter issue?

@robertrmartinez
Copy link
Collaborator

robertrmartinez commented Aug 29, 2023

We updated the Rubicon Adapter to support native somewhat recently.

It sends an ORTB2 Native request to our exchange.

It looks like you still declare your prebid native adUnits using the "Legacy" prebid format:

image

This is transformed into ORTB and then sent.

Well, the Rubicon (Magnite) SSP requires the ORTB native request field called eventtrackers

See section 4.7 Event Trackers Request Object in the ORTB Native 1.2 Spec

This is optional in ORTB, but our exchange has deemed it as required as of now. Unsure if it will change anytime soon, but that was the direction given.

Hope this helps clear it up @EskelCz

If you have any questions about this requirement or any other native questions, please first reach out to your Magnite account representative and they should be able to assist.

@EskelCz
Copy link
Contributor Author

EskelCz commented Aug 30, 2023

@robertrmartinez I see, that clears it up. I'll use the ORTB configuration and add an empty eventtrackers array, that's no problem. Thanks a lot

@EskelCz
Copy link
Contributor Author

EskelCz commented Sep 13, 2023

@robertrmartinez I'm testing the fix in 8.12 and I'm seeing another error in the network request. First it shows kind of a misleading warning in console:
image
You can see it live here: https://playground.cpex.cz/native

Then in network request is the actual error:

"Error in native object for imp with id native-3: Plcmttype is not present or not of int type"

Here's the complete request:
https://www.postman.com/solar-sunset-356369/workspace/cpex-public/request/17429252-e68f23ad-0e99-4c31-851e-dc31970103dd?ctx=documentation

This is my adUnit definition:

[
    {
        "code": "native-3",
        "mediaTypes": {
            "native": {
                "ortb": {
                    "assets": [
                        {
                            "id": 1,
                            "required": 1,
                            "img": {
                                "type": 1,
                                "wmin": 200,
                                "hmin": 200
                            }
                        },
                        {
                            "id": 2,
                            "required": 1,
                            "title": { "len": 800 }
                        },
                        {
                            "id": 3,
                            "required": 1,
                            "data": { "type": 2 }
                        },
                        {
                            "id": 4,
                            "required": 0,
                            "data": { "type": 1 }
                        }
                    ],
                    "eventtrackers": []
                }
            }
        },
        "bids": [
            {
                "bidder": "rubicon",
                "params": {
                    "siteId": "140646",
                    "zoneId": "3017262",
                    "accountId": "10900",
                    "position": "atf",
                    "sizes": [ 221 ]
                }
            }
        ]
    }
]

It's probably some other misconfiguration on my part, but it's hard to debug since the error is from the back-end. Can you please see what's wrong?

@robertrmartinez
Copy link
Collaborator

Hi @EskelCz I am off starting today but am going to pass this along to my team so someone can help you while I am out!

Sorry for the issues! We are still ironing out some kinks in our Native setups.

@bretg
Copy link
Collaborator

bretg commented Sep 13, 2023

Here are the validations done by the server-side rubicon adapter:

if imp.native.ver is 1.2, unpack the imp.native.request field and make the following validations:

  • eventtrackers exists and is an array
  • context exists and is an integer
  • plcmttype exists and is an integer

These are the rules of the exchange.

@EskelCz
Copy link
Contributor Author

EskelCz commented Sep 14, 2023

@bretg Thanks, I missed that in the docs https://docs.prebid.org/dev-docs/bidders/rubicon.html#native
But there is no information what the values of context and plcmttype mean.

I searched Magnite docs and found it only on this page: https://resources.rubiconproject.com/resource/xapi-specifications-3-2/#autoid-1-44-native-request-object
But both of the attributes link to non-existent anchors. So I'm stuck. It's perplexing, such a lackluster documentation for required values. It's as if I'm the first developer trying to configure Native for Magnite. :)

EDIT: Found it at the bottom, it's just the anchors that are broken.

@bretg
Copy link
Collaborator

bretg commented Sep 14, 2023

Thanks for the docs bug report @EskelCz. Will report it. I was going to suggest the IAB spec, but sounds like you found that.

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

Successfully merging a pull request may close this issue.

4 participants