googleads-mobile-unity: Alot of ANRs and crashes after updating to 7.x
- Unity version: 2021.3.4
- Google Mobile Ads Unity plugin version: 7.0.2
- Platform: android
- Platform OS version: /
- Any specific devices issue occurs on: /
- Mediation ad networks used, and their versions: Unity ADs 3.2.0, AppLovin 6.2.0, Facebook 3.7.0
I don’t know how to reproduce, but this is screen shot from google play console, after we upgraded from 6.0.2 to new admob plugins all of this started:
Admob team this is really critical, because of all new SDKs we upgraded Unity version and now we don’t really want to go back. Can you give us some advice what to do?
We are also using those optimization flags:
<meta-data android:name="com.google.android.gms.ads.flag.OPTIMIZE_INITIALIZATION" android:value="true"/> <meta-data android:name="com.google.android.gms.ads.flag.OPTIMIZE_AD_LOADING" android:value="true"/>
Please any advice would be appreciated, because google is now ranking us very badly because of this…
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 1
- Comments: 67 (6 by maintainers)
Oh that might work too, didn’t even know it existed. Google should seriously warn about these kind of pitfalls and refer to these kind of solutions. I’d expect as little as that from a company that is earning billions of dollars from advertising. These kind of errors seriously make me consider switching to another ad platform, as it’s certainly not the only cryptic problem I had with AdMob so far.
Not sure it’s the exact same problem, but I figured this could be helpful to someone else reading this thread. I’ve been getting fatal signal 5 when the “OnUserEarnedReward” event fired. I was taking UI actions there such as hiding a canvas, etc. and apparently this callback function isn’t running from the main thread, and if you try and take UI actions, the app might just crash. Sigh.
If you got this problem and you’re looking for a quick fix, calling this utility to run UI functions on the main thread can help. https://github.com/PimDeWitte/UnityMainThreadDispatcher
Downgrading to Unity 2020.3.34 doesn’t help. Here’s screenshot:
As I can see the errors can be the same as here #2137 #2141
@pabloleban my crashes have significantly dropped
still a bit above pre-upgrading level but good enough, that we are under threshold