Admob library causes ANR problems to the App

444 views
Skip to first unread message

Денис Жигало

unread,
Jul 6, 2018, 3:28:16 AM7/6/18
to Google Mobile Ads SDK Developers
Hello! 
I am seeing increasing number of ANR's in my Developer Console caused by Google Mobile Ads SDK.
I'm using the latest 
'com.google.android.gms:play-services-ads:15.0.1' 
for Banner Ads.
targetSdkVersion - 27
In some circumstances Admob library causes ANR errors like this: 

"main" prio=5 tid=1 Native
  | group="main" sCount=1 dsCount=0 obj=0x74bc1f98 self=0xb857ac60
  | sysTid=10822 nice=-4 cgrp=default sched=0/0 handle=0xb6f4fb34
  | state=S schedstat=( 1053063835 443543280 3289 ) utm=64 stm=41 core=0 HZ=100
  | stack=0xbe0de000-0xbe0e0000 stackSize=8MB
  | held mutexes=
  #00  pc 0000000000042e60  /system/lib/libc.so (__ioctl+8)
  #01  pc 0000000000049b7d  /system/lib/libc.so (ioctl+14)
  #02  pc 000000000001ea1d  /system/lib/libbinder.so (_ZN7android14IPCThreadState14talkWithDriverEb+132)
  #03  pc 000000000001f083  /system/lib/libbinder.so (_ZN7android14IPCThreadState15waitForResponseEPNS_6ParcelEPi+38)
  #04  pc 000000000001f239  /system/lib/libbinder.so (_ZN7android14IPCThreadState8transactEijRKNS_6ParcelEPS1_j+124)
  #05  pc 000000000001a1cf  /system/lib/libbinder.so (_ZN7android8BpBinder8transactEjRKNS_6ParcelEPS1_j+30)
  #06  pc 0000000000089bf9  /system/lib/libandroid_runtime.so (???)
  #07  pc 0000000000dc78d9  /system/framework/arm/boot.oat (Java_android_os_BinderProxy_transactNative__ILandroid_os_Parcel_2Landroid_os_Parcel_2I+140)
  at android.os.BinderProxy.transactNative (Native method)
  at android.os.BinderProxy.transact (Binder.java:503)
  at android.net.IConnectivityManager$Stub$Proxy.getAllNetworks (IConnectivityManager.java:1110)
  at android.net.ConnectivityManager.getAllNetworks (ConnectivityManager.java:807)
  at org.chromium.net.NetworkChangeNotifierAutoDetect.getAllNetworksFiltered (NetworkChangeNotifierAutoDetect.java:82)
  at org.chromium.android_webview.AwNetworkChangeNotifierRegistrationPolicy.onFirstWebViewCreated (AwNetworkChangeNotifierRegistrationPolicy.java:38)
  at org.chromium.android_webview.AwContentsLifecycleNotifier.onWebViewCreated (AwContentsLifecycleNotifier.java:8)
  at org.chromium.android_webview.AwContents.nativeInit (Native method)
  at org.chromium.android_webview.AwContents.<init> (AwContents.java:80)
  at com.android.webview.chromium.WebViewChromium$1.run (WebViewChromium.java:14)
  at org.chromium.android_webview.WebViewChromiumRunQueue.drainQueue (WebViewChromiumRunQueue.java:13)
  at org.chromium.android_webview.WebViewChromiumRunQueue$1.run (WebViewChromiumRunQueue.java:2)
  at org.chromium.base.ThreadUtils.runOnUiThread (ThreadUtils.java:30)
  at org.chromium.android_webview.WebViewChromiumRunQueue.addTask (WebViewChromiumRunQueue.java:7)
  at com.android.webview.chromium.WebViewChromiumFactoryProvider.addTask (WebViewChromiumFactoryProvider.java:6)
  at com.android.webview.chromium.WebViewChromium.init (WebViewChromium.java:93)
  at android.webkit.WebView.<init> (WebView.java:606)
  at android.webkit.WebView.<init> (WebView.java:542)
  at android.webkit.WebView.<init> (WebView.java:525)
  at android.webkit.WebView.<init> (WebView.java:512)
  at android.webkit.WebView.<init> (WebView.java:502)
  at com.google.android.gms.ads.internal.webview.q.call (unavailable:5)
  at com.google.android.gms.ads.internal.js.z.run (unavailable:5)
  at android.os.Binder.transact (Binder.java:387)
  at com.google.android.gms.internal.ads.zzej.transactAndReadExceptionReturnVoid (unavailable)
  at com.google.android.gms.internal.ads.zzll.zza (unavailable)
  at com.google.android.gms.internal.ads.zzmb.zza (unavailable)
- locked <0x0018b30d> (a java.lang.Object)
  at com.google.android.gms.ads.MobileAds.initialize (unavailable)
  at com.google.android.gms.ads.MobileAds.initialize (unavailable)
  at my.app.Application.onCreate (Application.java:41)
  at android.app.Instrumentation.callApplicationOnCreate (Instrumentation.java:1036)
  at android.app.ActivityThread.handleBindApplication (ActivityThread.java:4728)
  at android.app.ActivityThread.-wrap1 (ActivityThread.java)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1415)
  at android.os.Handler.dispatchMessage (Handler.java:102)
  at android.os.Looper.loop (Looper.java:148)
  at android.app.ActivityThread.main (ActivityThread.java:5443)
  at java.lang.reflect.Method.invoke! (Native method)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:728)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:618)



my.app.Application.onCreate (Application.java:41):
MobileAds.initialize(
this, "ADMOB_APP_ID");

mobileadssdk-a...@google.com

unread,
Jul 6, 2018, 5:23:32 AM7/6/18
to Денис Жигало, Google Mobile Ads SDK Developers
Hi,

Thank you for providing the error logs captured.

I'm assuming that this is not reproducible on your end locally, however, if you were able to reproduce it later, then providing us a sample project and replication steps will be really helpful. On the other hand, in your last comment, are you implying that the crash was triggered from MobileAds.initialize()?

To help with our investigation, could you provide to us privately (using Reply privately to author option) the following information?
  • Information on the affected Devices
  • Complete ANR or crash reports from your Developer Console
  • If available, Crashlytics link
Regards,
Ivan Bautista
Mobile Ads SDK Team

Денис Жигало

unread,
Jul 6, 2018, 8:29:34 AM7/6/18
to google-adm...@googlegroups.com

Yes, this is not reproducible on my end locally. 

ANR was triggered from my.app.Application.onCreate line MobileAds.initialize().

Information on the affected Devices and android versions on picture.




mobileadssdk-a...@google.com

unread,
Jul 9, 2018, 1:51:44 AM7/9/18
to Денис Жигало, Google Mobile Ads SDK Developers
Hi,

Thank you for the additional information provided.

I will pass this on to the rest of the team and we will update you accordingly in this thread.

mobileadssdk...@google.com

unread,
Jan 29, 2019, 3:31:53 AM1/29/19
to Денис Жигало, Google Mobile Ads SDK Developers, mobileadssdk-a...@google.com
Hi,

I just want to check back with you if you are still encountering the same ANRs even with our latest SDK version (17.1.1 as of this writing). However, please note that starting 17.0.0, there is a required step when initializing the Mobile Ads SDK.

Regards,
Ivan Bautista
Mobile Ads SDK Team


Reply all
Reply to author
Forward
0 new messages