Skip to content
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

Crash on any Android devices if chrome browser is missing #1009

Closed
frankteller-de opened this issue Oct 13, 2021 · 4 comments
Closed

Crash on any Android devices if chrome browser is missing #1009

frankteller-de opened this issue Oct 13, 2021 · 4 comments
Labels
bug Something isn't working stale

Comments

@frankteller-de
Copy link

frankteller-de commented Oct 13, 2021

Environment

Technology Version
Flutter version 2.5.2
Plugin version 5.3.2
Android version 8-12

Device information: Android Samsung

Description

App crashes at startup when Android users don't have installed chrome browser on device. If I comment out the flutter_inappwebview plugin in the pubspec.yaml, it will works.

Steps to reproduce

  1. Try on Samsung phone
  2. Remove or disable chrome browser
  3. Start any app with flutter_inappwebview plugin

Stacktrace/Logcat

F/zygote64(23541): java_vm_ext.cc:504] JNI DETECTED ERROR IN APPLICATION: GetStringUTFChars received NULL jstring
F/zygote64(23541): java_vm_ext.cc:504]     in call to GetStringUTFChars
F/zygote64(23541): java_vm_ext.cc:504]     from int android.webkit.WebViewFactory.nativeLoadWithRelroFile(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.ClassLoader)
F/zygote64(23541): java_vm_ext.cc:504] "main" prio=5 tid=1 Runnable
F/zygote64(23541): java_vm_ext.cc:504]   | group="main" sCount=0 dsCount=0 flags=0 obj=0x74bd9518 self=0x74eccc0a00
F/zygote64(23541): java_vm_ext.cc:504]   | sysTid=23541 nice=-10 cgrp=default sched=0/0 handle=0x74f1e129c8
F/zygote64(23541): java_vm_ext.cc:504]   | state=R schedstat=( 471326810 14681650 294 ) utm=38 stm=9 core=4 HZ=100
F/zygote64(23541): java_vm_ext.cc:504]   | stack=0x7fecabd000-0x7fecabf000 stackSize=8MB
F/zygote64(23541): java_vm_ext.cc:504]   | held mutexes= "mutator lock"(shared held)
F/zygote64(23541): java_vm_ext.cc:504]   native: #00 pc 0000000000397614  /system/lib64/libart.so (_ZN3art15DumpNativeStackERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEEiP12BacktraceMapPKcPNS_9ArtMethodEPv+212)
F/zygote64(23541): java_vm_ext.cc:504]   native: #01 pc 000000000045dde8  /system/lib64/libart.so (_ZNK3art6Thread9DumpStackERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEbP12BacktraceMapb+348)
F/zygote64(23541): java_vm_ext.cc:504]   native: #02 pc 00000000002d59e0  /system/lib64/libart.so (_ZN3art9JavaVMExt8JniAbortEPKcS2_+1040)
F/zygote64(23541): java_vm_ext.cc:504]   native: #03 pc 00000000002d5e60  /system/lib64/libart.so (_ZN3art9JavaVMExt9JniAbortVEPKcS2_St9__va_list+116)
F/zygote64(23541): java_vm_ext.cc:504]   native: #04 pc 0000000000108ab0  /system/lib64/libart.so (_ZN3art11ScopedCheck6AbortFEPKcz+148)
F/zygote64(23541): java_vm_ext.cc:504]   native: #05 pc 00000000001080e8  /system/lib64/libart.so (_ZN3art11ScopedCheck13CheckInstanceERNS_18ScopedObjectAccessENS0_12InstanceKindEP8_jobjectb+832)
F/zygote64(23541): java_vm_ext.cc:504]   native: #06 pc 0000000000106a78  /system/lib64/libart.so (_ZN3art11ScopedCheck5CheckERNS_18ScopedObjectAccessEbPKcPNS_12JniValueTypeE+856)
F/zygote64(23541): java_vm_ext.cc:504]   native: #07 pc 000000000010fc9c  /system/lib64/libart.so (_ZN3art8CheckJNI22GetStringCharsInternalEPKcP7_JNIEnvP8_jstringPhbb+656)
F/zygote64(23541): java_vm_ext.cc:504]   native: #08 pc 000000000000100c  /system/lib64/libwebviewchromium_loader.so (???)
F/zygote64(23541): java_vm_ext.cc:504]   native: #09 pc 0000000000f7dacc  /system/framework/arm64/boot-framework.oat (Java_android_webkit_WebViewFactory_nativeLoadWithRelroFile__Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_ClassLoader_2+284)
F/zygote64(23541): java_vm_ext.cc:504]   at android.webkit.WebViewFactory.nativeLoadWithRelroFile(Native method)
F/zygote64(23541): java_vm_ext.cc:504]   at android.webkit.WebViewFactory.loadNativeLibrary(WebViewFactory.java:705)
F/zygote64(23541): java_vm_ext.cc:504]   at android.webkit.WebViewFactory.getProviderClass(WebViewFactory.java:412)
F/zygote64(23541): java_vm_ext.cc:504]   at android.webkit.WebViewFactory.getProvider(WebViewFactory.java:211)
F/zygote64(23541): java_vm_ext.cc:504]   - locked <0x0fa1c730> (a java.lang.Object)
F/zygote64(23541): java_vm_ext.cc:504]   at android.webkit.CookieManager.getInstance(CookieManager.java:39)
F/zygote64(23541): java_vm_ext.cc:504]   at com.pichillilorenzo.flutter_inappwebview.MyCookieManager.getCookieManager(MyCookieManager.java:104)
F/zygote64(23541): java_vm_ext.cc:504]   at com.pichillilorenzo.flutter_inappwebview.MyCookieManager.<init>(MyCookieManager.java:35)
F/zygote64(23541): java_vm_ext.cc:504]   at com.pichillilorenzo.flutter_inappwebview.InAppWebViewFlutterPlugin.onAttachedToEngine(InAppWebViewFlutterPlugin.java:88)
F/zygote64(23541): java_vm_ext.cc:504]   at com.pichillilorenzo.flutter_inappwebview.InAppWebViewFlutterPlugin.onAttachedToEngine(InAppWebViewFlutterPlugin.java:68)
F/zygote64(23541): java_vm_ext.cc:504]   at io.flutter.embedding.engine.FlutterEngineConnectionRegistry.add(FlutterEngineConnectionRegistry.java:143)
F/zygote64(23541): java_vm_ext.cc:504]   at io.flutter.plugins.GeneratedPluginRegistrant.registerWith(GeneratedPluginRegistrant.java:44)
F/zygote64(23541): java_vm_ext.cc:504]   at java.lang.reflect.Method.invoke(Native method)
F/zygote64(23541): java_vm_ext.cc:504]   at io.flutter.embedding.engine.plugins.util.GeneratedPluginRegister.registerGeneratedPlugins(GeneratedPluginRegister.java:80)
F/zygote64(23541): java_vm_ext.cc:504]   at io.flutter.embedding.android.FlutterActivity.configureFlutterEngine(FlutterActivity.java:965)
F/zygote64(23541): java_vm_ext.cc:504]   at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onAttach(FlutterActivityAndFragmentDelegate.java:187)
F/zygote64(23541): java_vm_ext.cc:504]   at io.flutter.embedding.android.FlutterActivity.onCreate(FlutterActivity.java:430)
F/zygote64(23541): java_vm_ext.cc:504]   at android.app.Activity.performCreate(Activity.java:7183)
F/zygote64(23541): java_vm_ext.cc:504]   at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1220)
F/zygote64(23541): java_vm_ext.cc:504]   at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2910)
F/zygote64(23541): java_vm_ext.cc:504]   at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3032)
F/zygote64(23541): java_vm_ext.cc:504]   at android.app.ActivityThread.-wrap11(ActivityThread.java:-1)
F/zygote64(23541): java_vm_ext.cc:504]   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1696)
F/zygote64(23541): java_vm_ext.cc:504]   at android.os.Handler.dispatchMessage(Handler.java:105)
F/zygote64(23541): java_vm_ext.cc:504]   at android.os.Looper.loop(Looper.java:164)
F/zygote64(23541): java_vm_ext.cc:504]   at android.app.ActivityThread.main(ActivityThread.java:6944)
F/zygote64(23541): java_vm_ext.cc:504]   at java.lang.reflect.Method.invoke(Native method)
F/zygote64(23541): java_vm_ext.cc:504]   at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
F/zygote64(23541): java_vm_ext.cc:504]   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
F/zygote64(23541): java_vm_ext.cc:504] 
F/zygote64(23541): runtime.cc:508] Runtime aborting...
F/zygote64(23541): runtime.cc:508] 
F/zygote64(23541): runtime.cc:516] JNI DETECTED ERROR IN APPLICATION: GetStringUTFChars received NULL jstring
F/zygote64(23541): runtime.cc:516]     in call to GetStringUTFChars
F/zygote64(23541): runtime.cc:516]     from int android.webkit.WebViewFactory.nativeLoadWithRelroFile(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.ClassLoader)
F/zygote64(23541): runtime.cc:516] "main" prio=5 tid=1 Runnable
F/zygote64(23541): runtime.cc:516]   | group="main" sCount=0 dsCount=0 flags=0 obj=0x74bd9518 self=0x74eccc0a00
F/zygote64(23541): runtime.cc:516]   | sysTid=23541 nice=-10 cgrp=default sched=0/0 handle=0x74f1e129c8
F/zygote64(23541): runtime.cc:516]   | state=R schedstat=( 471326810 14681650 294 ) utm=38 stm=9 core=4 HZ=100
F/zygote64(23541): runtime.cc:516]   | stack=0x7fecabd000-0x7fecabf000 stackSize=8MB
F/zygote64(23541): runtime.cc:516]   | held mutexes= "mutator lock"(shared held)
F/zygote64(23541): runtime.cc:516]   native: #00 pc 0000000000397614  /system/lib64/libart.so (_ZN3art15DumpNativeStackERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEEiP12BacktraceMapPKcPNS_9ArtMethodEPv+212)
F/zygote64(23541): runtime.cc:516]   native: #01 pc 000000000045dde8  /system/lib64/libart.so (_ZNK3art6Thread9DumpStackERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEbP12BacktraceMapb+348)
F/zygote64(23541): runtime.cc:516]   native: #02 pc 00000000002d59e0  /system/lib64/libart.so (_ZN3art9JavaVMExt8JniAbortEPKcS2_+1040)
F/zygote64(23541): runtime.cc:516]   native: #03 pc 00000000002d5e60  /system/lib64/libart.so (_ZN3art9JavaVMExt9JniAbortVEPKcS2_St9__va_list+116)
F/zygote64(23541): runtime.cc:516]   native: #04 pc 0000000000108ab0  /system/lib64/libart.so (_ZN3art11ScopedCheck6AbortFEPKcz+148)
F/zygote64(23541): runtime.cc:516]   native: #05 pc 00000000001080e8  /system/lib64/libart.so (_ZN3art11ScopedCheck13CheckInstanceERNS_18ScopedObjectAccessENS0_12InstanceKindEP8_jobjectb+832)
F/zygote64(23541): runtime.cc:516]   native: #06 pc 0000000000106a78  /system/lib64/libart.so (_ZN3art11ScopedCheck5CheckERNS_18ScopedObjectAccessEbPKcPNS_12JniValueTypeE+856)
F/zygote64(23541): runtime.cc:516]   native: #07 pc 000000000010fc9c  /system/lib64/libart.so (_ZN3art8CheckJNI22GetStringCharsInternalEPKcP7_JNIEnvP8_jstringPhbb+656)
F/zygote64(23541): runtime.cc:516]   native: #08 pc 000000000000100c  /system/lib64/libwebviewchromium_loader.so (???)
F/zygote64(23541): runtime.cc:516]   native: #09 pc 0000000000f7dacc  /system/framework/arm64/boot-framework.oat (Java_android_webkit_WebViewFactory_nativeLoadWithRelroFile__Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_ClassLoader_2+284)
F/zygote64(23541): runtime.cc:516]   at android.webkit.WebViewFactory.nativeLoadWithRelroFile(Native method)
F/zygote64(23541): runtime.cc:516]   at android.webkit.WebViewFactory.loadNativeLibrary(WebViewFactory.java:705)
F/zygote64(23541): runtime.cc:516]   at android.webkit.WebViewFactory.getProviderClass(WebViewFactory.java:412)
F/zygote64(23541): runtime.cc:516]   at android.webkit.WebViewFactory.getProvider(WebViewFactory.java:211)
F/zygote64(23541): runtime.cc:516]   - locked <0x0fa1c730> (a java.lang.Object)
F/zygote64(23541): runtime.cc:516]   at android.webkit.CookieManager.getInstance(CookieManager.java:39)
F/zygote64(23541): runtime.cc:516]   at com.pichillilorenzo.flutter_inappwebview.MyCookieManager.getCookieManager(MyCookieManager.java:104)
F/zygote64(23541): runtime.cc:516]   at com.pichillilorenzo.flutter_inappwebview.MyCookieManager.<init>(MyCookieManager.java:35)
F/zygote64(23541): runtime.cc:516]   at com.pichillilorenzo.flutter_inappwebview.InAppWebViewFlutterPlugin.onAttachedToEngine(InAppWebViewFlutterPlugin.java:88)
F/zygote64(23541): runtime.cc:516]   at com.pichillilorenzo.flutter_inappwebview.InAppWebViewFlutterPlugin.onAttachedToEngine(InAppWebViewFlutterPlugin.java:68)
F/zygote64(23541): runtime.cc:516]   at io.flutter.embedding.engine.FlutterEngineConnectionRegistry.add(FlutterEngineConnectionRegistry.java:143)
F/zygote64(23541): runtime.cc:516]   at io.flutter.plugins.GeneratedPluginRegistrant.registerWith(GeneratedPluginRegistrant.java:44)
F/zygote64(23541): runtime.cc:516]   at java.lang.reflect.Method.invoke(Native method)
F/zygote64(23541): runtime.cc:516]   at io.flutter.embedding.engine.plugins.util.GeneratedPluginRegister.registerGeneratedPlugins(GeneratedPluginRegister.java:80)
F/zygote64(23541): runtime.cc:516]   at io.flutter.embedding.android.FlutterActivity.configureFlutterEngine(FlutterActivity.java:965)
F/zygote64(23541): runtime.cc:516]   at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onAttach(FlutterActivityAndFragmentDelegate.java:187)
F/zygote64(23541): runtime.cc:516]   at io.flutter.embedding.android.FlutterActivity.onCreate(FlutterActivity.java:430)
F/zygote64(23541): runtime.cc:516]   at android.app.Activity.performCreate(Activity.java:7183)
F/zygote64(23541): runtime.cc:516]   at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1220)
F/zygote64(23541): runtime.cc:516]   at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2910)
F/zygote64(23541): runtime.cc:516]   at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3032)
F/zygote64(23541): runtime.cc:516]   at android.app.ActivityThread.-wrap11(ActivityThread.java:-1)
F/zygote64(23541): runtime.cc:516]   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1696)
F/zygote64(23541): runtime.cc:516]   at android.os.Handler.dispatchMessage(Handler.java:105)
F/zygote64(23541): runtime.cc:516]   at android.os.Looper.loop(Looper.java:164)
F/zygote64(23541): runtime.cc:516]   at android.app.ActivityThread.main(ActivityThread.java:6944)
F/zygote64(23541): runtime.cc:516]   at java.lang.reflect.Method.invoke(Native method)
F/zygote64(23541): runtime.cc:516]   at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
F/zygote64(23541): runtime.cc:516]   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
F/zygote64(23541): runtime.cc:516] 
F/zygote64(23541): runtime.cc:516] 
@frankteller-de frankteller-de added the bug Something isn't working label Oct 13, 2021
@github-actions
Copy link

