ATS tls_handshake[-9024] error

I am creating a hybrid iOS application using apache Cordova. The problem is till iOS 8.2 my application's REST services is working fine but for higher version of OS I am getting tls error.

This is not a new question, fair enough but I tried every possible cocoa key combinations to bypass my http:// services but still facing this problem. I will brief about the errors.

If I am setting NSAllowsArbitraryLoads to 'true' the error which I am getting is "nw_coretls_read_one_record tls_handshake_process: [-9824]" small and confusing.

If I am setting cocoa keys like minimum tls version and allow insecure http load, the error which I am getting is ---

"nw_coretls_read_one_record tls_handshake_process: [-9824] 2017-04-24 16:22:59.536 appname[63076:1462750] NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9824) 2017-04-24 16:22:59.561310 SmartPM[63076:1462718] PAC Fetch failed with error [NSURLErrorDomain:-1200] 2017-04-24 16:22:59.561649 SmartPM[63076:1462718] [] nw_proxy_resolver_create_parsed_array PAC evaluation error: NSURLErrorDomain: -1200 2017-04-24 16:23:00.109545 SmartPM[63076:1462792] [] nw_coretls_read_one_record tls_handshake_process: [-9824] 2017-04-24 16:23:00.112 SmartPM[63076:1462750] NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9824) 2017-04-24 16:23:00.219 SmartPM[63076:1462469] webView:didFailLoadWithError - -1200: An SSL error has occurred and a secure connection to the server cannot be made."


Please help me regarding this. I am tired of trying different options and explored all blogs related to this ATS errors.

Accepted Answer

Finally I found the solution for this question. It was a problem of HTML meta tag Content-Security-policy configuration. I have bypassed the policy using

<meta http-equiv="Content-Security-Policy" content="default-src data: gap: *; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'">

and all services are working fine now. The answer which I didn't get is Why it worked for iOS 8.2 simulator?

Finally I found the solution for this question.

Yay!

The answer which I didn't get is Why it worked for iOS 8.2 simulator?

I expect that’s because that meta tag wasn’t supported on older systems, but I don’t know for sure because I don’t track web issues closely.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Hi Esckimo/Shirish ,


I am having similar error but his solutions did not work for mine.. I still get this error :


NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9801)

Simulator is running is running but its showing no internet connection .

btw I could not be able to run TLStool , i got same directory error .

thanks

Please start a new thread for this. While you may be seeing similar symptoms, in my experience each TLS problem is its own unique beast and I doubt that continuing on this (already super long) thread will be helpful.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"
ATS tls_handshake[-9024] error
 
 
Q