AppLovin/AppLovin-MAX-Unity-Plugin

Since integrating AppLovin MAX, there have been many ANRs

StarSprite opened this issue · 17 comments

MAX Plugin Version

6.5.2

Unity Version

2022.3.34f1

Device/Platform Info

Android

Current Behavior

Screenshot 2024-06-22 at 9 10 49 PM

"main" tid=1 Native
#00 pc 0x0000000000085a1c /apex/com.android.runtime/lib64/bionic/libc.so (syscall+28)
#1 pc 0x000000000008a1c0 /apex/com.android.runtime/lib64/bionic/libc.so (__futex_wait_ex+144)
#2 pc 0x00000000000ea798 /apex/com.android.runtime/lib64/bionic/libc.so (pthread_cond_wait+72)
#3 pc 0x0000000006389c6c /data/app/~~0UZ8FHZzl4EtGOyQyl6Bww==/com.google.android.trichromelibrary_642216533-allSKankAZpd2EKX_72-PA==/base.apk (BuildId: c064be5ff2a235a357349c021663865bc1608cc9)
#4 pc 0x0000000003b0cb84 /data/app/~~0UZ8FHZzl4EtGOyQyl6Bww==/com.google.android.trichromelibrary_642216533-allSKankAZpd2EKX_72-PA==/base.apk (BuildId: c064be5ff2a235a357349c021663865bc1608cc9)
#5 pc 0x0000000005f0bde4 /data/app/~~0UZ8FHZzl4EtGOyQyl6Bww==/com.google.android.trichromelibrary_642216533-allSKankAZpd2EKX_72-PA==/base.apk (BuildId: c064be5ff2a235a357349c021663865bc1608cc9)
#6 pc 0x0000000007477158 /data/app/~~0UZ8FHZzl4EtGOyQyl6Bww==/com.google.android.trichromelibrary_642216533-allSKankAZpd2EKX_72-PA==/base.apk (BuildId: c064be5ff2a235a357349c021663865bc1608cc9)
#7 pc 0x0000000002852900 /data/app/~~0UZ8FHZzl4EtGOyQyl6Bww==/com.google.android.trichromelibrary_642216533-allSKankAZpd2EKX_72-PA==/base.apk (BuildId: c064be5ff2a235a357349c021663865bc1608cc9)
#8 pc 0x0000000006583db0 /data/app/~~0UZ8FHZzl4EtGOyQyl6Bww==/com.google.android.trichromelibrary_642216533-allSKankAZpd2EKX_72-PA==/base.apk (BuildId: c064be5ff2a235a357349c021663865bc1608cc9)
#9 pc 0x000000000860da50 /data/app/~~0UZ8FHZzl4EtGOyQyl6Bww==/com.google.android.trichromelibrary_642216533-allSKankAZpd2EKX_72-PA==/base.apk (BuildId: c064be5ff2a235a357349c021663865bc1608cc9)
#10 pc 0x000000000860d100 /data/app/~~0UZ8FHZzl4EtGOyQyl6Bww==/com.google.android.trichromelibrary_642216533-allSKankAZpd2EKX_72-PA==/base.apk (BuildId: c064be5ff2a235a357349c021663865bc1608cc9)
at J.N.Mhc_M_H$ (Native method)
at org.chromium.components.viz.service.frame_sinks.ExternalBeginFrameSourceAndroid.doFrame (chromium-TrichromeWebViewGoogle6432.aab-stable-642216533:63)
at android.view.Choreographer$CallbackRecord.run (Choreographer.java:1106)
at android.view.Choreographer.doCallbacks (Choreographer.java:866)
at android.view.Choreographer.doFrame (Choreographer.java:792)
at android.view.Choreographer$FrameDisplayEventReceiver.run (Choreographer.java:1092)
at android.os.Handler.handleCallback (Handler.java:938)
at android.os.Handler.dispatchMessage (Handler.java:99)
at android.os.Looper.loopOnce (Looper.java:226)
at android.os.Looper.loop (Looper.java:313)
at android.app.ActivityThread.main (ActivityThread.java:8669)
at java.lang.reflect.Method.invoke (Native method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:571)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1135)

