cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "AmpEBK (JIRA)" <>
Subject [jira] [Created] (CB-7830) No more possible to catch a TIMEOUT ERROR with Cordova Android 3.6.3
Date Tue, 21 Oct 2014 11:43:33 GMT
AmpEBK created CB-7830:

             Summary: No more possible to catch a TIMEOUT ERROR with Cordova Android 3.6.3
                 Key: CB-7830
             Project: Apache Cordova
          Issue Type: Bug
          Components: Android
    Affects Versions: 3.6.3
         Environment: OS : Android 4.0.4
Software : cordova android 3.6.3
            Reporter: AmpEBK

Dear All,

After migrating from Cordova 3.4.0 to 3.6.3, it seems now to be impossible to catch the TIMEOUT
ERROR in my activity (when my web site does not respond for instance). In the 3.5 release
notes, a new behavior has been added "Ignore multiple onPageFinished() callbacks & onReceivedError
due to stopLoading()" and seems to be the cause.
Looking at closely to the source code of the CordovaWebView java class and calling the loadUrlIntoView
method, if we meet the 'Timeout error method' we have:
            public void run() {
                LOG.e(TAG, "CordovaWebView: TIMEOUT ERROR!");
                if (viewClient != null) {
                    viewClient.onReceivedError(me, -6, "The connection to the server was unsuccessful.",
but the line 'me.stopLoading();' does : viewClient.isCurrentlyLoading = false;
and when we call the line 'viewClient.onReceivedError(me, -6, "The connection to the server
was unsuccessful.", url);', we call the onReceivedError method of the CordovaWebViewClient
java class,
which ignores the error due to stopLoading():
        if (!isCurrentlyLoading) {
Thus, this method returns and the super.onReceivedError() is never called.
Please help
Best regards,

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message