Exoplayer: Migrate to IMA SDK 3.13.1+

Created on 14 Sep 2019  路  28Comments  路  Source: google/ExoPlayer

[REQUIRED] Issue description

The IMA extension seems to be incompatible with the latest interactivemedia library Version. Every time an ad is attempted to play, the Activity crashes.

[REQUIRED] Reproduction steps

Update com.google.ads.interactivemedia.v3:interactivemedia to at least version 3.13.1 and try to load an ad.

[REQUIRED] Link to test content

Any VAST link, for example one of these test links: https://www.iab.com/insights/vast-2-0-xml-samples-for-testing/

[REQUIRED] A full bug report captured from the device

java.lang.AbstractMethodError: abstract method "void com.google.ads.interactivemedia.v3.api.player.VideoAdPlayer.loadAd(com.google.ads.interactivemedia.v3.api.player.AdMediaInfo, com.google.ads.interactivemedia.v3.api.AdPodInfo)"
    at com.google.ads.interactivemedia.v3.internal.afe.a(IMASDK:43)
    at com.google.ads.interactivemedia.v3.internal.afc.a(IMASDK:160)
    at com.google.ads.interactivemedia.v3.internal.afc.a(IMASDK:16)
    at com.google.ads.interactivemedia.v3.internal.afa.b(IMASDK:42)
    at com.google.ads.interactivemedia.v3.internal.aez.shouldOverrideUrlLoading(IMASDK:4)
    at android.webkit.WebViewClient.shouldOverrideUrlLoading(WebViewClient.java:83)
    at org.chromium.android_webview.AwContentsClientBridge.shouldOverrideUrlLoading(PG:16)
    at android.os.MessageQueue.nativePollOnce(Native Method)
    at android.os.MessageQueue.next(MessageQueue.java:336)
    at android.os.Looper.loop(Looper.java:174)
    at android.app.ActivityThread.main(ActivityThread.java:7559)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:516)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)

[REQUIRED] Version of ExoPlayer being used

ExoPlayer: 2.10.4
InteractiveMedia: 3.14.0

[REQUIRED] Device(s) and version(s) of Android being used

Any, but reproduced on OnePlus 7 Pro with Android 10 Beta.

enhancement

Most helpful comment

Thanks for your patience. Just to provide an update, the change referenced above migrates our dev-v2 branch to IMA SDK 3.18.1 (thanks @andrewlewis !). We're still working on a couple of issues with the migration, including one stuck playback problem, but are hoping to get these cleaned up and into a release over the coming weeks.

All 28 comments

I am also facing this issue. I tried upgrading extension-IMA in ExoPlayer then, i am facing the following error, where it throws 402 timeout error and continues with the content playback.

