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

App crashes when using website TextInputField in InAppWebview #643

Closed
3 tasks
BugsOverBugs opened this issue Jan 13, 2021 · 6 comments
Closed
3 tasks

App crashes when using website TextInputField in InAppWebview #643

BugsOverBugs opened this issue Jan 13, 2021 · 6 comments

Comments

@BugsOverBugs
Copy link

BugsOverBugs commented Jan 13, 2021

  • Fix textSelectionHandle (no tools shown)
  • Fix keyboard fold onCanceled (keyboard stays unfold)
  • Fix saveFormData (AndroidInAppWebviewOption does not trigger)

Hey, your package is really good and very helpful.

But I noticed an issue on every Android device I tested (Emulators with Android 11 and real phones with Android 11 and 8.0):
The text input on more than one website does not work with the InAppWebview.

As I mentioned in the to-do's ahead there are no text selection handle tools on double tap on the entered text. I can change the selected part, but copy, paste and cut is not possible. After entering something also the keyboard is stuck and can not be folded by pressing the Android keyboard down arrow. After mutiple presses on the entered text the app crashes caused by the webview.

In addition to that the InAppWebview does not trigger the AndroidInAppWebviewOption saveFormData in the specifed fields. Maybe caused by the same problem from above?

The webview package from the official Flutter team supports the Android text selcetion tools, but its fuctions are too less! I also use your ChromeSafariBrowser and HeadlessInAppWebview and be very happy with them.

@Shubhankt1
Copy link

I have the exact same issues. Please help how to solve these.
For me The app crashes whenever I try to enter any value in textfield on web in InAppWebView.
and the crash report is not at all useful.

This is what I get in. my Firebase-Console:
Crashed: Thread : SIGTRAP 0x00002ade00001379

@frestoinc
Copy link

Having the same problem on Samsung S10+, Android 11, OneUI 3.0.

Stacktrace as below

W/System.err( 4705): android.view.WindowManager$InvalidDisplayException: Unable to add window android.view.ViewRootImpl$W@2ae7b0c -- the specified display can not be found W/System.err( 4705): at android.view.ViewRootImpl.setView(ViewRootImpl.java:1387) W/System.err( 4705): at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:462) W/System.err( 4705): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:114) W/System.err( 4705): at android.widget.PopupWindow.invokePopup(PopupWindow.java:1657) W/System.err( 4705): at android.widget.PopupWindow.showAtLocation(PopupWindow.java:1379) W/System.err( 4705): at android.widget.PopupWindow.showAtLocation(PopupWindow.java:1345) W/System.err( 4705): at org.chromium.android_webview.PopupTouchHandleDrawable.show(chromium-TrichromeWebViewGoogle.aab-stable-432418133:18) W/System.err( 4705): at android.os.MessageQueue.nativePollOnce(Native Method) W/System.err( 4705): at android.os.MessageQueue.next(MessageQueue.java:335) W/System.err( 4705): at android.os.Looper.loop(Looper.java:206) W/System.err( 4705): at android.app.ActivityThread.main(ActivityThread.java:8425) W/System.err( 4705): at java.lang.reflect.Method.invoke(Native Method) W/System.err( 4705): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:596) W/System.err( 4705): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130) F/chromium( 4705): [FATAL:jni_android.cc(249)] Please include Java exception stack in crash report F/libc ( 4705): Fatal signal 5 (SIGTRAP), code -6 (SI_TKILL) in tid 4705 (droid.hotel_tmp), pid 4705 (droid.hotel_tmp)

@pichillilorenzo
Copy link
Owner

This is fixed with version 5.0.0 using the new Android-specific option useHybridComposition: true.
Using Hybrid Composition fixes a lot of issues with keyboard.

This option requires Flutter v1.20+ and should only be used on Android 10+ for release apps, as animations will drop frames on < Android 10 (see Hybrid-Composition#performance).

This is not a limitation of this plugin but on how Flutter manages PlatformViews on Android unfortunately.

@pichillilorenzo
Copy link
Owner

It is already published as a prerelease!
However, today I'm going to publish the stable release

@dzalif
Copy link

dzalif commented Dec 22, 2021

This is fixed with version 5.0.0 using the new Android-specific option useHybridComposition: true. Using Hybrid Composition fixes a lot of issues with keyboard.

This option requires Flutter v1.20+ and should only be used on Android 10+ for release apps, as animations will drop frames on < Android 10 (see Hybrid-Composition#performance).

This is not a limitation of this plugin but on how Flutter manages PlatformViews on Android unfortunately.

How about the old version, I'm still using version 4.0.0, is there a way to enable hybrid composition without upgrading to flutter 2 ?

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 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants