Interstitial AdActivity crash

461 views
Skip to first unread message

易昊

unread,
Jun 6, 2019, 5:05:22 AM6/6/19
to Google Mobile Ads SDK Developers
Hi,

I have used Admob interstitial ads in my app, and sometimes the interstitial ads activity crash, the error log is as below. 
I found this error is caused by I didn't hold the 
PublisherInterstitialAd reference, and I  new it every time, then GC will call com.google.android.gms.ads.nonagon.ad.interstitial.b.finalize(), and it at last throw the exception.
It can be worked around by making PublisherInterstitialAd reference retained, but I hope you can fix this issue. Thanks!

019-06-06 15:24:48.724 25698-25707/ E/System: Uncaught exception thrown by finalizer
2019-06-06 15:24:48.725 25698-25707/ E/System: java.lang.RuntimeException: java.lang.Throwable: A WebView method was called on thread 'FinalizerDaemon'. All WebView methods must be called on the same thread. (Expected Looper Looper (main, tid 2) {7868a98} called on null, FYI main Looper is Looper (main, tid 2) {7868a98})
        at android.webkit.WebView.checkThread(WebView.java:2486)
        at android.webkit.WebView.evaluateJavascript(WebView.java:1047)
        at com.google.android.gms.ads.internal.webview.v.evaluateJavascript(:com.google.android.gms.policy_ads_fdr_dynamite@20290004@20290004.249178941.249178941:4)
        at com.google.android.gms.ads.internal.webview.v.f(:com.google.android.gms.policy_ads_fdr_dynamite@20290004@20290004.249178941.249178941:3)
        at com.google.android.gms.ads.internal.webview.v.g(:com.google.android.gms.policy_ads_fdr_dynamite@20290004@20290004.249178941.249178941:4)
        at com.google.android.gms.ads.internal.webview.v.a(:com.google.android.gms.policy_ads_fdr_dynamite@20290004@20290004.249178941.249178941:46)
        at com.google.android.gms.ads.internal.webview.v.a(:com.google.android.gms.policy_ads_fdr_dynamite@20290004@20290004.249178941.249178941:42)
        at com.google.android.gms.ads.internal.webview.v.g(:com.google.android.gms.policy_ads_fdr_dynamite@20290004@20290004.249178941.249178941:7)
        at com.google.android.gms.ads.internal.webview.v.onDetachedFromWindow(:com.google.android.gms.policy_ads_fdr_dynamite@20290004@20290004.249178941.249178941:5)
        at android.view.View.dispatchDetachedFromWindow(View.java:17446)
        at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:3682)
        at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:3674)
        at android.view.ViewGroup.removeViewInternal(ViewGroup.java:5227)
        at android.view.ViewGroup.removeViewInternal(ViewGroup.java:5198)
        at android.view.ViewGroup.removeView(ViewGroup.java:5129)
        at com.google.android.gms.ads.internal.overlay.d.i(:com.google.android.gms.policy_ads_fdr_dynamite@20290004@20290004.249178941.249178941:1)
        at com.google.android.gms.ads.internal.webview.v.destroy(:com.google.android.gms.policy_ads_fdr_dynamite@20290004@20290004.249178941.249178941:2)
        at com.google.android.gms.ads.internal.webview.t.destroy(:com.google.android.gms.policy_ads_fdr_dynamite@20290004@20290004.249178941.249178941:10)
        at com.google.android.gms.ads.nonagon.ad.interstitial.b.finalize(:com.google.android.gms.policy_ads_fdr_dynamite@20290004@20290004.249178941.249178941:2)
        at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:250)
        at java.lang.Daemons$FinalizerDaemon.runInternal(Daemons.java:237)
        at java.lang.Daemons$Daemon.run(Daemons.java:103)
        at java.lang.Thread.run(Thread.java:764)
     Caused by: java.lang.Throwable: A WebView method was called on thread 'FinalizerDaemon'. A

Mobile Ads SDK Forum Advisor Prod

unread,
Jun 6, 2019, 6:14:00 AM6/6/19
to yhchi...@gmail.com, google-adm...@googlegroups.com
Hi,

Thank you for reporting this. I will raise this information to the Engineering team and get back to you for any feedback.

Regards,
Teejay Pimentel
Mobile Ads SDK Team

ref:_00D1U1174p._5001UBloPf:ref

Jerry Chen

unread,
Jun 7, 2019, 9:33:46 PM6/7/19
to Google Mobile Ads SDK Developers
Hi  

I encounter the same issue, it happened recently,  do you have solution for this now?
        at com.google.android.gms.ads.nonagon.ad.interstitial.b.finalize(:com.google.android.gms.policy_ads_fdr_dynamite@2029...@20290004.249178941.249178941:2)

