App crashes on enter key press


#1

Hello there…

Has anyone seen something like this before?
I got a login form, with two input tags
On some android devices, when the user fill the login input and press Go, the app crashes …
It doesn’t happen in every devices. On my lg g4, for instance, it doesn’t.

In another form of the app, there is a textarea, there I can press enter with no crashing…

Any ideas?

Thanks

First edit: The bug happens only with Webview build and Scanner. When I build using crosswalk, works fine.


#2

Did you try to look at the logs ?


#3

Hi, @Amine, Thanks for answering.

I checked the log, apparently the issues is on those lines:

I/ViewRootImpl( 1400): ViewRoot’s Touch Event : ACTION_DOWN
D/InputDispatcher( 853): notifyMotion - action=ACTION_UP(0), id=0, tooltype=1, deviceId=2, source=0x1002, policyFlags=0x0, flags=0x0, metaState=0x0, buttonState=0x0, edgeFlags=0x0, eventTime=232830474986000, downTime=232830435399000,
I/libPerfService( 853): 5: set: 1
I/libPerfService( 853): 5: set freq: 0
I/libPerfService( 853): 5: set vcore level: 0
D/InputTransport( 853): channel ‘3e51457a InputMethod (server)’ : action=ACTION_UP(0), id=0, tooltype=1, deviceId=2, source=0x1002, flags=0x0, edgeFlags=0x0, metaState=0x0, buttonState=0x0, downTime=232830435399000, eventTime=232830474986000, pointerCount=1
I/ViewRootImpl( 1400): ViewRoot’s Touch Event : ACTION_UP
W/WebView (23621): java.lang.Throwable: A WebView method was called on thread ‘InputConnectionHandlerThread’. All WebView methods must be called on the same thread. (Expected Looper Looper (main, tid 1) {2afd5acc} called on Looper (InputConnectionHandlerThread, tid 22462) {784238e}, FYI main Looper is Looper (main, tid 1) {2afd5acc})
W/WebView (23621): at android.webkit.WebView.checkThread(WebView.java:2203)
W/WebView (23621): at android.webkit.WebView.getUrl(WebView.java:1299)
W/WebView (23621): at com.appgyver.webview.AGWebView.getUrl(AGWebView.java:262)
W/WebView (23621): at com.appgyver.webview.AGWebViewBase.getWebViewContext(AGWebViewBase.java:310)
W/WebView (23621): at com.appgyver.webview.AGInputConnectionWrapper.fireActionButtonEvent(AGInputConnectionWrapper.java:40)
W/WebView (23621): at com.appgyver.webview.AGInputConnectionWrapper.performEditorAction(AGInputConnectionWrapper.java:32)
W/WebView (23621): at com.android.internal.view.IInputConnectionWrapper.executeMessage(IInputConnectionWrapper.java:304)
W/WebView (23621): at com.android.internal.view.IInputConnectionWrapper$MyHandler.handleMessage(IInputConnectionWrapper.java:78)
W/WebView (23621): at android.os.Handler.dispatchMessage(Handler.java:102)
W/WebView (23621): at android.os.Looper.loop(Looper.java:135)
W/WebView (23621): at android.os.HandlerThread.run(HandlerThread.java:61)
> E/AndroidRuntime(23621): FATAL EXCEPTION: InputConnectionHandlerThread
> E/AndroidRuntime(23621): Process: com.servo.Scanner, PID: 23621
> E/AndroidRuntime(23621): java.lang.RuntimeException: java.lang.Throwable: A WebView method was called on thread ‘InputConnectionHandlerThread’. All WebView methods must be called on the same thread. (Expected Looper Looper (main, tid 1) {2afd5acc} called on Looper (InputConnectionHandlerThread, tid 22462) {784238e}, FYI main Looper is Looper (main, tid 1) {2afd5acc})
E/AndroidRuntime(23621): at android.webkit.WebView.checkThread(WebView.java:2213)
E/AndroidRuntime(23621): at android.webkit.WebView.getUrl(WebView.java:1299)
E/AndroidRuntime(23621): at com.appgyver.webview.AGWebView.getUrl(AGWebView.java:262)
E/AndroidRuntime(23621): at com.appgyver.webview.AGWebViewBase.getWebViewContext(AGWebViewBase.java:310)
E/AndroidRuntime(23621): at com.appgyver.webview.AGInputConnectionWrapper.fireActionButtonEvent(AGInputConnectionWrapper.java:40)
E/AndroidRuntime(23621): at com.appgyver.webview.AGInputConnectionWrapper.performEditorAction(AGInputConnectionWrapper.java:32)
E/AndroidRuntime(23621): at com.android.internal.view.IInputConnectionWrapper.executeMessage(IInputConnectionWrapper.java:304)
E/AndroidRuntime(23621): at com.android.internal.view.IInputConnectionWrapper$MyHandler.handleMessage(IInputConnectionWrapper.java:78)
E/AndroidRuntime(23621): at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime(23621): at android.os.Looper.loop(Looper.java:135)
E/AndroidRuntime(23621): at android.os.HandlerThread.run(HandlerThread.java:61)
E/AndroidRuntime(23621): Caused by: java.lang.Throwable: A WebView method was called on thread ‘InputConnectionHandlerThread’. All WebView methods must be called on the same thread. (Expected Looper Looper (main, tid 1) {2afd5acc} called on Looper (InputConnectionHandlerThread, tid 22462) {784238e}, FYI main Looper is Looper (main, tid 1) {2afd5acc})
E/AndroidRuntime(23621): at android.webkit.WebView.checkThread(WebView.java:2203)
E/AndroidRuntime(23621): … 10 more
W/ActivityManager( 853): Force finishing activity 1 com.servo.Scanner/com.appgyver.runtime.scanner.ScannedWebKitApplicationActivity
D/com.appgyver.cordova.CordovaFacade(23621): Paused the application!
D/com.appgyver.cordova.CordovaFacade(23621): Paused the application!
D/com.appgyver.cordova.CordovaFacade(23621): Paused the application!


#4

If I’m not mistaking, webview build is somehow deprecated. Crosswalk build should be faster (but the apk will be bigger).

You could try to mail Appgyver team with your bug report, but I doubt they’ll answer.


#5

Yeah, I’ll keep using the crosswalk build from now on …
I hope no more crashes arrive …
Thanks