A lot of ANRs from MobileAds.registerWebview API

136 views
Skip to first unread message

Mar3kk

unread,
Jul 29, 2024, 9:12:24 PM7/29/24
to Google Mobile Ads SDK Developers
SDK version: play-services-ads-lite:22.3.0

We see a lot of ANRs from the MobileAds.registerWebview API seemed to caused by slow binder calls.

All the reports look similar having similar frames on top of the stack. This is currently our top ANR.

  at com.google.android.gms.ads.nonagon.signals.ba.b (:com.google.android.gms.policy_ads_fdr_dynamite@241806205@241806202034.633974825.633974825:1) at com.google.android.gms.ads.nonagon.signalgeneration.q.<init> (:com.google.android.gms.policy_ads_fdr_dynamite@241806205@241806202034.633974825.633974825:13) at com.google.android.gms.ads.nonagon.ap.a (:com.google.android.gms.policy_ads_fdr_dynamite@241806205@241806202034.633974825.633974825:28) at com.google.android.gms.ads.nonagon.signalgeneration.ai.b (:com.google.android.gms.policy_ads_fdr_dynamite@241806205@241806202034.633974825.633974825:256) at com.google.android.gms.ads.nonagon.signalgeneration.ai.n (:com.google.android.gms.policy_ads_fdr_dynamite@241806205@241806202034.633974825.633974825:60) at com.google.android.gms.ads.nonagon.signalgeneration.ai.s (:com.google.android.gms.policy_ads_fdr_dynamite@241806205@241806202034.633974825.633974825:52) at com.google.android.gms.ads.nonagon.signalgeneration.ai.h (:com.google.android.gms.policy_ads_fdr_dynamite@241806205@241806202034.633974825.633974825:30) at com.google.android.gms.ads.internal.signals.e.bV (:com.google.android.gms.policy_ads_fdr_dynamite@241806205@241806202034.633974825.633974825:259) at m.amo.onTransact (:com.google.android.gms.policy_ads_fdr_dynamite@241806205@241806202034.633974825.633974825:21) at android.os.Binder.transact (Binder.java:1046)

Is there any way to mitigate this issue? Can you tell what is the root cause?  Is this binder calling google play services installed on the device? 

We plan to update the SDK to latest one but looking at the release notes it doesn't seem there are any fixes around that.

Mobile Ads SDK Forum Advisor

unread,
Jul 30, 2024, 7:38:25 AM7/30/24
to mar...@gmail.com, google-adm...@googlegroups.com

Hi,

Thank you for contacting the Mobile Ads SDK Support team.

It is always recommended to keep the SDKs up to date to avoid such issues. As of today, the latest version of Android is 23.2.0. As you mentioned that you are using the play-services-ads-lite:22.3.0, I would advise you to know about the Limitations of the Lite SDK.

As you mentioned that you see a lot of ANRs from the MobileAds.registerWebview, The WebView init is a heavy task (especially the 1st init call) which unfortunately will occupy the UI thread. The Google Mobile Ads SDK relies on WebView heavily and currently this is not something the team can control. As a result, it is inline with expectations that the ANR is happening to a majority of devices with older Android versions.

Could you confirm whether you have enabled the Optimize initialization and ad loading inorder to enhance the overall responsiveness of ads and help prevent “Application Not Responding" (ANR) errors on your app. You can also refer to WebView API.

If the issue still persists, kindly provide us the below information privately so that we can gain full visibility of your implementation:

  • Sample project reproducing the issue
  • Steps to replicate
  • Full stack trace

If the file(s) you are looking to share are less than 25mb in total you can attach them to this case on your next reply. If you are having trouble attaching your file to this case or if your file(s) are larger than 25mb, you can share your files via reply to author option or by performing the following steps:

1. Navigate to

https://docs.google.com/forms/d/e/1FAIpQLSfkAiXMeYP-fw1W3Z-tT9uwmATEKO5X6S-th0gR2ezdKaaqfg/viewform?usp=pp_url&entry.400550049=Mobile+Ads+SDK&entry.460850823=5004Q00002vEIzaQAG&entry.80707362=00260054

2. Fill out all fields, and attach your file(s).

3. Please reply back on this thread when you have uploaded your file(s). Please do not share this link.

This message is in relation to case "ref:!00D1U01174p.!5004Q02vEIza:ref" (ADR-00260054)

Thanks,
 
Google Logo Mobile Ads SDK Team


Reply all
Reply to author
Forward
0 new messages