2019-09-17 17:28:47.603 10076-10076/com.kaltura.playkitdemo I/chromium: [INFO:CONSOLE(936)] " [ 9.905s] [ima.vast.VideoAdEventTracker] dispatching event mediaLoadTimeout", source: https://imasdk.googleapis.com/native/core/3.159.1/native_bridge_debug__en.js (936) 2019-09-17 17:28:47.611 10076-10076/com.kaltura.playkitdemo D/IMASDK: Received js message: log [log] 2019-09-17 17:28:47.611 10076-10076/com.kaltura.playkitdemo I/SDK_LOG:ima.vast.VideoAdEventTracker: dispatching event mediaLoadTimeout 2019-09-17 17:28:47.615 10076-10076/com.kaltura.playkitdemo I/chromium: [INFO:CONSOLE(936)] " [ 9.917s] [ima.managers.VastVideoAdsManager] Playback error: [object Object] AdError 402: VAST media file loading reached a timeout of 8 seconds.", source: https://imasdk.googleapis.com/native/core/3.159.1/native_bridge_debug__en.js (936) 2019-09-17 17:28:47.622 10076-10076/com.kaltura.playkitdemo I/chromium: [INFO:CONSOLE(936)] " [ 9.924s] [UrlReporter] Reporting urls for event : error", source: https://imasdk.googleapis.com/native/core/3.159.1/native_bridge_debug__en.js (936) 2019-09-17 17:28:47.633 10076-10076/com.kaltura.playkitdemo I/chromium: [INFO:CONSOLE(936)] " [ 9.934s] [ima.common.ErrorUtils] Error play dispatched: AdError 402: VAST media file loading reached a timeout of 8 seconds.", source: https://imasdk.googleapis.com/native/core/3.159.1/native_bridge_debug__en.js (936) 2019-09-17 17:28:47.637 10076-10076/com.kaltura.playkitdemo I/chromium: [INFO:CONSOLE(936)] " [ 9.936s] [ima.adslist.AdBreak] Ad play error for playTime:0, error: AdError 402: VAST media file loading reached a timeout of 8 seconds.", source: https://imasdk.googleapis.com/native/core/3.159.1/native_bridge_debug__en.js (936) 2019-09-17 17:28:47.638 10076-10076/com.kaltura.playkitdemo I/chromium: [INFO:CONSOLE(936)] " [ 9.937s] [ima.common.ErrorUtils] Error log dispatched: AdError 402: VAST media file loading reached a timeout of 8 seconds.", source: https://imasdk.googleapis.com/native/core/3.159.1/native_bridge_debug__en.js (936) 2019-09-17 17:28:47.639 10076-10076/com.kaltura.playkitdemo I/chromium: [INFO:CONSOLE(936)] " [ 9.938s] [ima.adslist.AdBreak] Playing next item and waiting for time:0.", source: https://imasdk.googleapis.com/native/core/3.159.1/native_bridge_debug__en.js (936) 2019-09-17 17:28:47.639 10076-10076/com.kaltura.playkitdemo I/chromium: [INFO:CONSOLE(936)] " [ 9.939s] [ima.adslist.AdBreak] Done playing all ads for time: 0", source: https://imasdk.googleapis.com/native/core/3.159.1/native_bridge_debug__en.js (936) 2019-09-17 17:28:47.639 10076-10076/com.kaltura.playkitdemo I/chromium: [INFO:CONSOLE(936)] " [ 9.941s] [ima.adslist.AdBreak] Destroying the ad break, 0", source: https://imasdk.googleapis.com/native/core/3.159.1/native_bridge_debug__en.js (936) 2019-09-17 17:28:47.645 10076-10076/com.kaltura.playkitdemo I/chromium: [INFO:CONSOLE(936)] " [ 9.946s] [ima.managers.AdsListAdsManager] No next event in the event queue.", source: https://imasdk.googleapis.com/native/core/3.159.1/native_bridge_debug__en.js (936) 2019-09-17 17:28:47.656 10076-10076/com.kaltura.playkitdemo D/IMASDK: Received js message: log [log] 2019-09-17 17:28:47.656 10076-10076/com.kaltura.playkitdemo I/SDK_LOG:ima.managers.VastVideoAdsManager: Playback error: [object Object] AdError 402: VAST media file loading reached a timeout of 8 seconds. 2019-09-17 17:28:47.660 10076-10076/com.kaltura.playkitdemo D/IMASDK: Received js message: log [log] 2019-09-17 17:28:47.660 10076-10076/com.kaltura.playkitdemo I/SDK_LOG:UrlReporter: Reporting urls for event : error 2019-09-17 17:28:47.663 10076-10076/com.kaltura.playkitdemo D/IMASDK: Received js message: videoDisplay1 [stopTracking] 2019-09-17 17:28:47.669 10076-10076/com.kaltura.playkitdemo D/IMASDK: Received js message: log [log] 2019-09-17 17:28:47.669 10076-10076/com.kaltura.playkitdemo W/SDK_LOG:ima.common.ErrorUtils: Error play dispatched: AdError 402: VAST media file loading reached a timeout of 8 seconds. 2019-09-17 17:28:47.675 10076-10076/com.kaltura.playkitdemo D/IMASDK: Received js message: log [log] 2019-09-17 17:28:47.675 10076-10076/com.kaltura.playkitdemo I/SDK_LOG:ima.adslist.AdBreak: Ad play error for playTime:0, error: AdError 402: VAST media file loading reached a timeout of 8 seconds. 2019-09-17 17:28:47.680 10076-10076/com.kaltura.playkitdemo D/IMASDK: Received js message: log [log] 2019-09-17 17:28:47.680 10076-10076/com.kaltura.playkitdemo W/SDK_LOG:ima.common.ErrorUtils: Error log dispatched: AdError 402: VAST media file loading reached a timeout of 8 seconds. 2019-09-17 17:28:47.687 10076-10076/com.kaltura.playkitdemo D/IMASDK: Received js message: adsManager [log]

For me activity does not crash but the ads are not playing properly.

The 3.13.1 release of the IMA SDK made some breaking changes to their API. We need to update ExoPlayer's IMA extension for the two to be compatible. Until we do that (tracked by this issue), you should not attempt to update to a newer version of IMA.

Thanks @ojw28

Same issue happens for me as well. Trust, we will get an update for IMA SDK soon.

With respect to the breaking changes, Is the latest ExoPlayer(2.10.6) compatible with IMA 3.16.0 ?

