Google AdMob Causing Background ANRs on API 30-33 (Android 11-13) After SDK 34 Update

148 views
Skip to first unread message

Axita Savani

unread,
Feb 13, 2025, 12:27:28 PMFeb 13
to Google Mobile Ads SDK Developers
Hello team, 
 I am experiencing a persistent ANR issue after updating my app to targetSDK 34. The ANR occurs only on API levels 30-33 (Android 11, 12, and 13). It is triggered by Google AdMob, as removing AdMob prevents the issue. However, I need AdMob for monetization, so I am looking for a proper resolution. 

Issue Details:
  • ANR Heading in Firebase: WV.wR.d - ANR triggered by slow operations in main thread
  • Stack Trace (Main Thread ANR):
main (runnable):tid=1 systid=3176 at java.lang.StringBuilder.append(StringBuilder.java:137) at WV.Yb.g(chromium-TrichromeWebViewGoogle.aab-stable-683416330:221) at WV.Yb.j(chromium-TrichromeWebViewGoogle.aab-stable-683416330:80) at WV.ry.e(chromium-TrichromeWebViewGoogle.aab-stable-683416330:74) at WV.ry.c(chromium-TrichromeWebViewGoogle.aab-stable-683416330:13) at WV.ry.b(chromium-TrichromeWebViewGoogle.aab-stable-683416330:8) at com.android.webview.chromium.N.e(chromium-TrichromeWebViewGoogle.aab-stable-683416330:70) at WV.mZ.run(chromium-TrichromeWebViewGoogle.aab-stable-683416330:11) at android.os.Handler.handleCallback(Handler.java:938) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:201) at android.os.Looper.loop(Looper.java:288) at android.app.ActivityThread.main(ActivityThread.java:7964) at java.lang.reflect.Method.invoke(Native method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:594) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1001)  
 

Observations:
  • This issue cannot be reproduced on my test devices, but live users are experiencing it frequently.
  • The ANR count has increased significantly after updating the target SDK to 34.
  • Removing Google AdMob eliminates the ANR, confirming its direct correlation with the issue.
  • 91% of these ANRs occur in the background (as seen in Firebase Crashlytics).
Affected Devices and OS:
  • Android 11 (API 30), Android 12 (API 31), Android 13 (API 32 & 33)
  •  Majority of cases are on HMD Global & Transsion devices  

Request for Assistance:
  1. Could you please check if Google AdMob SDK has compatibility issues with targetSDK 34 on API levels 30-33 (Android 11-13)?
  2. Are there any best practices or workarounds to prevent AdMob from causing background ANRs?
  3. Would updating to a specific AdMob version resolve this issue?

I appreciate your help in resolving this matter. Let me know if you need additional logs or details.

Thank you!


Mobile Ads SDK Forum Advisor

unread,
Feb 13, 2025, 5:09:00 PMFeb 13
to axita.op...@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. 

Please note that the best way to optimize initialization is to call MobileAds.initialize() on a background thread, as described in the Get Started guide

I have executed our Google Sample project with the specified versions and am unable to reproduce the issue. 

Kindly provide the below information privately so we can gain full visibility of your implementation.

  • ad unit ID
  • The full stack trace
  • Steps to replicate (Without any reproducible steps the ANR is not actionable)
  • Affected devices

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=5004Q00002vH1mKQAS&entry.80707362=00288261 

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.!5004Q02vH1mK:ref" (ADR-00288261)

Thanks,
 
Google Logo Mobile Ads SDK Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5 



Reply all
Reply to author
Forward
0 new messages