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

Either Ads not playing or Ads playing continously #8136

Closed
Manvendra-Jadon opened this issue Oct 29, 2020 · 7 comments
Closed

Either Ads not playing or Ads playing continously #8136

Manvendra-Jadon opened this issue Oct 29, 2020 · 7 comments

Comments

@Manvendra-Jadon
Copy link

Manvendra-Jadon commented Oct 29, 2020

After new version release : 2.12.1, where following bug got fixed : #7944

We tried upgrading to latest version, i was able to add callback, but we are facing bigger issues now. Either Ads/Videos are not playing at all or Ads keep playing continuously. Here is 1 error log of the same:

2020-10-29 17:00:28.162 32249-32249/com.mazstaging.home139 E/ImaAdsLoader: Internal error in stopAd
      java.lang.NullPointerException
        at com.google.android.exoplayer2.util.Assertions.checkNotNull(Assertions.java:147)
        at com.google.android.exoplayer2.ext.ima.ImaAdsLoader.stopAdInternal(ImaAdsLoader.java:1437)
        at com.google.android.exoplayer2.ext.ima.ImaAdsLoader.access$2200(ImaAdsLoader.java:111)
        at com.google.android.exoplayer2.ext.ima.ImaAdsLoader$ComponentListener.stopAd(ImaAdsLoader.java:1839)
        at com.google.ads.interactivemedia.v3.internal.akw.a(IMASDK:16)
        at com.google.ads.interactivemedia.v3.internal.aks.a(IMASDK:168)
        at com.google.ads.interactivemedia.v3.internal.aks.a(IMASDK:160)
        at com.google.ads.interactivemedia.v3.internal.akv.b(IMASDK:20)
        at com.google.ads.interactivemedia.v3.internal.akt.shouldOverrideUrlLoading(IMASDK:6)
        at android.webkit.WebViewClient.shouldOverrideUrlLoading(WebViewClient.java:77)
        at com.android.webview.chromium.WebViewContentsClientAdapter.shouldOverrideUrlLoading(WebViewContentsClientAdapter.java:76)
        at org.chromium.android_webview.AwContentsClient.shouldIgnoreNavigation(AwContentsClient.java:19)
        at org.chromium.android_webview.AwContentsClientBridge.shouldOverrideUrlLoading(AwContentsClientBridge.java:160)
        at org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method)
        at org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:9)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:193)
        at android.app.ActivityThread.main(ActivityThread.java:6669)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
@Manvendra-Jadon
Copy link
Author

Ad Tag Url is shared on email : dev.exoplayer@gmail.com

@andrewlewis
Copy link
Collaborator

andrewlewis commented Oct 29, 2020

That exception indicates that the IMA SDK requested to stop an ad while the player was backgrounded. When backgrounded, if there was an ad playing it should be paused, so something unexpected is happening. We used to log a warning for this case but in fa7d26d we switched to throwing as the unexpected behavior didn't seem to occur any more.

  • Please could you give some more guidance to help me reproduce the same problem here? Did you need to background and resume the app? The ad tag provided via email seems to be serving an empty ad.
  • Can you reproduce this error in the ExoPlayer demo app?
  • Are your custom video ad player callbacks interacting with the IMA SDK or ImaAdsLoader in some way?

For ads playing continuously, please could you provide steps to reproduce the problem? Thanks.

@Manvendra-Jadon
Copy link
Author

@andrewlewis
Please could you give some more guidance to help me reproduce the same problem here? Did you need to background and resume the app? The ad tag provided via email seems to be serving an empty ad.
No doing anything here, simply trying to play any video(foreground). Ads(Pre-roll) are being served continously.

Are your custom video ad player callbacks interacting with the IMA SDK or ImaAdsLoader in some way?
No, will share the code on mail.

Can you reproduce this error in the ExoPlayer demo app?
Will update you on this, once i try this.

@Manvendra-Jadon
Copy link
Author

@andrewlewis
Can you reproduce this error in the ExoPlayer demo app?
Unable to reproduce this in demo app. I will look into this again on my end, if i have missed something.

@andrewlewis
Copy link
Collaborator

Unable to reproduce this in demo app. I will look into this again on my end, if i have missed something.

Thanks. Please check if you are calling any methods on the ImaAdsLoader from your app code (if there is any doubt if particular calls are valid, feel free to post here and I can confirm). In particular, the app shouldn't be calling ImaAdsLoader.stop as that's called by the AdsMediaSource.

@google-oss-bot
Copy link
Collaborator

Hey @Manvendra-Jadon. We need more information to resolve this issue but there hasn't been an update in 14 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

@google-oss-bot
Copy link
Collaborator

Since there haven't been any recent updates here, I am going to close this issue.

@Manvendra-Jadon if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.

@google google locked and limited conversation to collaborators Feb 2, 2021
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

3 participants