also google it, and find this: https://developer.android.com/games/engines/unity/unity-anrs-list?
any help please?

Expected Behavior

No response

How to Reproduce

Release to playstore

Additional Info

No response

We also see increased % of ANRs since ~19 June, may be related to Google's WebView as we don't see any new ANRs, old ones but more of them

we also see the same behaviour from 19-20 June

we also see the same behaviour from 19-20 June

We have a very similar stacktrace
ANR seems to be in recent times

we are using 5.9.0 AppLovingMax version

I also looked at this https://groups.google.com/g/google-admob-ads-sdk/c/qqqXaim5BuY
Seems a Choreographer issue on OS-level.

But I wish to the Max Team to check it out

Thanks

Native method - J.N.Mhc_M_H$
Input dispatching timed out

"main" tid=1 Native
  #00  pc 0x00000000000902fc  /apex/com.android.runtime/lib64/bionic/libc.so (syscall+28)
  #01  pc 0x00000000000950d0  /apex/com.android.runtime/lib64/bionic/libc.so (__futex_wait_ex+144)
  #02  pc 0x0000000000101028  /apex/com.android.runtime/lib64/bionic/libc.so (pthread_cond_wait+72)
  #03  pc 0x0000000006389c6c  /data/app/~~Z1Yk9ePNJo2Fu-7HMJmPDg==/com.google.android.trichromelibrary_642216533-u-AOO4fhjOrvn9id8XDMrw==/base.apk (BuildId: c064be5ff2a235a357349c021663865bc1608cc9)
  #04  pc 0x0000000003b0cb84  /data/app/~~Z1Yk9ePNJo2Fu-7HMJmPDg==/com.google.android.trichromelibrary_642216533-u-AOO4fhjOrvn9id8XDMrw==/base.apk (BuildId: c064be5ff2a235a357349c021663865bc1608cc9)
  #05  pc 0x0000000005f0bde4  /data/app/~~Z1Yk9ePNJo2Fu-7HMJmPDg==/com.google.android.trichromelibrary_642216533-u-AOO4fhjOrvn9id8XDMrw==/base.apk (BuildId: c064be5ff2a235a357349c021663865bc1608cc9)
  #06  pc 0x0000000007477158  /data/app/~~Z1Yk9ePNJo2Fu-7HMJmPDg==/com.google.android.trichromelibrary_642216533-u-AOO4fhjOrvn9id8XDMrw==/base.apk (BuildId: c064be5ff2a235a357349c021663865bc1608cc9)
  #07  pc 0x0000000002852900  /data/app/~~Z1Yk9ePNJo2Fu-7HMJmPDg==/com.google.android.trichromelibrary_642216533-u-AOO4fhjOrvn9id8XDMrw==/base.apk (BuildId: c064be5ff2a235a357349c021663865bc1608cc9)
  #08  pc 0x0000000006583db0  /data/app/~~Z1Yk9ePNJo2Fu-7HMJmPDg==/com.google.android.trichromelibrary_642216533-u-AOO4fhjOrvn9id8XDMrw==/base.apk (BuildId: c064be5ff2a235a357349c021663865bc1608cc9)
  #09  pc 0x000000000860da50  /data/app/~~Z1Yk9ePNJo2Fu-7HMJmPDg==/com.google.android.trichromelibrary_642216533-u-AOO4fhjOrvn9id8XDMrw==/base.apk (BuildId: c064be5ff2a235a357349c021663865bc1608cc9)
  #10  pc 0x000000000860d100  /data/app/~~Z1Yk9ePNJo2Fu-7HMJmPDg==/com.google.android.trichromelibrary_642216533-u-AOO4fhjOrvn9id8XDMrw==/base.apk (BuildId: c064be5ff2a235a357349c021663865bc1608cc9)
  at J.N.Mhc_M_H$ (Native method)
  at org.chromium.components.viz.service.frame_sinks.ExternalBeginFrameSourceAndroid.doFrame (chromium-TrichromeWebViewGoogle6432.aab-stable-642216533:63)
  at android.view.Choreographer$CallbackRecord.run (Choreographer.java:1669)
  at android.view.Choreographer$CallbackRecord.run (Choreographer.java:1680)
  at android.view.Choreographer.doCallbacks (Choreographer.java:1191)
  at android.view.Choreographer.doFrame (Choreographer.java:1057)
  at android.view.Choreographer$FrameDisplayEventReceiver.run (Choreographer.java:1650)
  at android.os.Handler.handleCallback (Handler.java:958)
  at android.os.Handler.dispatchMessage (Handler.java:99)
  at android.os.Looper.loopOnce (Looper.java:222)
  at android.os.Looper.loop (Looper.java:314)
  at android.app.ActivityThread.main (ActivityThread.java:8706)
  at java.lang.reflect.Method.invoke (Native method)
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:565)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1081)

