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 android #226

Open
Karatla opened this issue Dec 14, 2019 · 19 comments
Open

Crash on android #226

Karatla opened this issue Dec 14, 2019 · 19 comments

Comments

@Karatla
Copy link

Karatla commented Dec 14, 2019

When I add flutter_inappwebview:^2.1.0+1
in pubspec.yaml.
Like below picture
Image
Image
The app crash after build apk without any log.

If I drop this plugin app works well.
Image

@Karatla
Copy link
Author

Karatla commented Dec 14, 2019

I do not know if it because I upgraded flutter to 1.12

@pichillilorenzo
Copy link
Owner

@Karatla it could but I don't know without some logs! Did you receive some error logs from Logcat (not the logs for flutter but for Android)? However I'm working on a new version to make it compatible with latest flutter release 1.12

@Karatla
Copy link
Author

Karatla commented Dec 14, 2019

@pichillilorenzo `
here is logcat of my

2019-12-14 17:06:21.223 8468-8468/? I/art: Not late-enabling -Xcheck:jni (already on)
2019-12-14 17:06:21.224 8468-8468/? W/art: Unexpected CPU variant for X86 using defaults: x86
2019-12-14 17:06:21.326 8468-8483/com.karatla.hyacinth I/ResourceExtractor: Found extracted resources res_timestamp-1-1576313807152
2019-12-14 17:06:21.351 8468-8468/com.karatla.hyacinth D/FlutterActivity: Using the launch theme as normal theme.
2019-12-14 17:06:21.352 8468-8468/com.karatla.hyacinth D/FlutterActivityAndFragmentDelegate: Setting up FlutterEngine.
2019-12-14 17:06:21.352 8468-8468/com.karatla.hyacinth D/FlutterActivityAndFragmentDelegate: No preferred FlutterEngine was provided. Creating a new FlutterEngine for this FlutterFragment.
2019-12-14 17:06:21.413 8468-8468/com.karatla.hyacinth D/EGL_emulation: eglCreateContext: 0x9a078a60: maj 3 min 0 rcv 3
2019-12-14 17:06:21.416 8468-8486/com.karatla.hyacinth D/EGL_emulation: eglMakeCurrent: 0x9a078a60: ver 3 0 (tinfo 0x995b9120)
2019-12-14 17:06:21.417 8468-8486/com.karatla.hyacinth E/eglCodecCommon: glUtilsParamSize: unknow param 0x00008cdf
2019-12-14 17:06:21.417 8468-8486/com.karatla.hyacinth E/eglCodecCommon: glUtilsParamSize: unknow param 0x00008824
2019-12-14 17:06:21.422 8468-8486/com.karatla.hyacinth E/eglCodecCommon: glUtilsParamSize: unknow param 0x000087fe
2019-12-14 17:06:21.670 8468-8468/com.karatla.hyacinth W/FlutterEngine: Tried to automatically register plugins with FlutterEngine (io.flutter.embedding.engine.FlutterEngine@16f648f) but could not find and invoke the GeneratedPluginRegistrant.
2019-12-14 17:06:21.676 8468-8468/com.karatla.hyacinth D/FlutterActivityAndFragmentDelegate: Attaching FlutterEngine to the Activity that owns this Fragment.
2019-12-14 17:06:21.678 8468-8468/com.karatla.hyacinth D/AndroidRuntime: Shutting down VM
2019-12-14 17:06:21.679 8468-8468/com.karatla.hyacinth E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.karatla.hyacinth, PID: 8468
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.karatla.hyacinth/com.karatla.hyacinth.MainActivity}: java.lang.NullPointerException: Attempt to invoke interface method 'io.flutter.plugin.common.BinaryMessenger io.flutter.plugin.common.PluginRegistry$Registrar.messenger()' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2646)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756)
Caused by: java.lang.NullPointerException: Attempt to invoke interface method 'io.flutter.plugin.common.BinaryMessenger io.flutter.plugin.common.PluginRegistry$Registrar.messenger()' on a null object reference
at com.pichillilorenzo.flutter_inappwebview.InAppBrowser.(InAppBrowser.java:66)
at com.pichillilorenzo.flutter_inappwebview.InAppWebViewFlutterPlugin.onAttachedToEngine(InAppWebViewFlutterPlugin.java:40)
at io.flutter.embedding.engine.FlutterEnginePluginRegistry.add(FlutterEnginePluginRegistry.java:125)
at io.flutter.plugins.GeneratedPluginRegistrant.registerWith(GeneratedPluginRegistrant.java:17)
at com.karatla.hyacinth.MainActivity.configureFlutterEngine(MainActivity.kt:10)
at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onAttach(FlutterActivityAndFragmentDelegate.java:185)
at io.flutter.embedding.android.FlutterActivity.onCreate(FlutterActivity.java:418)
at android.app.Activity.performCreate(Activity.java:6662)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2599)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707) 
at android.app.ActivityThread.-wrap12(ActivityThread.java) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:154) 
at android.app.ActivityThread.main(ActivityThread.java:6077) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756) 
2019-12-14 17:06:21.901 8468-8494/com.karatla.hyacinth I/flutter: Observatory listening on http://127.0.0.1:43206/vMzzXykdQ54=/

@Karatla
Copy link
Author

Karatla commented Dec 14, 2019

Image

@pichillilorenzo
Copy link
Owner

Ok, it's about the new Java API for Flutter 1.12. I'm working on it

@Bes79
Copy link

Bes79 commented Dec 17, 2019

Same behaviour

@DamienMrtl
Copy link

Latest master version fixed it for me:

#pubspec.yaml  

flutter_inappwebview:
    git:
      url: https://github.com/pichillilorenzo/flutter_inappwebview.git
      ref: master

@pichillilorenzo
Copy link
Owner

@DamienMrtl yes, I'm going to release a new major version today or tomorrow which also includes this fix!

@cwe1ss
Copy link

cwe1ss commented Dec 20, 2019

same issue. A new release would be very much appreciated. Thank you for the work you've put into this project! It's very useful!

@sxs1995
Copy link

sxs1995 commented Dec 23, 2019

have the same issue.

@trongtin045
Copy link

have the same issue :(

@sqgc666
Copy link

sqgc666 commented Dec 24, 2019

I create a new application
environment:
flutter sdk:1.13.6-pre.16
dart:2.8.0
androidx
minSdkVersion 17
only add in dependencies:flutter_inappwebview:^2.1.0+1
When i run the new app on an android device,it crash:

Error Info:

Process: com.demo.flutter_app123, PID: 28169
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.demo.flutter_app123/com.demo.flutter_app123.MainActivity}: java.lang.NullPointerException: Attempt to invoke interface method 'io.flutter.plugin.common.BinaryMessenger io.flutter.plugin.common.PluginRegistry$Registrar.messenger()' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3430)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3614)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:86)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2199)
at android.os.Handler.dispatchMessage(Handler.java:112)
at android.os.Looper.loop(Looper.java:216)
at android.app.ActivityThread.main(ActivityThread.java:7625)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:524)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:987)
Caused by: java.lang.NullPointerException: Attempt to invoke interface method 'io.flutter.plugin.common.BinaryMessenger io.flutter.plugin.common.PluginRegistry$Registrar.messenger()' on a null object reference
at com.pichillilorenzo.flutter_inappwebview.InAppBrowser.(InAppBrowser.java:66)
at com.pichillilorenzo.flutter_inappwebview.InAppWebViewFlutterPlugin.onAttachedToEngine(InAppWebViewFlutterPlugin.java:40)
at io.flutter.embedding.engine.FlutterEnginePluginRegistry.add(FlutterEnginePluginRegistry.java:125)
at io.flutter.plugins.GeneratedPluginRegistrant.registerWith(GeneratedPluginRegistrant.java:15)
at com.shanjian.flutter_app123.MainActivity.configureFlutterEngine(MainActivity.java:11)
at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onAttach(FlutterActivityAndFragmentDelegate.java:185)
at io.flutter.embedding.android.FlutterActivity.onCreate(FlutterActivity.java:418)
at android.app.Activity.performCreate(Activity.java:7458)
at android.app.Activity.performCreate(Activity.java:7448)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1286)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3409)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3614) 
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:86) 
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108) 
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2199) 
at android.os.Handler.dispatchMessage(Handler.java:112) 
at android.os.Looper.loop(Looper.java:216) 
at android.app.ActivityThread.main(ActivityThread.java:7625) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:524) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:987) 

@Quietly-20201113
Copy link

解决了么 同样的问题 升级到 1.12就都炸了

@TheVinhLuong
Copy link

@DamienMrtl yes, I'm going to release a new major version today or tomorrow which also includes this fix!

Hi @pichillilorenzo, could you tell me when the major version is coming out? Thank you.

@ponraja
Copy link

ponraja commented Jan 3, 2020

@DamienMrtl yes, I'm going to release a new major version today or tomorrow which also includes this fix!

Am still getting the same issue. Please update when will you release that major version. Thanks.

@appstute-prajakta
Copy link

Getting same issue. Any Workaround?
I used following lines:

git:
url: https://github.com/pichillilorenzo/flutter_inappwebview.git
ref: master

this worked for an android, but fails to load on ios (for some web pages).

@vtisnado
Copy link

Using the following in #pubspec.yaml worked for me:

flutter_inappwebview:
    git:
      url: https://github.com/pichillilorenzo/flutter_inappwebview.git
      ref: master

@linhuan1994
Copy link

I have the same problem

@MrDeeKey
Copy link

MrDeeKey commented Feb 25, 2020

Using the following in #pubspec.yaml worked for me:

flutter_inappwebview:
    git:
      url: https://github.com/pichillilorenzo/flutter_inappwebview.git
      ref: master

It works on Android, but doesn't work on iOS :(

This was referenced Jul 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests