[
https://issues.apache.org/jira/browse/CB-7830?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Joe Bowser resolved CB-7830.
----------------------------
Resolution: Won't Fix
This version of Cordova is no longer supported, and this is a WebView specific
API that you are attempting to use. I'm going to close this as won't fix,
since the code has changed so drastically since then that it's impossible to
know what to do in this case.
> No more possible to catch a TIMEOUT ERROR with Cordova Android 3.6.3
> --------------------------------------------------------------------
>
> Key: CB-7830
> URL: https://issues.apache.org/jira/browse/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
> Labels: patch
>
> 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() {
> me.stopLoading();
> LOG.e(TAG, "CordovaWebView: TIMEOUT ERROR!");
> if (viewClient != null) {
> viewClient.onReceivedError(me, -6, "The connection to the
> server was unsuccessful.", url);
> }
> }
> 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) {
> return;
> }
> Thus, this method returns and the super.onReceivedError() is never called.
> Please help
> Best regards,
> Amp
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]