[ 
https://issues.apache.org/jira/browse/CB-5427?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13826667#comment-13826667
 ] 

Mike Billau commented on CB-5427:
---------------------------------

Originally I reported this while testing on an actual build on a new Nexus 5 
phone. 

I just installed the 4.4 ROM (NAKASI-KRT16o) on my Nexus 7 and am getting both 
errors. 


1) Sometimes you see  "Alert: Unexpected: browser closed without a loadstop or 
loadstart error".  I can reproduce it almost every time now by 1) open a page 
in InAppBrowser, 2) hit back 3) open a page in CordovaWebView 4) see dialog.  
Sometimes it will work fine but following this pattern triggers the error 
pretty consistently on both of my devices. 

If you dismiss the alert, the app seems fine, there isn't a nasty stack trace 
or anything. This occurs on both Nexus 5 and Nexus 7, both running the latest 
Android 4.4 (from Google.)  It seems to happen slightly more consistently on 
the Nexus 5 phone. 


2) If you do not hit okay when the alert pops up and let it wait, eventually 
you will get a {noformat}
11-19 11:38:41.867: E/CordovaWebView(7121): CordovaWebView: TIMEOUT 
ERROR!{noformat}
error, a dialog about not being able to connect to the server, that nasty stack 
trace above about the "window leaked". The app will force quit (but still say 
in the app list..?) and if you launch the app again (either from the launcher 
or from the recently used/running apps screen) the webview will stay black and 
nothing happens until you quit the app and restart. (Cordova seems present when 
this black screen is here because you can see {noformat}11-19 11:43:23.997: 
I/CordovaLog(7665): Found start page location: index.html
11-19 11:43:23.997: I/CordovaLog(7665): Changing log level to DEBUG(3)
11-19 11:43:24.007: D/CordovaActivity(7665): CordovaActivity.onCreate()
11-19 11:43:24.017: D/CordovaWebView(7665): CordovaWebView is running on device 
made by: asus
11-19 11:43:24.027: D/JsMessageQueue(7665): Set native->JS mode to 2
11-19 11:43:24.027: D/CordovaActivity(7665): CordovaActivity.init()
11-19 11:43:24.037: D/CordovaWebView(7665): >>> 
loadUrl(file:///android_asset/www/index.html)
11-19 11:43:24.037: D/PluginManager(7665): init()
11-19 11:43:24.057: D/CordovaWebView(7665): >>> loadUrlNow()
{noformat}

I think we can probably ignore this second error for now since it's hard to 
tell if that is being caused by the first error or not. 


> InAppBrowser crashes without loadstop or loaderror on Android 4.4
> -----------------------------------------------------------------
>
>                 Key: CB-5427
>                 URL: https://issues.apache.org/jira/browse/CB-5427
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android, Plugin InAppBrowser
>    Affects Versions: 3.2.0
>         Environment: Windows 7
> Android 4.x
>            Reporter: Mike Billau
>
> InAppBrowser on Android 4.4 sometimes fails when you click to open any page 
> on the CordovaWebView. An alert will pop up saying "Unexpected: Browser 
> closed without a loadstop or loaderror."   Closing the dialog will force quit 
> the application. I can't detect a pattern to reproduce the issue; what I do 
> is just keep running through the first few buttons under Local URL and White 
> Listed URL headings on the mobile spec page. Other people seem to be having 
> this issue too: https://groups.google.com/forum/#!topic/phonegap/e5_5unC2fYs
> In logcat I'm seeing:
> {noformat}
> 11-18 11:50:07.648: D/CordovaLog(6369): 
> file:///android_asset/www/inappbrowser/index.html: Line 79 : IAB 
> event={"type":"loadstop","url":"http://www.google.com/"}
> 11-18 11:50:07.648: I/chromium(6369): [INFO:CONSOLE(79)] "IAB 
> event={"type":"loadstop","url":"http://www.google.com/"}";, source: 
> file:///android_asset/www/inappbrowser/index.html (79)
> 11-18 11:50:07.928: W/UnimplementedWebViewApi(6369): Unimplemented WebView 
> method onKeyDown called from: 
> android.webkit.WebView.onKeyDown(WebView.java:2169)
> 11-18 11:50:07.968: W/InputEventReceiver(6369): Attempted to finish an input 
> event but the input event receiver has already been disposed.
> 11-18 11:50:07.998: D/CordovaLog(6369): 
> file:///android_asset/www/inappbrowser/index.html: Line 79 : IAB 
> event={"type":"exit"}
> 11-18 11:50:07.998: I/chromium(6369): [INFO:CONSOLE(79)] "IAB 
> event={"type":"exit"}", source: 
> file:///android_asset/www/inappbrowser/index.html (79)
> 11-18 11:50:09.408: D/InAppBrowser(6369): target = _self
> 11-18 11:50:09.418: D/InAppBrowser(6369): in self
> 11-18 11:50:09.418: D/CordovaWebView(6369): >>> loadUrl(http://www.apple.com/)
> 11-18 11:50:09.418: D/PluginManager(6369): init()
> 11-18 11:50:09.428: D/CordovaWebView(6369): >>> loadUrlNow()
> 11-18 11:50:09.428: W/CordovaPlugin(6369): Attempted to send a second 
> callback for ID: InAppBrowser921848427
> 11-18 11:50:09.428: W/CordovaPlugin(6369): Result was: ""
> 11-18 11:50:09.488: D/CordovaLog(6369): 
> file:///android_asset/www/inappbrowser/index.html: Line 79 : IAB 
> event={"type":"exit"}
> 11-18 11:50:09.488: I/chromium(6369): [INFO:CONSOLE(79)] "IAB 
> event={"type":"exit"}", source: 
> file:///android_asset/www/inappbrowser/index.html (79)
> 11-18 11:50:09.508: D/dalvikvm(6369): GC_FOR_ALLOC freed 50K, 3% free 
> 18380K/18836K, paused 8ms, total 8ms
> 11-18 11:50:09.508: I/dalvikvm-heap(6369): Grow heap (frag case) to 18.584MB 
> for 629776-byte allocation
> 11-18 11:50:09.528: D/dalvikvm(6369): GC_FOR_ALLOC freed 7K, 3% free 
> 18988K/19452K, paused 12ms, total 12ms
> 11-18 11:50:09.578: D/dalvikvm(1108): GC_CONCURRENT freed 448K, 9% free 
> 17309K/18816K, paused 2ms+1ms, total 23ms
> 11-18 11:50:09.638: D/dalvikvm(744): GC_CONCURRENT freed 2582K, 29% free 
> 27397K/38100K, paused 3ms+4ms, total 76ms
> 11-18 11:50:29.428: E/CordovaWebView(6369): CordovaWebView: TIMEOUT ERROR!
> 11-18 11:50:29.428: D/CordovaWebViewClient(6369): 
> CordovaWebViewClient.onReceivedError: Error code=-6 Description=The 
> connection to the server was unsuccessful. URL=http://www.apple.com/
> 11-18 11:50:29.428: D/CordovaActivity(6369): 
> onMessage(onReceivedError,{"errorCode":-6,"url":"http:\/\/www.apple.com\/","description":"The
>  connection to the server was unsuccessful."})
> 11-18 11:50:29.458: D/SoftKeyboardDetect(6369): Ignore this event
> 11-18 11:50:29.558: D/CordovaWebViewClient(6369): 
> onPageFinished(http://www.apple.com/)
> 11-18 11:50:29.558: D/CordovaActivity(6369): 
> onMessage(onPageFinished,http://www.apple.com/)
> 11-18 11:50:56.078: D/audio_hw_primary(184): select_devices: 
> out_snd_device(2: speaker) in_snd_device(0: )
> 11-18 11:50:56.098: D/CordovaActivity(6369): Paused the application!
> 11-18 11:50:56.128: W/IInputConnectionWrapper(6369): showStatusIcon on 
> inactive InputConnection
> 11-18 11:50:56.598: D/CordovaActivity(6369): CordovaActivity.onDestroy()
> 11-18 11:50:56.598: D/CordovaWebView(6369): >>> loadUrlNow()
> 11-18 11:50:56.678: E/WindowManager(6369): android.view.WindowLeaked: 
> Activity org.apache.mobilespec.mobilespec has leaked window 
> com.android.internal.policy.impl.PhoneWindow$DecorView{42686118 V.E..... 
> R....... 0,0-1080,638} that was originally added here
> 11-18 11:50:56.678: E/WindowManager(6369):    at 
> android.view.ViewRootImpl.<init>(ViewRootImpl.java:346)
> 11-18 11:50:56.678: E/WindowManager(6369):    at 
> android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:248)
> 11-18 11:50:56.678: E/WindowManager(6369):    at 
> android.view.WindowManagerImpl.addView(WindowManagerImpl.java:69)
> 11-18 11:50:56.678: E/WindowManager(6369):    at 
> android.app.Dialog.show(Dialog.java:286)
> 11-18 11:50:56.678: E/WindowManager(6369):    at 
> android.app.AlertDialog$Builder.show(AlertDialog.java:951)
> 11-18 11:50:56.678: E/WindowManager(6369):    at 
> org.apache.cordova.CordovaChromeClient.onJsAlert(CordovaChromeClient.java:135)
> 11-18 11:50:56.678: E/WindowManager(6369):    at 
> com.android.webview.chromium.WebViewContentsClientAdapter.handleJsAlert(WebViewContentsClientAdapter.java:606)
> 11-18 11:50:56.678: E/WindowManager(6369):    at 
> com.android.org.chromium.android_webview.AwContentsClientBridge.handleJsAlert(AwContentsClientBridge.java:73)
> 11-18 11:50:56.678: E/WindowManager(6369):    at 
> com.android.org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native 
> Method)
> 11-18 11:50:56.678: E/WindowManager(6369):    at 
> com.android.org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:27)
> 11-18 11:50:56.678: E/WindowManager(6369):    at 
> android.os.Handler.dispatchMessage(Handler.java:102)
> 11-18 11:50:56.678: E/WindowManager(6369):    at 
> android.os.Looper.loop(Looper.java:137)
> 11-18 11:50:56.678: E/WindowManager(6369):    at 
> android.app.ActivityThread.main(ActivityThread.java:4998)
> 11-18 11:50:56.678: E/WindowManager(6369):    at 
> java.lang.reflect.Method.invokeNative(Native Method)
> 11-18 11:50:56.678: E/WindowManager(6369):    at 
> java.lang.reflect.Method.invoke(Method.java:515)
> 11-18 11:50:56.678: E/WindowManager(6369):    at 
> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
> 11-18 11:50:56.678: E/WindowManager(6369):    at 
> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)
> 11-18 11:50:56.678: E/WindowManager(6369):    at 
> dalvik.system.NativeStart.main(Native Method)
> {noformat}
> After the app force closes, sometimes when I try to open Mobile Spec again, 
> it's just a solid black screen. Logcat says Cordova is there but nothing gets 
> displayed on the webview. I'm not sure if this is related or not. 



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to