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.09k forks source link

Blank render ad with prebid v8.38 and higher #11356

Closed JulienVerkest closed 6 months ago

JulienVerkest commented 7 months ago

Type of issue

Bug

Description

With prebid. v8.38 (and higher), we have noticed that our Google Ad Manager creatives of type Third party in safeFrames (rendered with Prebid Universal Creative) are no longer displaying correctly. The adChoices and Close icons are displayed correctly, but not the advertising resulting from the auction. When I desactivate safeFrame mode, the ad rendering is correct.

This pull request may be the root of our problem. https://github.com/prebid/Prebid.js/pull/10819 cc @dgirardi

image

GAM - Example Creative Serve into a SafeFrame

<script src = "https://cdn.jsdelivr.net/npm/prebid-universal-creative@latest/dist/creative.js"></script>
<script>
  var ucTagData = {};
  ucTagData.adServerDomain = "";
  ucTagData.pubUrl = "%%PATTERN:url%%";
  ucTagData.targetingMap = %%PATTERN:TARGETINGMAP%%;
  ucTagData.hbPb = "%%PATTERN:hb_pb%%";
  try {
    ucTag.renderAd(document, ucTagData);
  } catch (e) {
    console.log(e);
  }
</script>

pbjs.getConfig()

{
    "debug": true,
    "bidderTimeout": 4000,
    "enableSendAllBids": true,
    "useBidCache": true,
    "deviceAccess": true,
    "timeoutBuffer": 300,
    "disableAjaxTimeout": false,
    "maxNestedIframes": 10,
    "priceGranularity": "custom",
    "customPriceBucket": {
        "buckets": [
            {
                "precision": 2,
                "max": 9,
                "increment": 0.01,
                "min": 0
            },
            {
                "precision": 2,
                "max": 60,
                "increment": 0.05
            }
        ]
    },
    "mediaTypePriceGranularity": {},
    "bidderSequence": "random",
    "auctionOptions": {},
    "userSync": {
        "syncEnabled": true,
        "filterSettings": {
            "all": {
                "bidders": "*",
                "filter": "include"
            }
        },
        "syncsPerBidder": 5,
        "syncDelay": 3000,
        "auctionDelay": 0,
        "userIds": [
            {
                "name": "criteo"
            },
            {
                "name": "sharedId",
                "storage": {
                    "name": "sharedid",
                    "type": "html5",
                    "expires": 28
                }
            },
            {
                "name": "identityLink",
                "params": {
                    "pid": "13739"
                },
                "storage": {
                    "type": "cookie",
                    "name": "idl_env",
                    "expires": 15,
                    "refreshInSeconds": "1800"
                }
            }
        ]
    },
    "floors": {},
    "currency": {
        "granularityMultiplier": 1,
        "conversionRateFile": "https://cdn.jsdelivr.net/gh/prebid/currency-file@1/latest.json"
    },
    "consentManagement": {
        "gpdr": {
            "cmpApi": "iab",
            "timeout": 8000,
            "defaultGdprScope": true
        }
    },
    "fledgeForGpt": {
        "enabled": true,
        "bidders": [
            "criteo",
            "ix"
        ],
        "defaultForSlots": 1
    }
}

Thanks for your help!

bmjoju commented 7 months ago

I can confirm issues too, we are using "Header bidding trafficking" in GAM, so we just get blank ads sometimes. No errors or warnings. We dont see the The adChoices and Close icons due to the use of "Header bidding trafficking". We had to do a rollback, so we are currently staying on version 8.31.

Skærmbillede 2024-04-18 kl  15 55 06

patmmccann commented 7 months ago

@JulienVerkest please provide a test page

dgirardi commented 7 months ago

I am unable to reproduce. I know about an issue that affected a pub using a custom build (using prebid through npm) where the minifier would drop some of the constants that were moved into constants.json in #10819. This was later addressed with https://github.com/prebid/Prebid.js/pull/11292, which should be released this week, although I don't know if it was confirmed that it fixes the issue (@muuki88 ?)

If that sounds like your issue, I recommend waiting for the next release. Otherwise, please provide a page that reproduces it

muuki88 commented 7 months ago

I didn't had the time to validate the refactoring fixed the issue. We discovered this, because Prebid native was not working anymore. With the help of @dgirardi we narrowed it down to the constants.json file and values being removed by our webpack build.

@JulienVerkest can you provide a minimal build example? We noticed that orbidder was having troubles rendering. Other bidders seemed to work fine.

dgirardi commented 7 months ago

To clarify, the known issue manifests as this map not matching the code at runtime (with only a single entry for undefined), which I suspected was due to the custom minifier setup. This is consistent with the symptoms you're describing in the OP.

JulienVerkest commented 7 months ago

@muuki88 https://raw.githubusercontent.com/JulienVerkest/prebid-8.38-blank/main/8.42-ora.js Here is the prebid build file I used.

muuki88 commented 7 months ago

Thanks, I meant the build itself. Like Pat mentioned a sample project. Because @dgirardi and me suspect the build process to be the issue.

JulienVerkest commented 6 months ago

Hello,

The v8.45 seems to be good with our safeFrames. Ads are correctly rendering.
Thanks @dgirardi

patmmccann commented 6 months ago

likely fixed by https://github.com/prebid/Prebid.js/pull/11292

muuki88 commented 6 months ago

Thanks for sharing @JulienVerkest . Was the issue only with bidders that ran in safe frames?