A few months back we implemented Banner on one of our games that did not have it.
We received the following ANR.
At first we thought it was because the game was in Landscape, because the rest of the implementation was THE SAME as our other Portrait games.

The Stack trace is very similar (but not exactly the same) than the one opening this thread and the one we are also recieving now on our portrait games, so we think it has something to do with banners.

My theory, now, is that a certain mediation (most probably Admob's) is starting to serve a defect or incompatible banner (or maybe interstitial/rewarded)

We really need some light here. I'll keep investigating on my part.

Thanks

The aforementioned stacktrace:

ANR triggered by slow operations in main thread

main (native):tid=1 systid=27343
# 00 pc 0x8a01c libc.so (syscall + 28) (BuildId: 35a04626779868e5f2a30e171716818d)
# 01 pc 0x8ea10 libc.so (__futex_wait_ex + 144) (BuildId: 35a04626779868e5f2a30e171716818d)
# 02 pc 0xfc23c libc.so (pthread_cond_wait + 76) (BuildId: 35a04626779868e5f2a30e171716818d)
# 03 pc 0x2083edc base.apk + 4206592 (BuildId: 457fcf3dd26afb95f4d95992b1395e5603eabaf7)
# 04 pc 0x2084c50 base.apk + 4206592 (BuildId: 457fcf3dd26afb95f4d95992b1395e5603eabaf7)
# 05 pc 0x2084908 base.apk + 4206592 (BuildId: 457fcf3dd26afb95f4d95992b1395e5603eabaf7)
# 06 pc 0x1b7e4c8 base.apk + 4206592 (BuildId: 457fcf3dd26afb95f4d95992b1395e5603eabaf7)
# 07 pc 0x1b7e380 base.apk + 4206592 (BuildId: 457fcf3dd26afb95f4d95992b1395e5603eabaf7)
# 08 pc 0x4935530 base.apk + 4206592 (BuildId: 457fcf3dd26afb95f4d95992b1395e5603eabaf7)
# 09 pc 0x4937348 base.apk + 4206592 (BuildId: 457fcf3dd26afb95f4d95992b1395e5603eabaf7)
# 10 pc 0x2103e78 base.apk + 4206592 (BuildId: 457fcf3dd26afb95f4d95992b1395e5603eabaf7)
# 11 pc 0x2103af8 base.apk + 4206592 (BuildId: 457fcf3dd26afb95f4d95992b1395e5603eabaf7)
# 12 pc 0x2103b84 base.apk + 4206592 (BuildId: 457fcf3dd26afb95f4d95992b1395e5603eabaf7)
# 13 pc 0x3b76c24 base.apk + 4206592 (BuildId: 457fcf3dd26afb95f4d95992b1395e5603eabaf7)
# 14 pc 0x3ffa010 base.apk + 4206592 (BuildId: 457fcf3dd26afb95f4d95992b1395e5603eabaf7)
# 15 pc 0x3303858 base.apk (Java_J_N_MTXp4fn_1 + 256) (BuildId: 457fcf3dd26afb95f4d95992b1395e5603eabaf7)
       at J.N.MTXp4fn_(Native method)
       at WV.Z5.onDraw(chromium-TrichromeWebViewGoogle.aab-stable-609904331:225)
       at com.android.webview.chromium.WebViewChromium.onDraw(chromium-TrichromeWebViewGoogle.aab-stable-609904331:40)
       at android.webkit.WebView.onDraw(WebView.java:2935)
       at android.view.View.draw(View.java:24406)
       at android.view.View.buildDrawingCacheImpl(View.java:23664)
       at android.view.View.buildDrawingCache(View.java:23524)
       at android.view.View.draw(View.java:24128)
       at android.view.ViewGroup.drawChild(ViewGroup.java:4748)
       at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4505)
       at android.view.View.draw(View.java:24409)
       at android.view.View.draw(View.java:24278)
       at android.view.ViewGroup.drawChild(ViewGroup.java:4748)
       at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4505)
       at android.view.View.draw(View.java:24409)
       at android.view.View.draw(View.java:24278)
       at android.view.ViewGroup.drawChild(ViewGroup.java:4748)
       at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4505)
       at android.view.View.draw(View.java:24276)
       at android.view.ViewGroup.drawChild(ViewGroup.java:4748)
       at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4505)
       at android.view.View.draw(View.java:24276)
       at android.view.ViewGroup.drawChild(ViewGroup.java:4748)
       at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4505)
       at android.view.View.draw(View.java:24276)
       at android.view.ViewGroup.drawChild(ViewGroup.java:4748)
       at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4505)
       at com.android.internal.policy.DecorView.dispatchDraw(DecorView.java:1540)
       at android.view.View.draw(View.java:24409)
       at com.android.internal.policy.DecorView.draw(DecorView.java:1513)
       at android.view.ViewRootImpl.drawSoftware(ViewRootImpl.java:5794)
       at android.view.ViewRootImpl.draw(ViewRootImpl.java:5695)
       at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:5330)
       at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:4486)
       at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:3116)
       at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:10885)
       at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1301)
       at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1309)
       at android.view.Choreographer.doCallbacks(Choreographer.java:923)
       at android.view.Choreographer.doFrame(Choreographer.java:852)
       at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1283)
       at android.os.Handler.handleCallback(Handler.java:942)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at android.os.Looper.loopOnce(Looper.java:226)
       at android.os.Looper.loop(Looper.java:313)
       at android.app.ActivityThread.main(ActivityThread.java:8757)
       at java.lang.reflect.Method.invoke(Native method)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)```


We are investigating this ANR. We will update you when we have more information available.

@wojciech-juszczynski, We are still investigating a few theories and trying to find a workaround. I will update the thread when we have more information available.

We also have same issue. Since June 19, we are seeing huge ANR increase.
image

The AppLovin plugin version is 6.5.2. Our game is Portrait game.

To mitigate this, we turned on & off for LiftOff, Unity, Pangle, MIntegral, InMobi, but none of them works.
Please help.

We also see an increase from 0.6% to 1.26% + users complaining about the app freezing since the last update

Have the same issue but with AdMob and AppLovin mediation.

We have been continuing to investigate this ANR with high priority. The ANR appears to be caused by an interaction between the WebView and Unity, however we have not been able to reproduce the issue locally yet.

See this thread for more information: https://issues.chromium.org/issues/349274976

If anyone can reproduce the issue, please share detailed steps in the thread linked above.

After working closely with Google, we identified an Android WebView experiment that led to this ANR increase. Google has confirmed that this experiment was disabled on July 8th, and we are now seeing ANRs decline significantly. We expect ANRs to return to normal in the next 2-4 days.

@Mecze did you see drop in "J.N.MTXp4fn_" after Google's fix?

@Mecze did you see drop in "J.N.MTXp4fn_" after Google's fix?

Yes, we did