-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android ANR on InAppWebViewFlutterPlugin #1451
Comments
NOTE: This comment is auto-generated. Are you sure you have already searched for the same problem? Some people open new issues but they didn't search for something similar or for the same issue. Please, search for it using the GitHub issue search box or on the official inappwebview.dev website, or, also, using Google, StackOverflow, etc. before posting a new one. You may already find an answer to your problem! If this is really a new issue, then thank you for raising it. I will investigate it and get back to you as soon as possible. Please, make sure you have given me as much context as possible! Also, if you didn't already, post a code example that can replicate this issue. In the meantime, you can already search for some possible solutions online! Because this plugin uses native WebView, you can search online for the same issue adding Following these steps can save you, me, and other people a lot of time, thanks! |
@pichillilorenzo can you please provide a solution on this. |
I can’t see the exception from your log. Could you post the full log, please? |
Crashlytics - Stack tracepool-32-thread-1 (runnable):tid=66 systid=4740 Signal Catcher (runnable):tid=6 systid=3761 perfetto_hprof_listener (native):tid=7 systid=3762 Jit thread pool worker thread 0 (runnable):tid=9 systid=3764 ADB-JDWP Connection Control Thread (waiting):tid=8 systid=3763 HeapTaskDaemon (waiting):tid=10 systid=3766 FinalizerDaemon (waiting):tid=11 systid=3770 FinalizerWatchdogDaemon (waiting):tid=12 systid=3771 ReferenceQueueDaemon (waiting):tid=13 systid=3769 main (runnable):tid=1 systid=3739 Binder:3739_1 (native):tid=14 systid=3780 Binder:3739_2 (native):tid=15 systid=3781 Binder:3739_3 (native):tid=16 systid=3800 Profile Saver (native):tid=17 systid=4548 pool-3-thread-1 (waiting):tid=18 systid=4557 pool-6-thread-1 (timed waiting):tid=19 systid=4564 Firebase-Messaging-Init (waiting):tid=20 systid=4571 pool-10-thread-1 (waiting):tid=21 systid=4566 pool-7-thread-1 (timed waiting):tid=22 systid=4570 pool-9-thread-1 (timed waiting):tid=24 systid=4569 pool-8-thread-1 (timed waiting):tid=25 systid=4568 Firebase-Messaging-Topics-Io (waiting):tid=23 systid=4575 TAG (waiting):tid=26 systid=4579 firebase-installations-executor-1 (timed waiting):tid=27 systid=4580 ScionFrontendApi (timed waiting):tid=28 systid=4583 Crashlytics Exception Handler1 (waiting):tid=29 systid=4584 com.google.firebase.crashlytics.startup1 (waiting):tid=30 systid=4587 awaitEvenIfOnMainThread task continuation executor1 (waiting):tid=31 systid=4589 firebase-installations-executor-2 (timed waiting):tid=32 systid=4585 GmsDynamite (waiting):tid=33 systid=4590 heartbeat-information-executor (timed waiting):tid=34 systid=4591 OkHttp ConnectionPool (timed waiting):tid=35 systid=4601 Measurement Worker (timed waiting):tid=36 systid=4605 WM.task-1 (waiting):tid=37 systid=4607 Okio Watchdog (waiting):tid=39 systid=4614 WM.task-2 (waiting):tid=38 systid=4619 MessengerIpcClient (timed waiting):tid=40 systid=4621 pool-24-thread-1 (waiting):tid=41 systid=4622 queued-work-looper (native):tid=42 systid=4632 pool-24-thread-2 (timed waiting):tid=44 systid=4663 pool-25-thread-1 (timed waiting):tid=43 systid=4664 Picasso-Stats (native):tid=45 systid=4670 Picasso-Dispatcher (native):tid=46 systid=4671 Picasso-refQueue (timed waiting):tid=47 systid=4683 RxSchedulerPurge-1 (timed waiting):tid=48 systid=4689 RxCachedWorkerPoolEvictor-1 (timed waiting):tid=49 systid=4690 RxCachedThreadScheduler-2 (waiting):tid=50 systid=4696 RxCachedThreadScheduler-1 (waiting):tid=51 systid=4695 AsyncTask #4 (waiting):tid=3 systid=4709 flutter-worker-0 (timed waiting):tid=60 systid=4718 WifiManagerThread (native):tid=56 systid=4721 process reaper (timed waiting):tid=59 systid=4732 DefaultDispatcher-worker-2 (timed waiting):tid=64 systid=4738 DefaultDispatcher-worker-1 (timed waiting):tid=65 systid=4737 DefaultDispatcher-worker-3 (timed waiting):tid=62 systid=4741 flutter-worker-1 (timed waiting):tid=63 systid=4743 Timer-1 (waiting):tid=67 systid=4750 Thread-18 (timed waiting):tid=58 systid=4762 Timer-2 (timed waiting):tid=70 systid=4770 Thread-25 (native):tid=69 systid=4773 LDForegroundListener (native):tid=4 systid=4802 LaunchDarkly-DefaultEventProcessor-0 (timed waiting):tid=5 systid=4824 Thread-28 (waiting):tid=54 systid=4828 LaunchDarkly-DiagnosticEventProcessor-0 (timed waiting):tid=55 systid=4825 pool-45-thread-1 (waiting):tid=2 systid=4852 Binder:3739_4 (native):tid=52 systid=4870 OkHttp mobile.launchdarkly.com (native):tid=53 systid=4877 OkHttp TaskRunner (timed waiting):tid=57 systid=4878 OkHttp TaskRunner (timed waiting):tid=61 systid=4879 Okio Watchdog (timed waiting):tid=68 systid=4885 OkHttp TaskRunner (timed waiting):tid=71 systid=4886 1.ui (unknown):tid=4834 systid=4834 1.raster (unknown):tid=4836 systid=4836 1.io (unknown):tid=4838 systid=4838 io.worker.1 (unknown):tid=4839 systid=4839 io.worker.2 (unknown):tid=4840 systid=4840 io.worker.3 (unknown):tid=4841 systid=4841 io.worker.4 (unknown):tid=4842 systid=4842 dart:io EventHa (unknown):tid=4843 systid=4843 DartWorker (unknown):tid=4845 systid=4845 DartWorker (unknown):tid=4857 systid=4857 DartWorker (unknown):tid=4858 systid=4858 DartWorker (unknown):tid=4865 systid=4865 DartWorker (unknown):tid=4866 systid=4866 |
No, haven't tried updating, because it's not mentioned in the change logs. And it is not easy to reproduce this issue, so need to be sure about the solution. |
Unfortunately, I don't understand what is causing the error. If I check com.pichillilorenzo.flutter_inappwebview.InAppWebViewFlutterPlugin.onAttachedToEngine(InAppWebViewFlutterPlugin.java:91) of version Line 91 in 6b94751
It's just the initialization of the Cookie Manager class for Android, but there is no error/exception: Line 31 in 6b94751
Currently, my only advice is to try to update the plugin to a greater version. Check the requirements before updating it for a greater plugin version 5: https://inappwebview.dev/docs/5.x.x/intro#requirements-570 |
This issue is stale and has been automatically closed because it has been open for more than 365 days with no activity. Please reopen a new issue if you still have it. |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug and a minimal reproduction of the issue. |
Environment
Device information:
Description
There should not be ANR in webview
There is an ANR:
Stacktrace/Logcat -->
main (runnable):tid=1 systid=3739
at com.pichillilorenzo.flutter_inappwebview.InAppWebViewFlutterPlugin.onAttachedToEngine(InAppWebViewFlutterPlugin.java:91)
at com.pichillilorenzo.flutter_inappwebview.InAppWebViewFlutterPlugin.onAttachedToEngine(InAppWebViewFlutterPlugin.java:71)
at io.flutter.embedding.engine.FlutterEngineConnectionRegistry.add(FlutterEngineConnectionRegistry.java:144)
at io.flutter.plugins.GeneratedPluginRegistrant.registerWith(GeneratedPluginRegistrant.java:24)
at java.lang.reflect.Method.invoke(Native method)
at io.flutter.embedding.engine.plugins.util.GeneratedPluginRegister.registerGeneratedPlugins(GeneratedPluginRegister.java:80)
at io.flutter.embedding.engine.FlutterEngine.(FlutterEngine.java:357)
at io.flutter.embedding.engine.FlutterEngine.(FlutterEngine.java:263)
at io.flutter.embedding.engine.FlutterEngine.(FlutterEngine.java:243)
at io.flutter.embedding.engine.FlutterEngine.(FlutterEngine.java:163)
at io.flutter.embedding.engine.FlutterEngine.(FlutterEngine.java:154)
at io.flutter.embedding.engine.FlutterEngineGroup.createEngine(FlutterEngineGroup.java:182)
at io.flutter.embedding.engine.FlutterEngineGroup.createAndRunEngine(FlutterEngineGroup.java:151)
at io.flutter.embedding.engine.FlutterEngineGroup.createAndRunEngine(FlutterEngineGroup.java:120)
at io.flutter.embedding.engine.FlutterEngineGroup.createAndRunEngine(FlutterEngineGroup.java:99)
at com.tatadigital.tcp.flutter_embed.EngineBinding.(EngineBindings.kt:44)
at com.tatadigital.tcp.TcpApplication.initiateEngines(TcpApplication.kt:168)
at com.tatadigital.tcp.TcpApplication.onCreate(TcpApplication.kt:114)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1211)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6725)
at android.app.ActivityThread.access$1500(ActivityThread.java:247)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2053)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7839)
at java.lang.reflect.Method.invoke(Native method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
The text was updated successfully, but these errors were encountered: