Note that there are some explanatory texts on larger screens.

plurals
  1. POE/DroidGap(21383): DroidGap: TIMEOUT ERROR! - calling webViewClient
    primarykey
    data
    text
    <p>I use phonegap 1.3.0 to develop mobile application. when i click one button that will invoke my plugin to invoke a js function, after about 20s, countered the error: "E/DroidGap(21383): DroidGap: TIMEOUT ERROR! - calling webViewClient" in eclipse log console. and the emulator alert a dialog, show error message : The connection to the server was unsuccessful.(javascript:showProcessBar(1)) How can I fix the error? thanks! </p> <p>There are some details below to complement my question. when I invoke js function in phonegap plugin. there must will show error message in logcat:"E/DroidGap(21383): DroidGap: TIMEOUT ERROR! - calling webViewClient" .</p> <p>I find the code that generate the error. just below:</p> <pre><code>private void loadUrlIntoView(final String url) { if (!url.startsWith("javascript:")) { LOG.d(TAG, "DroidGap.loadUrl(%s)", url); } this.url = url; if (this.baseUrl == null) { int i = url.lastIndexOf('/'); if (i &gt; 0) { this.baseUrl = url.substring(0, i+1); } else { this.baseUrl = this.url + "/"; } } if (!url.startsWith("javascript:")) { LOG.d(TAG, "DroidGap: url=%s baseUrl=%s", url, baseUrl); } // Load URL on UI thread final DroidGap me = this; this.runOnUiThread(new Runnable() { public void run() { // Init web view if not already done if (me.appView == null) { me.init(); } // Handle activity parameters me.handleActivityParameters(); // Track URLs loaded instead of using appView history me.urls.push(url); me.appView.clearHistory(); // Create callback server and plugin manager if (me.callbackServer == null) { me.callbackServer = new CallbackServer(); me.callbackServer.init(url); } else { me.callbackServer.reinit(url); } if (me.pluginManager == null) { me.pluginManager = new PluginManager(me.appView, me); } else { me.pluginManager.reinit(); } // If loadingDialog property, then show the App loading dialog for first page of app String loading = null; if (me.urls.size() == 1) { loading = me.getStringProperty("loadingDialog", null); } else { loading = me.getStringProperty("loadingPageDialog", null); } if (loading != null) { String title = ""; String message = "Loading Application..."; if (loading.length() &gt; 0) { int comma = loading.indexOf(','); if (comma &gt; 0) { title = loading.substring(0, comma); message = loading.substring(comma+1); } else { title = ""; message = loading; } } me.spinnerStart(title, message); } // Create a timeout timer for loadUrl final int currentLoadUrlTimeout = me.loadUrlTimeout; Runnable runnable = new Runnable() { public void run() { try { synchronized(this) { wait(me.loadUrlTimeoutValue); } } catch (InterruptedException e) { e.printStackTrace(); } // If timeout, then stop loading and handle error if (me.loadUrlTimeout == currentLoadUrlTimeout) { me.appView.stopLoading(); LOG.e(TAG, "DroidGap: TIMEOUT ERROR! - calling webViewClient"); //me.webViewClient.onReceivedError(me.appView, -6, "The connection to the server was unsuccessful.", url); } } }; Thread thread = new Thread(runnable); thread.start(); me.appView.loadUrl(url); } }); } </code></pre> <p>I comment the line : me.webViewClient.onReceivedError(me.appView, -6, "The connection to the server was unsuccessful.", url); because it will alert a dialog to terminate my program.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload