Search Unity

Unity Ads and Android ANR

Discussion in 'Unity Ads' started by JustAnotherDude, Sep 25, 2019.

  1. JustAnotherDude

    JustAnotherDude

    Joined:
    Oct 28, 2013
    Posts:
    189
    So I pretty much removed every single bug from my app, the last version had 0 crashes on 1000+ downloads.

    Now I'm looking at these ANRs that appear on Google Console, and I had only 1 for this latest version, I cannot figure out where these come from, apparently they come from opening some urls?

    I do not use any kind of web browsing in the game.

    I use Unity Ads only and the Google Play Plugin for Unity is used for login, save games on cloud and achievements.

    I'm thinking this comes from maybe Unity Ads then?


    Code (CSharp):
    1. "main" tid=1 Native
    2.  
    3. "main" prio=5 tid=1 Native
    4.   | group="main" sCount=1 dsCount=0 obj=0x73f79000 self=0xb81ecad0
    5.   | sysTid=6477 nice=-10 cgrp=default sched=0/0 handle=0xb6f84000
    6.   | state=S schedstat=( 3336988762 539778696 5285 ) utm=248 stm=85 core=1 HZ=100
    7.   | stack=0xbe680000-0xbe682000 stackSize=8MB
    8.   | held mutexes=
    9.  
    10.   #00  pc 0000000000012aa0  /system/lib/libc.so (syscall+28)
    11.  
    12.   #01  pc 00000000000a98af  /system/lib/libart.so (_ZN3art17ConditionVariable4WaitEPNS_6ThreadE+82)
    13.  
    14.   #02  pc 0000000000269eb1  /system/lib/libart.so (artFindNativeMethod+1152)
    15.  
    16.   #03  pc 00000000000a1495  /system/lib/libart.so (art_jni_dlsym_lookup_stub+4)
    17.  
    18.   #04  pc 00000000001297a7  /data/dalvik-cache/arm/system@app@AmazonWebView@AmazonWebView.apk@classes.dex (Java_org_chromium_content_browser_webcontents_WebContentsImpl_nativeGetLastCommittedURL__J+90)
    19.  
    20.   at org.chromium.content.browser.webcontents.WebContentsImpl.nativeGetLastCommittedURL (Native method)
    21.  
    22.   at org.chromium.content.browser.webcontents.WebContentsImpl.getLastCommittedUrl (WebContentsImpl.java:510)
    23.  
    24.   at org.chromium.android_webview.AwContents.loadUrl (AwContents.java:1754)
    25.  
    26.   at org.chromium.android_webview.AwContents.loadDataWithBaseURL (AwContents.java:1733)
    27.  
    28.   at com.android.webview.chromium.WebViewChromium.loadDataWithBaseURL (WebViewChromium.java:610)
    29.  
    30.   at com.android.webview.chromium.WebViewExtAmazon.loadDataWithBaseURL (WebViewExtAmazon.java:56)
    31.  
    32.   at android.webkit.WebView.loadDataWithBaseURL (WebView.java:946)
    33.  
    34.   at com.unity3d.services.core.webview.WebViewApp$1.run (WebViewApp.java:287)
    35.  
    36.   at android.os.Handler.handleCallback (Handler.java:739)
    37.  
    38.   at android.os.Handler.dispatchMessage (Handler.java:95)
    39.  
    40.   at android.os.Looper.loop (Looper.java:135)
    41.  
    42.   at android.app.ActivityThread.main (ActivityThread.java:5597)
    43.  
    44.   at java.lang.reflect.Method.invoke! (Native method)
    45.  
    46.   at java.lang.reflect.Method.invoke (Method.java:372)
    47.  
    48.   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:984)
    49.  
    50.   at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:779)

    The ANR message:


    Input dispatching timed out (Waiting to send non-key event because the touched window has not finished processing certain input events that were delivered to it over 500.0ms ago. Wait queue length: 38. Wait queue head age: 5506.2ms.)

    com.unity3d.player.UnityPlayerActivity
     
  2. ap-unity

    ap-unity

    Unity Technologies

    Joined:
    Aug 3, 2016
    Posts:
    1,379
    Which version of Unity are you using for this app?
     
  3. JustAnotherDude

    JustAnotherDude

    Joined:
    Oct 28, 2013
    Posts:
    189
    The build currently online I have is version 2019.2.6f1 and it still happens.

    But it has happened since I don't even know when, I just always ignored these.
     
  4. ritnickior

    ritnickior

    Joined:
    Jul 5, 2016
    Posts:
    1
    I have exactly the same ANRs every day. My vitals are very bad now.
    I don't use any kind of web browsing in my app and I use only Unity Ads.
    Unity 2018.4
     
  5. ap-unity

    ap-unity

    Unity Technologies

    Joined:
    Aug 3, 2016
    Posts:
    1,379
    @JustAnotherDude, @ritnickior

    Thanks for the reports. We have seen similar reports in the past; however, we generally have trouble tracking down the exact cause because they are intermittent and hard to reproduce. And unfortunately, the error message Google Play provides aren't usually enough to narrow down the issue.

    When we are able to reproduce the issue and determine the cause, we of course fix them. The SDK is continually working to improve performance, and we have made some changes to how we're tracking SDK performance that should help on that front.
     
    JustAnotherDude likes this.
  6. JustAnotherDude

    JustAnotherDude

    Joined:
    Oct 28, 2013
    Posts:
    189
  7. AndrewFaraponov

    AndrewFaraponov

    Joined:
    Feb 26, 2018
    Posts:
    1
    I think it's could not, because in my apps I have just Unity Ads SDK and Facebook SDK.
    WebView needs by Unity Ads.
    And I also have the same issue in the last builds.
    Unity 2019.3.0b10
    And I will try with 2019.3.0f3
     
  8. afftar

    afftar

    Joined:
    Apr 18, 2014
    Posts:
    50
    I get a huge amount of similar ANR
     
unityunity