gree / gree/unity-webview

ANR Problem Webview - Firebase + Webview

Open
#783 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Objective-C++
Stars
2.7k
Forks
734
Avg merge
11h 39m
Merged PRs (30d)
1

Description

Hello,

I am constantly having ANR issues reported by Google Play on their analytics platform.

In this case, initially we thought it was a Firebase problem since some people had similar problems for unity firebase, so they recommended us to upgrade to the latest version of firebase, which we have done but the errors persist.

After digging a bit in the logs we found this:

Error Name: Input dispatching timed out (10d93b0 app.kokorokids.app/com.google.firebase.MessagingUnityPlayerActivity (server) is not responding. Waited 10001ms for MotionEvent)

Error Log:
"main" prio=5 tid=1 Native
#00 pc 0000000000086b8c /apex/com.android.runtime/lib64/bionic/libc.so (syscall+28)
#00 pc 000000000008a938 /apex/com.android.runtime/lib64/bionic/libc.so (__futex_wait_ex(void volatile*, bool, int, bool, timespec const*)+144)
#00 pc 00000000000ec784 /apex/com.android.runtime/lib64/bionic/libc.so (NonPI::MutexLockWithTimeout(pthread_mutex_internal_t*, bool, timespec const*)+688)
#00 pc 000000000017baa4 /data/app/~~s4LgLhlHDTFDqusDf7SmRw==/app.kokorokids.app-IdOQIEkINTdhy7aUZe2vqA==/lib/arm64/libunity.so (???)
#00 pc 000000000017b958 /data/app/~~s4LgLhlHDTFDqusDf7SmRw==/app.kokorokids.app-IdOQIEkINTdhy7aUZe2vqA==/lib/arm64/libunity.so (UnitySendMessage+116)
#00 pc 000000000034069c /data/app/~~s4LgLhlHDTFDqusDf7SmRw==/app.kokorokids.app-IdOQIEkINTdhy7aUZe2vqA==/lib/arm64/libunity.so (???)
at com.unity3d.player.UnityPlayer.nativeUnitySendMessage (Native method)
at com.unity3d.player.UnityPlayer.UnitySendMessage (unavailable)
at net.gree.unitywebview.CWebViewPluginInterface$1.run (CWebViewPluginInterface.java:90)
at android.app.Activity.runOnUiThread (Activity.java:7154)
at net.gree.unitywebview.CWebViewPluginInterface.call (CWebViewPluginInterface.java:88)
at net.gree.unitywebview.CWebViewPlugin$2$2.onReceivedHttpError (CWebViewPlugin.java:295)
at Pz.a (chromium-TrichromeWebViewGoogle.aab-stable-475810133:6)
at A9.handleMessage (chromium-TrichromeWebViewGoogle.aab-stable-475810133:78)
at android.os.Handler.dispatchMessage (Handler.java:106)
at android.os.Looper.loop (Looper.java:246)
at android.app.ActivityThread.main (ActivityThread.java:8587)
at java.lang.reflect.Method.invoke (Native method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:602)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1130)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the stack trace entries in CWebViewPluginInterface.java at lines 88-90 and CWebViewPlugin.java at line 295, focusing on the onReceivedHttpError path and its UI-thread dispatch. Trace how this path reaches UnitySendMessage, then reproduce or analyze the reported Android ANR; done means identifying a confirmed cause and documenting or implementing a verified fix.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, unity
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.