Search Unity

Bug ANR Input dispatching timed out

Discussion in 'Android' started by unity_2jxHNVY36zr2mg, Nov 9, 2020.

  1. unity_2jxHNVY36zr2mg

    unity_2jxHNVY36zr2mg

    Joined:
    Jan 17, 2020
    Posts:
    86
    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: 2. Wait queue head age: 6144.6ms.)

    com.unity3d.player.UnityPlayerActivity

    Any tips on this?
     
  2. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,905
    Usually it means your UI thread is stuck, this error is usually followed up by a dump of all threads which has info which thread is waiting on which thread.
     
  3. xqwww

    xqwww

    Joined:
    Sep 26, 2017
    Posts:
    3
    The same issue we're facing. Anyone can help? Thank you.
    We know this is because after the ad SDKs (using ads meditation) are added, this will happen, but we don't know how to solve it.
     
  4. GadOleg

    GadOleg

    Joined:
    Nov 13, 2019
    Posts:
    58
    Same problem I don't know what to do with..

    Input dispatching timed out (c58c1f5 .../com.unity3d.player.UnityPlayerActivity (server) is not responding. Waited 5001ms for KeyEvent)
     
  5. AllanRW

    AllanRW

    Joined:
    Nov 6, 2014
    Posts:
    37
  6. Jojoanse

    Jojoanse

    Joined:
    Apr 2, 2018
    Posts:
    1
    @AllanRW solved the ANR having updated the Admob plugin? Thanks. ;)
     
  7. lucbloom

    lucbloom

    Joined:
    Mar 27, 2020
    Posts:
    42
    I've made a sneaky solution that might help. I'll be testing it on our live build over the coming weeks, and will report its effectiveness here. In the meantime, I welcome any suggestions to the idea and the implementation:
    https://github.com/lucbloom/unity_anr_supervisor

    ANR Supervisor
    A system that detects ANRs in the main thread and closes the game before the ANR is reported to Google. It reports the ANR to our own backend, which stores it in a Database for review.

    This alleviates the ANR rate reported by Google Analytics. Most ANRs are caused by Ad SDKs (e.g. Google's own AdMob), so there is an option to only enable it during ad views.

    Another solution could be to make a list of problematic devices and not show ads on those devices, but that's a project for another time.​
     
  8. lucbloom

    lucbloom

    Joined:
    Mar 27, 2020
    Posts:
    42
  9. MateAndor

    MateAndor

    Joined:
    Nov 5, 2014
    Posts:
    70
    Same issue here. :mad:
    I use Unity 2021.3.2f1 and Unity Ads 4.2.1f.
    A lot of ANRs and my ranking is just gone in Google Play :(
     
  10. lucbloom

    lucbloom

    Joined:
    Mar 27, 2020
    Posts:
    42
  11. DarkCooker

    DarkCooker

    Joined:
    Jan 7, 2015
    Posts:
    119
  12. pradotech

    pradotech

    Joined:
    Oct 17, 2019
    Posts:
    35
    For me it doesn't. At this time I'm not sure anymore what's the cause, I'm only going crazy at this point.
     
    th3z0d1ac likes this.
  13. Tomurtogu

    Tomurtogu

    Joined:
    Nov 30, 2012
    Posts:
    26
    Has there been any improvement in the situation in Google Play?
    We are having the same issue because of high anr/crash.
    Although we have made many corrections, our ranking issue do not seem to be improving.
     
  14. Lisan

    Lisan

    Joined:
    Jun 17, 2009
    Posts:
    220
    Hi!
    Can you say something about the results of using this tool?
     
  15. harun5678

    harun5678

    Joined:
    Jan 6, 2022
    Posts:
    1
    Anr Supervisor is causing build errors..any solution?