Closed AaronMT closed 6 years ago
The log error:
2018-09-27 13:43:38.060 6172-6172/org.mozilla.tv.firefox.debug W/cr_AwContents: Application attempted to call on a destroyed WebView
java.lang.Throwable
at org.chromium.android_webview.AwContents.isDestroyed(AwContents.java:1262)
at org.chromium.android_webview.AwContents.isDestroyedOrNoOperation(AwContents.java:1192)
at org.chromium.android_webview.AwContents.evaluateJavaScript(AwContents.java:2259)
at com.android.webview.chromium.WebViewChromium.evaluateJavaScript(WebViewChromium.java:592)
at com.android.webview.chromium.WebViewExtAmazon.evaluateJavaScript(WebViewExtAmazon.java:56)
at android.webkit.WebView.evaluateJavascript(WebView.java:1053)
at org.mozilla.focus.ext.EngineViewKt.evalJS(EngineView.kt:107)
at org.mozilla.focus.browser.FocusedDOMElementCache.restore(FocusedDOMElementCache.kt:22)
at org.mozilla.focus.ext.EngineViewKt$setupForApp$3$1.run(EngineView.kt:95)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6188)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:911)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:801)
I don't see the log error but I was able to reproduce. Here's the layout inspector at the time of the white screen:
Looks like the WebView has the focus but for some reason the menu button isn't working to show the overlay.
I'm getting the same log statements on dpad keypress as #1142 and #1202.
2018-09-27 12:02:18.971 3567-3842/? W/bt_btif: bta_hh_co_is_peer_amazon_remote: result = 1, vid = 0x1949, pid = 0x410
2018-09-27 12:02:18.971 3567-3842/? W/bt_btif: bta_hh_co_is_no_unsniff_amazon_remote: result = 1, vid = 0x1949, pid = 0x410
2018-09-27 12:02:18.974 3567-3842/? W/bt_btif: bta_hh_co_is_peer_amazon_remote: result = 1, vid = 0x1949, pid = 0x410
2018-09-27 12:02:18.974 3567-3842/? W/bt_btif: bta_hh_co_is_no_unsniff_amazon_remote: result = 1, vid = 0x1949, pid = 0x410
2018-09-27 12:02:18.975 3450-3100/? E/AmazonInputManagerService: Toggle bit button map has not been initialized!
I added a breakpoint to the dispatchKeyEvent
method and determined the menu button is getting called but maybeBrowserFragment?.dispatchKeyEvent returned false, I think. Unfortunately, Android killed my process for ANR though. :( (maybe I started from the device UI instead of IDE)
Next steps would be to continue investigated what happens in maybeBrowserFragment.dispatchKeyEvent
. ^
I just reproduced a similar but different bug. I found two states:
I noticed the progress bar sometimes says, "" and sometimes it says, "firefox:home". I wonder if WebView gets grumpy when we press back before the URL has changed (though then again that's on components to pass us the URL at the appropriate time...).
And similarly, in one of these states, the progress bar is stuck on the screen but is not animating: this is a weird state!
RCA:
WebView#destroy
is called, most methods called on it will throw exceptions and lead to weird behaviorWebViewCache
was recreated in MainActivity#onCreate
WebView#onDestroy
was called in EngineViewLifecycleFragment#onDestroy
WebView
that we were unable to use.EngineViewLifecycleFragment
to be destroyed, whereas canceling it after a few seconds does not
Running e869530c2be44344627723c83defdf3af395a2be on a FireTV Cube in the office.
Reproduced also via: