Skip to content

PrebidNativeCache stores Native adm without the mandatory "native" wrapper (OpenRTB Native 1.2 / ORTB 2.5 Compliance Issue) #904

@AndrewHoang1995

Description

@AndrewHoang1995

Describe the bug
PrebidNativeCache is returning/storing a Native adm without the required "native" wrapper, which violates the OpenRTB Native 1.2 / ORTB 2.5 specification.

The OpenRTB spec states that bid.adm must contain a JSON string whose root object is "native".

To Reproduce
Incorrect (current behavior):

{
"adm": "{"ver":"1.2","assets":[...],"link":{...}}"
}

Expected behavior
Correct according to the ORTB Native specification:
{
"adm": "{"native": {"ver":"1.2","assets":[...],"link":{...}}}"
}
The missing "native" wrapper causes:

Native renderers to fail parsing

Prebid Mobile SDK incompatibility

Missing assets

Crashes due to invalid ORTB Native format

InMobi Return adm ORTB 2.5 : "

adm.txt

"

Screenshots

Image Image

Smartphone (please complete the following information):

Device: Pixel 8

OS: Android 16

SDK: Prebid Mobile Android 3.0.2

Additional context
Many Native Ad renderers (especially on Android / iOS) parse the adm based exactly on the ORTB Native specification.
The extra "native" wrapper causes:

JSON parsing errors

Missing or unreadable assets

Crashes when expected fields aren’t found

Additional custom code required to unwrap the response

Suggested Fix:
When storing native responses in cache, store the NativeResponse object directly, without wrapping it inside "native".

Report by :
AndrewHoang

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Ready for Dev

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions