AJAX issue with iOS 10

I have a cordova application that runs fine on old iOS versions and on Android devices as well. With the release of iOS 10 it started throwing timeout error if the AJAX request took more than a minute to return data. Please help me with this issue at high priority

Replies

I'm also having this same issue.

I am also having this issue and and it is currently affecting clients running offline applications with full delta handeling as the initial syncronisation process that could take a few minutes. What I would like to know is whether we will need to re architect the API's or is this something that will "fixed" in the future. So I am looking for a yay or nay.

Facing same critical issue here. After 60 seconds all ajax calls timeout. This is not acceptable in real life scenarios with slow connections.

Please let us know if these issue will be taken care of. Thanks and kind regards.

Same issue here... Verry bad for our Company....

I was able to write up something in Swift using Alamofire and it seems to work. I think what we'll have to do is alter the URLSessionConfiguration manually for our Cordova apps. Perhaps write a plugin? I'll report back with what I can, if I can do anything. Below is what I wrote up in swift.


func getData() {
    self.textView.text = ""
    print("getting data")
    let headers = [
        "Accept": "application/json",
        "Content-Type": "application/json"
    ]
   
    let user = self.userName.text
    let password = self.password.text
   
    let credential = URLCredential(user: user!, password: password!, persistence: .forSession)
   
    let config = URLSessionConfiguration.default
    config.timeoutIntervalForRequest = 120
    self.alamofireManager = Alamofire.SessionManager(configuration: config)
   
    self.alamofireManager!.request("https://{My GET Request URL}", headers: headers)
        .authenticate(usingCredential: credential)
        .responseString {
            response in
            debugPrint(response)
            self.textView.text.append(response.debugDescription)
            print("done getting data")
    }
}

This is causing a major problem for a line of business app called Kounta (Point of Sale) when the app is processing payments using an integrated Merchant Services device.


Would love to know why this is happening, and what Kounta should do about it.

How has it been going have you had any luck? 🙂

No luck for my cordova app. We just had to implement a 60 second timeout for our AJAX calls. I'd like to know from Apple anything we can do, or they can do since it's a big problem for our enterprise, as well as a lot of you.

Same issue with our cordova ionic App. Data synchronisation for offline usage takes more than 60 sec and now with ios10 we are running into a timeout.


Does anyone know any statement from apple?

Apple's statement would be to work with your third-party framework provider to set an appropriate timeout interval for your use case.

Also facing this critical issue with our apps. Have tried overriding the timeout configuration via Cordova webview with no luck.

We are having issues with an enterprise application that we developed with offline functionality. To achieve the offline functionality we cache all of our required data offline. Which means we have ajax service calls that take longer than 60 seconds to complete. As of iOS 10 any call that takes longer than 60 seconds gets canceled and we get no error message or anything because it doesn't timeout via normal timeouts or error out with any error.


I opened up a bug with Apple, hopefully someone will reach out and help us out.

Are you able to manage anything? We are also stuck by the same issue and we badly need help.

A ticket was opened in the Apache Cordova tracker for this. The words the maintainer (for Cordova iOS) used are: "we are handcuffed in this regard."


https://issues.apache.org/jira/browse/CB-11906

The timeout only seems to occur on idle time not when the service is actually sending back data. We changed our syncronisation process to poll. It will kick a request off to the server and the server will collect the data in the background and return a token to the client application. The application will then poll the server using the token and retrieve the data once the server is completed. We wanted to use Web sockets to inform the application of completion of data selection but the server we were on did not support this.