cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jesse MacFadyen (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CB-2428) Javascript stops working on windows phone 8 when getting a 401 response from ajax
Date Tue, 23 Apr 2013 21:35:16 GMT

     [ https://issues.apache.org/jira/browse/CB-2428?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jesse MacFadyen resolved CB-2428.
---------------------------------

    Resolution: Unresolved

This is an issue with the browser component itself, and is likely not something we can fix.
IE10 appears to be locking due to a security exception.

Here is the code I used to test this issue, both with and without cordova-js code included.

{code:javascript}
window.console = { log: function (msg) { window.external.Notify("log: " + msg); } }
window.onerror = function (err, fn, ln) { console.log("window.onerror :: " + err + " : " +
fn + " : " + ln); }
function doXHRTests() {
    console.log("doXHRTests");
    try {
        var url = "http://httpstat.us/401";
        var xhr = new XMLHttpRequest();
        xhr.open("POST", url, true);
        xhr.onreadystatechange = function () {
            console.log("readystate change " + this.readyState + " " + this.responseText);
        }
        xhr.send(null);
    }
    catch (e) {
        console.log("caught exception :: " + e);
    }
}
setInterval(doXHRTests, 4000);
{code}

                
> Javascript stops working on windows phone 8 when getting a 401 response from ajax
> ---------------------------------------------------------------------------------
>
>                 Key: CB-2428
>                 URL: https://issues.apache.org/jira/browse/CB-2428
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: WP8
>    Affects Versions: 2.3.0, 2.4.0
>            Reporter: Ismael Olusola Jimoh
>            Assignee: Jesse MacFadyen
>
> I am using ajax to authenticate with a username and password. This works as expected
on iOS, Android and on desktop browsers. However when recieveing a 401 in phonegap for WP8,
the app stops responding. Anything else looks ok (200, 404, 500).
> This issue is not seen in IE on the phone, only in phonegap.
> I have found out that if the server does not put "WWW-Authenticate:" in the response
header, ajax will exit as expected and other javascript code will run fine.
> Has anyone seen this kind of issue, and a possible solution that does not involve changing
things server side?

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