👋 @hankfrinkle

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 android WebView [MY ERROR HERE] or ios WKWebView [MY ERROR HERE] keywords.

Following these steps can save you, me, and other people a lot of time, thanks!

@onkarmonks
Copy link

onkarmonks commented Jul 20, 2022

We are facing a similar ANR at the Android end. Please check the logs below -

main (waiting): tid=1 systid=12441
#00 pc 0x86b8c libc.so
#1 pc 0x1b092c libart.so
#2 pc 0x28e840 libart.so
#3 pc 0x2974cc libart.so
#4 pc 0x2b47f4 libart.so
#5 pc 0x1d4bb4 libart.so
#6 pc 0x1d1e48 libart.so
#7 pc 0x1f7424 libart.so
#8 pc 0x1d12e4 libart.so
#9 pc 0x1d2ab4 libart.so
#10 pc 0x4c24ac libart.so
at java.lang.Class.classForName(Class.java)
at java.lang.Class.forName(Class.java:454)
at android.webkit.WebViewFactory.getWebViewProviderClass(WebViewFactory.java:176)
at android.webkit.WebViewFactory.getProviderClass(WebViewFactory.java:423)
at android.webkit.WebViewFactory.getProvider(WebViewFactory.java:252)
at android.webkit.CookieManager.getInstance(CookieManager.java:50)
at com.pichillilorenzo.flutter_inappwebview.MyCookieManager.getCookieManager(MyCookieManager.java)
at com.pichillilorenzo.flutter_inappwebview.MyCookieManager.(MyCookieManager.java)
at com.pichillilorenzo.flutter_inappwebview.InAppWebViewFlutterPlugin.onAttachedToEngine(InAppWebViewFlutterPlugin.java)
at com.pichillilorenzo.flutter_inappwebview.InAppWebViewFlutterPlugin.onAttachedToEngine(InAppWebViewFlutterPlugin.java)
at io.flutter.embedding.engine.FlutterEngineConnectionRegistry.add(FlutterEngineConnectionRegistry.java:144)
at io.flutter.plugins.GeneratedPluginRegistrant.registerWith(GeneratedPluginRegistrant.java)
at java.lang.reflect.Method.invoke(Method.java)
at io.flutter.embedding.engine.plugins.util.GeneratedPluginRegister.registerGeneratedPlugins(GeneratedPluginRegister.java:80)
at io.flutter.embedding.engine.FlutterEngine.(FlutterEngine.java:355)
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.(EngineBinding.java:32)
at com.tatadigital.tcp.TcpApplication.initiateEngines(TcpApplication.java:113)
at com.tatadigital.tcp.TcpApplication.onCreate(TcpApplication.java:57)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1192)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7573)
at android.app.ActivityThread.access$1400(ActivityThread.java:301)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2166)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:246)
at android.app.ActivityThread.main(ActivityThread.java:8633)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)

Also this issue is only reported on Android 11 and 12

Copy link

github-actions bot commented Oct 5, 2024

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.

@github-actions github-actions bot added the stale label Oct 5, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 5, 2024
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working stale
Projects
None yet
Development

No branches or pull requests

2 participants