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

Video gets stuck on mid-roll second Ad-break and puts ImaSdk in weird state causing video freeze like effect #7002

Closed
nishantkp opened this issue Feb 20, 2020 · 8 comments
Assignees

Comments

@nishantkp
Copy link

nishantkp commented Feb 20, 2020

Issue description

Video get stuck on 2nd ad-break on 1st mid-roll. It player second ad just fine and then it is stuck on Ad.
Prints warning saying,

2020-02-20 10:12:51.995 26905-26905/com.google.android.exoplayer2.demo W/ImaAdsLoader: Unexpected ad count in LOADED, 5, expected 1
2020-02-20 10:12:51.995 26905-26905/com.google.android.exoplayer2.demo W/ImaAdsLoader: Expected ad group index 1, actual ad group index 0
2020-02-20 10:12:51.997 26905-26905/com.google.android.exoplayer2.demo W/IMASDK: Invalid internal message, ignoring. Please make sure the Google IMA SDK library is up to date. Message: gmsg://afma.google.com/videoDisplay?type=activate&sid=44938717-4973-47b4-a284-810e38ace03c&dt=1582211571979
2020-02-20 10:12:52.098 26905-26905/com.google.android.exoplayer2.demo W/ImaAdsLoader: Unexpected loadAd in an ad group with no remaining unavailable ads
2020-02-20 10:13:23.936 26905-26905/com.google.android.exoplayer2.demo I/ExoPlayerImpl: Release f51f655 [ExoPlayerLib/2.11.1] [gts210vewifi, SM-T813, samsung, 24] [goog.exo.core, goog.exo.ui, goog.exo.ima]
2020-02-20 10:13:24.871 26905-26905/com.google.android.exoplayer2.demo W/ImaAdsLoader: Unexpected stopAd while detached

After that when you press play/pause and play it will throw following error and disables all ads on that video.

2020-02-20 10:13:24.874 26905-26905/com.google.android.exoplayer2.demo E/ImaAdsLoader: Internal error in stopAd
    java.lang.IllegalArgumentException
        at com.google.android.exoplayer2.util.Assertions.checkArgument(Assertions.java:39)
        at com.google.android.exoplayer2.source.ads.AdPlaybackState$AdGroup.withAdState(AdPlaybackState.java:174)
        at com.google.android.exoplayer2.source.ads.AdPlaybackState.withPlayedAd(AdPlaybackState.java:387)
        at com.google.android.exoplayer2.ext.ima.ImaAdsLoader.stopAdInternal(ImaAdsLoader.java:1236)
        at com.google.android.exoplayer2.ext.ima.ImaAdsLoader.stopAd(ImaAdsLoader.java:935)
        at com.google.ads.interactivemedia.v3.internal.aed.b(IMASDK:50)
        at com.google.ads.interactivemedia.v3.internal.acl.a(IMASDK:58)
        at com.google.ads.interactivemedia.v3.internal.aeb.e(IMASDK:176)
        at com.google.ads.interactivemedia.v3.internal.aeb.a(IMASDK:5)
        at com.google.ads.interactivemedia.v3.internal.adz.b(IMASDK:42)
        at com.google.ads.interactivemedia.v3.internal.aea.shouldOverrideUrlLoading(IMASDK:4)
        at android.webkit.WebViewClient.shouldOverrideUrlLoading(WebViewClient.java:73)
        at org.chromium.android_webview.AwContentsClientBridge.shouldOverrideUrlLoading(PG:16)
        at android.os.MessageQueue.nativePollOnce(Native Method)
        at android.os.MessageQueue.next(MessageQueue.java:323)
        at android.os.Looper.loop(Looper.java:136)
        at android.app.ActivityThread.main(ActivityThread.java:6780)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1500)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1390)

This was fine till 2 days ago. It suddenly broke our platforms. Not sure what causing this behaviour.

Reproduction steps

Play a video for VMAP pre-roll single ad, mid-roll standard pods with 5 ads every 10 seconds

Link to test content

Sample app

A full bug report captured from the device

  • Reproducible on demo app

Version of ExoPlayer being used

2.10.7 and onwards

Device(s) and version(s) of Android being used

Any devices with api 21 and above. Did not checked on lower versions.

@andrewlewis
Copy link
Collaborator

Thank you for reporting this. We are looking into it now.

It's likely that the regression can be fixed by a server-side change. Assuming that's correct, I will update here when we have verified the fix and know when it will roll out.

@nishantkp
Copy link
Author

Thanks a bunch @andrewlewis . It would be great if you address this issue as early as possible.

@andrewlewis
Copy link
Collaborator

A possible fix for this is rolling out at the moment.

@andrewlewis
Copy link
Collaborator

Verified this is now working for me. Please reply here or open a new issue if something still seems broken. Thanks and sorry for the inconvenience.

@nishantkp
Copy link
Author

Hi @andrewlewis,

It seems all good now. We will keep monitoring if something goes wrong.

Thanks a bunch for this quick fix. 🎉 👏

@nishantkp
Copy link
Author

Hi @andrewlewis,

We are started to seeing this again. After midroll is finished, content is not able to resume.

@google google locked and limited conversation to collaborators Apr 22, 2020
@andrewlewis andrewlewis reopened this Apr 27, 2020
@andrewlewis
Copy link
Collaborator

@nishantkp Sorry for the delay and auto-closing of this issue. I was wondering if you could confirm whether you are still seeing this issue? As far as I know midrolls are playing correctly at the moment. Thanks.

@andrewlewis
Copy link
Collaborator

We should be more robust to this kind of regression with server-side behavior since 793f12d, which times out preloading. Closing for now as I didn't find any issues with midroll playbacks on a variety of ad tags.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants