Android ANR [Input dispatching timed out] onUnityAdsReady

Hi,

I’ve been struggling with this ANR when using Unity Ads.
I’m using UnityAds both in AdMob mediation and natively as fallback ad source when mediation doesn’t provide an ad. So I have both AdMob plugin and Monetization plugin in my project.

It works in my other projects very well but in this new one I get many ANRs in Google Play that have “onUnityAdsReady” in the stack trace.

I’m not doing anything in OnUnityAdsReady callback (empty method).

Here’s an ANR from Google Play:

Which version of the SDK are you using? Do you have any full device logs from one of the ANRs?

Is it possible that this happened because I did Initialize before registering listeners?

I’m not sure what SDK version do I use. I’ve imported it from Asset Store few months back.

I just have logs from Google Play.

It’s possible I suppose, but unlikely. We don’t require people to use the standard listeners and there shouldn’t be any errors if the SDK doesn’t have any registered.

The best thing you can do at this stage is update your SDK as there is a good chance the issue might go away. Unfortunately, without more concrete information about what is causing the ANRs there isn’t much we can do.

We got gigantic anr spikes since mid december, supposedly also related with ads. Is it something known now?

@RGV I did not find a solution for this issue.
Half of my game’s ANRs are linked with this issue (onUnityAdsReady listner)

1 Like

Same here, just to pinch in. Since it’s fairly new topic.
Since Dec - it’s been up crazy, like double. Latest GoogleMobileAds SDK used here, (Release Google Mobile Ads Unity Plugin v5.4.0 · googleads/googleads-mobile-unity · GitHub) - no mediation, just admob.

I see a lot of these to be on Android 8.1, coming from google ads. Also with peers, I see even higher numbers.
Already sent email to Google Play about this, since vitals are some of core KPI for store performance - yet no reply.
I also just sent AdMob email.

I am unable to read out those crash logs in a way for them to make sense, sadly, so if anyone is technical enough to understand exceptions and posts here over time, would be cool.

Recently I removed AdMob completely (using different mediation instead), and problem is still there.

In the next few days I’m planing to remove Unity Ads too to see if it helps (I’m using Unity Ads as backup if mediation does not have ad ready).

I would just like to second this. Since mid december, ANRs went up, without doing any updates - and it went up for my peers too. Android 8.1 is the main source of it, as ANRs happen at at least 5 times the rate of any other android version.

As a way to stay below the bad behavious threshold untill we find a fix for this - does anyone know if it is possible to exclude android 8.1 users from downloading the apps?

Edit: This being a problem specifically with android 8.1, makes me wonder if the problem might be the Android Go Edition?

I am also facing lots of ANRs

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: 54. Wait queue head age: 10475.9ms.)

I have seen on some forums that main thread block causes this issue. the point is, when my game is running smooth without any lag and frames drops then why main thread gets block. if some body knows any thing regarding this issue please share with me.
I am using admob unity and firebase sdks.
is there any way to run ads in a separate thread? is it safe and logical to do this?
@kyle-unity i can share further details required to solve this

@unity_9460FB1EA99EC1823D00
Hey, do you have any news or additional information regarding this?

Avoid using Awake() too much use Start() instead. Doing this my ANR’s dropped from 0.7% to 0.19%

Use Awake() in just one script per scene.

Me myself was facing the increasing ANR’s issue and I got them reduced from 0.7% to 0.19% just by replacing Awake() by Start()

1 Like