Mobile Ads SDK Forum Advisor Prod

unread,
Jun 9, 2019, 9:53:50 PM6/9/19
to jerry.che...@gmail.com, google-adm...@googlegroups.com
Hi Jerry,

Thank you for reporting this. I'm afraid that there is no update on this issue yet. Rest assured that our team is actively working on this and we'll keep you posted for any updates.

Tulshi Ram Dewangan

unread,
Jun 11, 2019, 1:24:06 PM6/11/19
to Google Mobile Ads SDK Developers
Today, I have to face some issues related to AdMob interstitial ads. please guiding me.

at com.google.android.gms.ads.internal.overlay.d.i(:com.google.android.gms.policy_ads_fdr_dynamite@20290004@20290004.249178941.249178941:1)
        at com.google.android.gms.ads.internal.webview.v.destroy(:com.google.android.gms.policy_ads_fdr_dynamite@20290004@20290004.249178941.249178941:2)
        at com.google.android.gms.ads.internal.webview.t.destroy(:com.google.android.gms.policy_ads_fdr_dynamite@20290004@20290004.249178941.249178941:10)
        at com.google.android.gms.ads.nonagon.ad.rewardedvideo.c.finalize(:com.google.android.gms.policy_ads_fdr_dynamite@20290004@20290004.249178941.249178941:2)
        at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:229)
        at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:207)
        at java.lang.Thread.run(Thread.java:818)

Mobile Ads SDK Forum Advisor Prod

unread,
Jun 11, 2019, 5:36:24 PM6/11/19
to tulshira...@gmail.com, google-adm...@googlegroups.com
Hello there,

Can you please elaborate your issue here and provide us more detailed crash logs and the steps to reproduce the issue?

Regards,
Deepika Uragayala

Pal Levente

unread,
Jun 16, 2019, 4:47:34 PM6/16/19
to Google Mobile Ads SDK Developers
I'm having the same issue. I don't know what happened, but recently the interstitial ads are crashing the app. Latest google play service which we're using is: 17.2.1
        at com.google.android.gms.ads.nonagon.ad.interstitial.b.finalize(:com.google.android.gms.policy_ads_fdr_dynamite@2029...@20290004.249178941.249178941:2)

Mobile Ads SDK Forum Advisor Prod

unread,
Jun 17, 2019, 1:47:01 AM6/17/19
to levent...@gmail.com, google-adm...@googlegroups.com
Hi Pal,

Could you please provide us the stack trace of the crash so we could check?

Regards,
Teejay Pimentel

Joe Hopkins

unread,
Jun 17, 2019, 1:18:26 PM6/17/19
to Google Mobile Ads SDK Developers
I believe we are having the same issue. During the middle of ad playback the following error happens on Android 6.0+

18 00:08:01.151 23870 25099 I MediaCodec: Codec shutdown complete

06-18 00:08:01.152 23870 23878 E System  : android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.

06-18 00:08:01.152 23870 23878 E System  : at android.view.ViewRootImpl.checkThread(ViewRootImpl.java:7901)

06-18 00:08:01.152 23870 23878 E System  : at android.view.ViewRootImpl.invalidateChildInParent(ViewRootImpl.java:1360)

06-18 00:08:01.152 23870 23878 E System  : at android.view.ViewGroup.invalidateChild(ViewGroup.java:5448)

06-18 00:08:01.152 23870 23878 E System  : at android.view.View.invalidateInternal(View.java:14829)

06-18 00:08:01.152 23870 23878 E System  : at android.view.View.invalidate(View.java:14793)

06-18 00:08:01.152 23870 23878 E System  : at android.view.View.onFocusChanged(View.java:6849)

06-18 00:08:01.152 23870 23878 E System  : at android.webkit.WebView.onFocusChanged(WebView.java:2575)

06-18 00:08:01.152 23870 23878 E System  : at android.view.View.clearFocusInternal(View.java:6734)

06-18 00:08:01.152 23870 23878 E System  : at android.view.View.unFocus(View.java:6767)

06-18 00:08:01.152 23870 23878 E System  : at android.view.ViewGroup.unFocus(ViewGroup.java:996)

06-18 00:08:01.152 23870 23878 E System  : at android.view.ViewGroup.unFocus(ViewGroup.java:998)

06-18 00:08:01.152 23870 23878 E System  : at android.view.ViewGroup.removeViewInternal(ViewGroup.java:4945)

06-18 00:08:01.152 23870 23878 E System  : at android.view.ViewGroup.removeViewInternal(ViewGroup.java:4932)

06-18 00:08:01.152 23870 23878 E System  : at android.view.ViewGroup.removeView(ViewGroup.java:4863)

