Closed minasaywhat closed 4 years ago
The suggested fix from the Rubicon dev team to handle this error/use case in the player:
i.prototype.initAdObjects = function() {
this.adsManager.addEventListener(google.ima.AdEvent.Type.AD_BREAK_READY, this.onAdBreakReady.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.LOG, this.onAdLog.bind(this)), this.adsManager.addEventListener(google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED, this.onContentPauseRequested.bind(this)),
i.prototype.onAdLog = function(e) { var d = e.getAdData();if (d['adError']&&d['adError'].h == 1021) { this.onAdError(d['adError'].g) }}, i.prototype.onAdsLoaderError = function(e) { window.console.warn("AdsLoader error: " + e.getError()), this.controller.onErrorLoadingAds(e), this.adsManager && this.adsManager.destroy() },
This is related to #707 .
@ypavlotsky I wanted to follow up on this issue. Any insights or thoughts on the proposed solution?
@ypavlotsky Hi Yury, we desperately need your help, guys! We have an "all hands on deck" situation as of this morning, caused by the logic described by Mina and Vasja above, and the situation is quite time sensitive.
Any piece of advice from you is really really appreciated
Thank you! Dennis
If you need hotfix asap, I would try something like this:
.....
player.ima(options);
player.on('adslog', function(event) {
const adData = event.data.AdEvent.getAdData();
// force the adError event when VAST 900:1021 occurs
if (adData.adError && adData.adError.getErrorCode() === 1021) {
player.ima.controller.sdkImpl.onAdError(adData.adError.getInnerError());
}
};
@mysuf Thank you!
@mysuf awesome, thanks for the suggestions. @ypavlotsky would it be possible to ask for a release of the latest videojs-ima
version? I don't know the exact process but it would be great to have the latest code, since the fix suggested here seems to only be available with a PR that was merged after 1.5.1 was released. If I should ask somewhere else please let me know, and thanks again for the help.
Ah. I didnt realize that triggering adslog is new feat..sorry.. Its still possible, but with little more code:
function onImaAdsLog(adEvent) {
const adData = adEvent.getAdData();
// force the adError event when VAST 900:1021 occurs
if (adData.adError && adData.adError.getErrorCode() === 1021) {
this.onAdError(adData.adError.getInnerError());
}
}
player.ima({adsManagerLoadedCallback: function () {
player.ima.controller.sdkImpl.adsManager.addEventListener(
google.ima.AdEvent.Type.LOG,
onImaAdsLog.bind(player.ima.controller.sdkImpl)
);
}});
Note that I write it without any testing so it can contain typos etc..
@mysuf no worries about the testing, this is super helpful. We'll give it a shot in the interim, thanks a bunch! :)
Is still happening or have you implemented a workaround in your test page? I'm not seeing an error on the test page. Note that if you're playing a playlist of ads, ad errors will become AdEvent.Type.LOGs so that the SDK can continue playing the next ad in the playlist. Is that what you're seeing?
The offending ad tag wrappers were disabled on our side, and we have not seen the behavior since then. We have made some other changes with respect to some ad/content player freezing issues (most notably here: https://github.com/googleads/videojs-ima/issues/735), so not sure what would happen if the ad tag wrappers that were problematic were to be re-enabled.
Btw, when will the 1.5.2 release (with the changes to ad logging mentioned in this thread) be released publicly? npm still lists 1.5.1 as the most recent public release.
Hi all,
It looks as though this issue may have been resolved, but it is possible that the underlying issue of the ads-ima-adError event not triggering still exists.
I am closing the issue, but please reopen if you have the reproducible example of this issue.
Hi All, Can you please advise how to listen complete IMA SDK AdErrorEvent for any error. Right now on "adserror" event not giving me any error code and video resuming successfylly. Also I can see adsready event working as expected. Please help on this with complete ads error similar to google.ima.AdErrorEvent.Type.AD_ERROR, onAdError
https://developers.google.com/interactive-media-ads/docs/sdks/html5?hl=hi#!topic/ima-sdk/Nc1fDYKYFik
Also I am seeing that Ads timeout coming first than "ads-load" event firing and resuming video and after that no ad error I am receiving.
We've been trying to troubleshoot this issue in our player where the ad controls persist when the ad fails and the video content plays. We've been going back and forth with our demand partner trying to pinpoint if this is a bug in our player vs a bug in their ad tag wrapper. One of their engineers pointed out the root cause this morning - and figured out a way to handle it, but I'm posting this here because it seems a fix is also needed in the videojs IMA SDK.
It looks like our ads team has a problem with the fallback ad we have configured in DFP - so the expectation would be for the IMA SDK to return the adError event. However, the ad error event never gets triggered, even though the fallback ad fails. Hence, the player doesn't get the trigger to remove the ad controls - and the ad events are all firing during the video content playback instead of the played events.
Here's a test link to see this in action: http://glimmer.hearstapps.com/api.html?embedId=cce3f0c1-d723-437d-b581-fd866da0b523&dataLayer=none&adTag=&aspectRatio=16%3A9&volume=1&muted=on&autoplay=on&token=rubicontest
The Rubicon dev team added a special condition/handler for this to force or trigger the adError event when the VAST 900:1021 event occurs (The fallback failed to return an ad), but it seems this should be handled natively in the IMA SDK. Do you agree?
I was also trying to find the docs on these more detailed VPAID error codes, and I couldn't find them in the Google DFP docs online, or in the IAB VAST or VPAID standards docs. This is the only link I could find with a legend of this specific ad error code. Does Google/DFP or IAB have these error codes published anywhere (just curious)? https://watchingthat.com/ima3-vast41-brightcove-jw-ad-error-codes/
Thanks in advance for your help with this issue. Mina