Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7774345
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T17:21:16+00:00 2026-06-01T17:21:16+00:00

I use phonegap 1.3.0 to develop mobile application. when i click one button that

  • 0

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!

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” .

I find the code that generate the error. just below:

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 > 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() > 0) {
                    int comma = loading.indexOf(',');
                    if (comma > 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);
        }
    });
}

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T17:21:18+00:00Added an answer on June 1, 2026 at 5:21 pm

    Android enforces a timeout when loading URLs in a webview.

    check out this link, (it doesn’t really pertain to JQM) , but phonegap android
    http://jquerymobile.com/test/docs/pages/phonegap.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to develop an HTML5 mobile business application using PhoneGap. After finishing my
I'm working on a mobile app with Phonegap which will use Geolocation. I used
Is it possible to use Phonegap's Build service to build projects that may have
I'm trying to use PhoneGap DatePicker plugin (PhoneGap 1.5 (Cordova) in Xcode 4.2) for
I'm building a PhoneGap 1.5 (Cordova) application for iOS and want to use the
I am using phoneGap and jQuery Mobile . When I use a <div></div> tag
I starting to write an application that will need to have a QR code
Hy everybody! I'm trying to use Childbrowser Phonegap plugin to redirect the user within
I have an application built using PhoneGap (Android) that is essentially a shell for
I am gonna develop a mobile application for multiple devices, say iPhone, iPad and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.