It is not compatible, I'm afraid.

We do have a pending change ready to go that will update the IMA extension to the latest version, but this also depends on a change in behavior of the JavaScript component of the IMA SDK that has not fully rolled out yet.

Sorry for the inconvenience. This only affects our usage because we rely on the preloading feature of the IMA SDK. Once the JavaScript change has rolled out (expected within the next month), we can update and then several bugs on this tracker related to empty ad breaks and unexpectedly skipped ads should be fixed, so I hope it's worth the wait!

Is Exoplayer (2.10.6) compatible with IMA (3.16.1) ?

My previous comment applies to the newer version too I'm afraid. New ETA for JavaScript changes is January, but we can't provide any guarantees.

Ah okay, thank you

Hi @andrewlewis, any news on this one? Do you have an updated ETA?
How can we check the progress on these necessary Javascript changes you mentioned?
Thank you!

Hi @andrewlewis , Shall we upgrade it to 3.16.5 IMA latest ?

There are still no specific updates, but I understand from the IMA team that they're making progress.

ok @andrewlewis, thanks for the update.
Please keep us posted with any updates you might have, because my employers are constantly asking me about this issue.

Just to check @ojw28. Can we go ahead for IMA 3.17.0 with ExoPlayer 2.11.3 ?

@GouravSna No, the situation here has not changed.

Hi @andrewlewis , Please check the forked ExoPlayer dev-v2 branch. I upgraded IMA to 3.18.0 which is latest. You can see the 402 timeout error everytime when the ad plays back till 6th second.

https://github.com/GouravSna/ExoPlayer/tree/issue-6429

Please use "402|SDK_LOG|chromium" filter in logcat for specific logs.

We are on IMA 3.11.2 and it is soon to be deprecated. We checked this issue on IMA advanced sample. It works fine because that use VideoPlayer not ExoPlayer.

-Thanks for your quick help.

Hi @andrewlewis and @ojw28 , we are facing a lot of issues because of this ads skipping issue. Please take this up on priority.
And the problem will become worse if the current IMA 3.11.2 will get deprecated.

It's already a priority. We hope to have an update soon. In the meantime, repeatedly posting on this bug will not change anything other than distract us from doing actual useful work. Thanks.

Any update on the above fixes ? Please let us know . Thanks

It's already a priority. We hope to have an update soon. In the meantime, repeatedly posting on this bug will not change anything other than distract us from doing actual useful work. Thanks.

Hi, I totally understand that repeated posts on same issue are more of a distraction than anything else. But this has been long pending, so getting a little restless as the pressure is building up on my dev team. Any hopes on this in recent future?

Understood. I'm actively working on this at the moment. Some more details: until recently we were focused on rolling out the server-side component of this (new ads managers) and then addressing backwards compatibility issues that came up from those changes. Then there was an ExoPlayer bug with ad playbacks with protected content getting stuck (#7188). Currently I'm working on a remaining issue where AdsMediaSource doesn't release its child sources, and then focusing on dealing with the API changes for this dependency update (this is non-trivial as there is new preloading behavior and new requirements for signaling when ads are loaded, for example).

A temporary workaround for everyone who is facing this problem:

Use following combination. I guess this works for me, although I have only tried on a single device so far. I will update this post later if I find anything else.

implementation 'com.google.ads.interactivemedia.v3:interactivemedia:3.11.3'
implementation "com.google.android.exoplayer:extension:2.11.1"

And the most important is the browser version. Anything above this leads to crash for me.

implementation 'androidx.browser:browser:1.0.0'

Just a note about current IMA 3.11.3 is leaking the player Activity when leaving the playback during Ads, reproducible on Demo with IMA.
I'll try again once the upgrade is done, and report to IMA if still present.
Thanks

@fpittersacc For the activity leak issue, it looks like the ad overlay view is leaking via the ads manager even though AdsManager.destroy is being called. I have filed a bug [internal ref: b/155041144] to ask the IMA SDK team to take a look. Thanks for reporting.

Thanks for your patience. Just to provide an update, the change referenced above migrates our dev-v2 branch to IMA SDK 3.18.1 (thanks @andrewlewis !). We're still working on a couple of issues with the migration, including one stuck playback problem, but are hoping to get these cleaned up and into a release over the coming weeks.

Side note: filed #7344 as a tracking bug for the memory leak. There isn't a fix in the IMA SDK for that yet and it's not feasible to make a workaround, but it also doesn't seem to be a regression.

This migration is now released in 2.11.5.

Was this page helpful?
0 / 5 - 0 ratings