06-18 00:08:01.152 23870 23878 E System  : at com.google.android.gms.ads.internal.overlay.d.i(:com.google.android.gms.policy_ads_fdr_dynamite@20290000@20290000.249178941.249178941:1)

06-18 00:08:01.152 23870 23878 E System  : at com.google.android.gms.ads.internal.webview.v.destroy(:com.google.android.gms.policy_ads_fdr_dynamite@20290000@20290000.249178941.249178941:2)

06-18 00:08:01.152 23870 23878 E System  : at com.google.android.gms.ads.internal.webview.t.destroy(:com.google.android.gms.policy_ads_fdr_dynamite@20290000@20290000.249178941.249178941:10)

06-18 00:08:01.152 23870 23878 E System  : at com.google.android.gms.ads.nonagon.ad.rewardedvideo.c.finalize(:com.google.android.gms.policy_ads_fdr_dynamite@20290000@20290000.249178941.249178941:2)

06-18 00:08:01.152 23870 23878 E System  : at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:222)

06-18 00:08:01.152 23870 23878 E System  : at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:209)

06-18 00:08:01.152 23870 23878 E System  : at java.lang.Thread.run(Thread.java:762)

Mobile Ads SDK Forum Advisor Prod

unread,
Jun 18, 2019, 1:38:40 AM6/18/19
to hopkins...@gmail.com, google-adm...@googlegroups.com
Hi Joe,

Thank you for reaching out to us. I'm Ziv, Teejay's colleague, and I will be assisting you on your concern since he is out-of-office today.

The error log you have provided is indeed related to the issue outlined in this thread. The bug with WebView has already been fixed as per our Engineering team, however I cannot give a definite timeline for when the update will be released. You may follow our blog or release notes for future updates.

In the meantime, you may use the following workaround: kindly retain a reference to the rewarded ad in question while it is still playing onscreen, and use a new variable instead when you want a load a new rewarded ad during this time.

Regards,
Ziv Yves Sanchez

Joe Hopkins

unread,
Jun 20, 2019, 2:48:27 PM6/20/19
to google-adm...@googlegroups.com
Hi Ziv,

Can you clarify what you mean by retaining a reference to the rewarded ad in question? We updated our ad class to do the following, the but issue remains.


private RewardBasedVideoAd currentRewardedAd;//for storing reference to the ad 
                                     
...               
                 
if (RewardBasedVideoAd.Instance.IsLoaded())
        {
            this.currentRewardedAd = RewardBasedVideoAd.Instance;
            this.currentRewardedAd.Show();


            //Original before workaround:
            //RewardBasedVideoAd.Instance.Show();
        }
 
 

Joe Hopkins

unread,
Jun 20, 2019, 3:07:28 PM6/20/19
to Google Mobile Ads SDK Developers
How do you retain the reference? We are having the same with  RewardBasedVideoAd.Instance  
        at com.google.android.gms.ads.nonagon.ad.interstitial.b.finalize(:com.google.android.gms.policy_ads_fdr_dynamite@2029...@20290004.249178941.249178941:2)

Mobile Ads SDK Forum Advisor Prod

unread,
Jun 20, 2019, 10:16:36 PM6/20/19
to hopkins...@gmail.com, google-adm...@googlegroups.com
Hi Joe,

You may try using the new Rewarded Ads API instead, and apply the workaround there if necessary (that is, you may simply repeat this step using a new variable instead of recycling the old one when requesting a new ad).

Let me know if this works for you.

陈云龙

unread,
Jul 24, 2019, 7:25:42 AM7/24/19
to Google Mobile Ads SDK Developers
I encounter the same issue, and I fixed it
maybe you should stop load new interstitial Ad when the current ad is showing
        at com.google.android.gms.ads.nonagon.ad.interstitial.b.finalize(:com.google.android.gms.policy_ads_fdr_dynamite@2029...@20290004.249178941.249178941:2)

tipetipe65

unread,
Jul 24, 2019, 7:44:01 AM7/24/19
to yunsh...@gmail.com, google-adm...@googlegroups.com
Idak masuk



Dikirim dari Redmi Note 5A saya
        at com.google.android.gms.ads.nonagon.ad.interstitial.b.finalize(:com.google.android.gms.policy_ads_fdr_dynamite@20290004@20290004.249178941.249178941:2)
        at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:250)
        at java.lang.Daemons$FinalizerDaemon.runInternal(Daemons.java:237)
        at java.lang.Daemons$Daemon.run(Daemons.java:103)
        at java.lang.Thread.run(Thread.java:764)
     Caused by: java.lang.Throwable: A WebView method was called on thread 'FinalizerDaemon'. A

--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-admob-ads-sdk/763ed896-fbc1-4e5c-ba24-2b2508b6b51f%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages