cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Victor Costan (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CB-4586) Exception when trying to call close() on In-App Browser instance
Date Wed, 14 Aug 2013 23:11:48 GMT
Victor Costan created CB-4586:
---------------------------------

             Summary: Exception when trying to call close() on In-App Browser instance
                 Key: CB-4586
                 URL: https://issues.apache.org/jira/browse/CB-4586
             Project: Apache Cordova
          Issue Type: Bug
          Components: Plugin InAppBrowser
    Affects Versions: 3.0.0
         Environment: Tested on Android 4.3 / Nexus 4 and Nexus 10
            Reporter: Victor Costan
            Assignee: Steve Gill


Code sketch:

{code:javascript}
var browser = window.open(oauthUrl, '_blank', 'location=yes');
browser.addEventListener('loadstop', function() {
  if (/* event.url matches the OAuth response URL*/ true) {
    browser.close();
  }
});
{code}

Stack trace from adb logcat.
{code}
W/webview_proxy(27421): java.lang.Throwable: Warning: A WebView method was called on thread
'WebViewCoreThread'. All WebView methods must be called on the UI thread. Future versions
of WebView may not support use on other threads.
W/webview_proxy(27421): 	at android.webkit.WebView.checkThread(WebView.java:1918)
W/webview_proxy(27421): 	at android.webkit.WebView.loadUrl(WebView.java:771)
W/webview_proxy(27421): 	at org.apache.cordova.core.InAppBrowser.closeDialog(InAppBrowser.java:316)
W/webview_proxy(27421): 	at org.apache.cordova.core.InAppBrowser.execute(InAppBrowser.java:161)
W/webview_proxy(27421): 	at org.apache.cordova.CordovaPlugin.execute(CordovaPlugin.java:65)
W/webview_proxy(27421): 	at org.apache.cordova.PluginManager.execHelper(PluginManager.java:229)
W/webview_proxy(27421): 	at org.apache.cordova.PluginManager.exec(PluginManager.java:214)
W/webview_proxy(27421): 	at org.apache.cordova.ExposedJsApi.exec(ExposedJsApi.java:53)
W/webview_proxy(27421): 	at android.webkit.JWebCoreJavaBridge.sharedTimerFired(Native Method)
W/webview_proxy(27421): 	at android.webkit.JWebCoreJavaBridge.sharedTimerFired(Native Method)
W/webview_proxy(27421): 	at android.webkit.JWebCoreJavaBridge.fireSharedTimer(JWebCoreJavaBridge.java:92)
W/webview_proxy(27421): 	at android.webkit.JWebCoreJavaBridge.handleMessage(JWebCoreJavaBridge.java:108)
W/webview_proxy(27421): 	at android.os.Handler.dispatchMessage(Handler.java:99)
W/webview_proxy(27421): 	at android.os.Looper.loop(Looper.java:137)
W/webview_proxy(27421): 	at android.webkit.WebViewCore$WebCoreThread.run(WebViewCore.java:814)
W/webview_proxy(27421): 	at java.lang.Thread.run(Thread.java:841)
W/System.err(27421): java.lang.RuntimeException: java.lang.Throwable: Warning: A WebView method
was called on thread 'WebViewCoreThread'. All WebView methods must be called on the UI thread.
Future versions of WebView may not support use on other threads.
W/System.err(27421): 	at android.webkit.WebView.checkThread(WebView.java:1927)
W/System.err(27421): 	at android.webkit.WebView.loadUrl(WebView.java:771)
W/System.err(27421): 	at org.apache.cordova.core.InAppBrowser.closeDialog(InAppBrowser.java:316)
W/System.err(27421): 	at org.apache.cordova.core.InAppBrowser.execute(InAppBrowser.java:161)
W/System.err(27421): 	at org.apache.cordova.CordovaPlugin.execute(CordovaPlugin.java:65)
W/System.err(27421): 	at org.apache.cordova.PluginManager.execHelper(PluginManager.java:229)
W/System.err(27421): 	at org.apache.cordova.PluginManager.exec(PluginManager.java:214)
W/System.err(27421): 	at org.apache.cordova.ExposedJsApi.exec(ExposedJsApi.java:53)
W/System.err(27421): 	at android.webkit.JWebCoreJavaBridge.sharedTimerFired(Native Method)
W/System.err(27421): 	at android.webkit.JWebCoreJavaBridge.sharedTimerFired(Native Method)
W/System.err(27421): 	at android.webkit.JWebCoreJavaBridge.fireSharedTimer(JWebCoreJavaBridge.java:92)
W/System.err(27421): 	at android.webkit.JWebCoreJavaBridge.handleMessage(JWebCoreJavaBridge.java:108)
W/System.err(27421): 	at android.os.Handler.dispatchMessage(Handler.java:99)
W/System.err(27421): 	at android.os.Looper.loop(Looper.java:137)
W/System.err(27421): 	at android.webkit.WebViewCore$WebCoreThread.run(WebViewCore.java:814)
W/System.err(27421): 	at java.lang.Thread.run(Thread.java:841)
W/System.err(27421): Caused by: java.lang.Throwable: Warning: A WebView method was called
on thread 'WebViewCoreThread'. All WebView methods must be called on the UI thread. Future
versions of WebView may not support use on other threads.
W/System.err(27421): 	at android.webkit.WebView.checkThread(WebView.java:1918)
W/System.err(27421): 	... 15 more
D/dalvikvm(27421): GC_CONCURRENT freed 410K, 5% free 9371K/9808K, paused 2ms+4ms, total 22ms
W/CordovaPlugin(27421): Attempted to send a second callback for ID: InAppBrowser1475593509
W/CordovaPlugin(27421): Result was: {"type":"loadstart","url":"http:\/\/about:blank"}
W/CordovaPlugin(27421): Attempted to send a second callback for ID: InAppBrowser1475593509
W/CordovaPlugin(27421): Result was: {"type":"exit"}
W/CordovaPlugin(27421): Attempted to send a second callback for ID: InAppBrowser1475593509
W/CordovaPlugin(27421): Result was: {"type":"loadstop","url":"about:blank"}
{code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message