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

IMA crashing when using wrong IMA Ad Uri config #7494

Closed
fpittersacc opened this issue Jun 12, 2020 · 5 comments
Closed

IMA crashing when using wrong IMA Ad Uri config #7494

fpittersacc opened this issue Jun 12, 2020 · 5 comments
Assignees
Labels

Comments

@fpittersacc
Copy link

[REQUIRED] Issue description

We were getting an invalid Ads configuration, with prerolls coming on seconds 1, 2, 3.
This is behaving differently on 2.11.3 and 2.11.5.
2.11.3: Playback is stuck after preroll.
2.11.5: App crashes after preroll.

We know this issue is just an edge case caused by a misconfiguration on the AdManager, but maybe the crash could be avoided.

[REQUIRED] Reproduction steps

  1. On Exoplayer demo module, include the IMA Uri from below into any content.
  2. Start playback.

Expected: Content is resumed.
Actual: Crashing after Preroll.

[REQUIRED] Link to test content

https://pubads.g.doubleclick.net/gampad/ads?env=vp&gdfp_req=1&unviewed_position_start=1&output=vast&iu=/5374/TV2video/avod/programmer/underholdning/love-island-uk/sesong-5&sz=640x480&description_url=https://www.tv2.no/v/1463716&hl=no&cmsid=2510181&vid=1463716

  • I'm not sure how long the Ad Tag Uri will be available, I'm sharing bugreports in case it is changed.

[REQUIRED] A full bug report captured from the device

The exception is raised in ImaAdsLoader due to invalid AdState when receiving stopAd from IMASDK.

2020-06-12 12:11:06.401 28373-28373/no.tv2.sumo.debug E/AndroidRuntime: FATAL EXCEPTION: main
    Process: no.tv2.sumo.debug, PID: 28373
    java.lang.IllegalStateException
        at com.google.android.exoplayer2.util.Assertions.checkState(Assertions.java:81)
        at no.tv2.player.ImaAdsLoader.stopAd(ImaAdsLoader.java:970)
        at com.google.ads.interactivemedia.v3.internal.akf.a(IMASDK:24)
        at com.google.ads.interactivemedia.v3.internal.akb.a(IMASDK:177)
        at com.google.ads.interactivemedia.v3.internal.akb.a(IMASDK:44)
        at com.google.ads.interactivemedia.v3.internal.ake.b(IMASDK:28)
        at com.google.ads.interactivemedia.v3.internal.akc.shouldOverrideUrlLoading(IMASDK:6)
        at android.webkit.WebViewClient.shouldOverrideUrlLoading(WebViewClient.java:77)
        at org.chromium.android_webview.AwContentsClientBridge.shouldOverrideUrlLoading(chromium-Monochrome.aab-stable-410410173:16)
        at android.os.MessageQueue.nativePollOnce(Native Method)
        at android.os.MessageQueue.next(MessageQueue.java:326)
        at android.os.Looper.loop(Looper.java:165)
        at android.app.ActivityThread.main(ActivityThread.java:6810)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873)

bugreport-nexus5-Android6-2020-06-12.txt
bugreport-whyred-PKQ1.180904.001-2020-06-12-13-19-54.zip

[REQUIRED] Version of ExoPlayer being used

2.11.3 & 2.11.5

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

All. It doesn't seem to be affected by any Android version or device.

@andrewlewis
Copy link
Collaborator

Thanks for the report. Would it be acceptable if we just skip all ads in this case? If not what would be the desired behavior?

@fpittersacc
Copy link
Author

fpittersacc commented Jun 15, 2020

Yes, I think it would be OK to skip. Thanks.

@andrewlewis
Copy link
Collaborator

After 5a88e0b we should avoid crashing on assertion failure (instead we will discard remaining ads).

Aside: when testing using the provided ad tag, I didn't see problems with misconfigured timestamps for midrolls but instead I saw what looks like the issue reported in #7477: we first get an ad count of 3 ads, then this changes to 7 ads in the pod when the next ad in the pod loads:

D ImaAdsLoader: loadAd AdMediaInfo[...], ad pod AdPodInfo [totalAds=3, adPosition=1, isBumper=false, maxDuration=132.0, podIndex=1, timeOffset=584.0]

D ImaAdsLoader: loadAd AdMediaInfo[...], ad pod AdPodInfo [totalAds=7, adPosition=2, isBumper=false, maxDuration=132.0, podIndex=1, timeOffset=584.0]

@fpittersacc Do you have any ideas why the ad count is updating like that?

@fpittersacc
Copy link
Author

Thanks, for checking.

I think the IMA Ad Uri has been changed and not providing the invalid Ad sequence anymore, and giving the sequence we were facing in #7477

Let me recheck using 2.11.6.

@fpittersacc
Copy link
Author

We don't have the invalid Ad setup available anymore.
It seems the crash is already fixed, so I don't think it will be an issue anymore.

Thanks for reviewing it.

@google google locked and limited conversation to collaborators Sep 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants