• Register
0 votes

Problem :

Since I upgraded the existing project with the iOS 9, I keep getting the below error :

“An SSL error has occurred and a secure connection to the server cannot be made.”

6 5 3
7,540 points

Please log in or register to answer this question.

1 Answer

0 votes

Solution :

It appears as if the iOS 9.0.2 is breaking requests to valid HTTPS endpoints. My current thought is that it is needing SHA-256 certs or it fails with above error.

To reproduce, just inspect the UIWebView with safari, and try to navigate to the arbitrary HTTPS endpoint as shown below :

location.href = "https://d37gvrvc0wt4s1.cloudfront.net/js/v1.4/rollbar.min.js"// [Error] Failed to load resource: An SSL error has occurred and a secure connection to the server cannot be made. (rollbar.min.js, line 0)

Now try to go to google as of course they have the SHA-256 cert:

location.href = "https://google.com"// no problemo

So adding the exception to transport the security will work to fix this. I also think that completely disabling the  NSAppTransportSecurity would also work , though I have also read that by completely disabling it can jeopardize the app review.

[ have found that by simply enumerating your domains I am trying to connect to your NSExceptionDomains dict it fixes your problem, even when by leaving NSExceptionAllowsInsecureHTTPLoads set to true.

I hope this helps you in resolving your issue.

9 7 4
38,600 points

Related questions

0 votes
1 answer 7 views
Problem: an SSL error has occurred and a secure connection to the server cannot be made Since I upgraded my existing project with iOS 9, Any help will be appreciated…!
asked Feb 25 Umar Ahmad 4.1k points
0 votes
1 answer 191 views
Problem : I can push by clone project using ssh but it is not working for me getting following error server certificate verification failed. cafile: /etc/ssl/certs/ca-certificates.crt crlfile: none
asked Nov 12, 2019 peterlaw 6.9k points
0 votes
1 answer 146 views
Problem : I have recently installed a website on my local machine using IIS 7 successfully. But when I tried to deploy it on the live server, I got a following error: "The page cannot be displayed because an internal server error has occurred" Nothing else. Using a same IIS 7 on live and also set to have the Detailed errors in Error Pages module, but still getting a same. What can be the reason?
asked Jan 28, 2020 jwilliam 3.9k points
0 votes
1 answer 65 views
Problem : I guess Chrome have released an update over the past week. And this update has caused at least 100 of our internal applications to throw the exception shown below. The solutions I have found over the Internet, talk about updating the ... there anyone who is aware of a similar fix in Chrome? Error Server has a weak ephemeral Diffie-Hellman public key ERR_SSL_WEAK_SERVER_EPHEMERAL_DH_KEY
asked Nov 25, 2019 alecxe 7.5k points
0 votes
1 answer 2 views
Problem: I use the browser Firefox, and sometimes, on certain web pages, the SSL icon says "Some parts of this page are not secure, such as images." What, exactly, counts as an insecure element? Thanks!
asked Apr 2 ummesalma 24.5k points
0 votes
1 answer 5 views
Problem: I need assistance in resolving this problem in Safari cannot open the page because it could not establish a secure connection to the server?
asked 6 days ago tuhin1 48.4k points
0 votes
1 answer 208 views
Problem : When I installed the final certificate I got the following error: keytool error: java.lang.Exception: Failed to establish chain from reply
asked Oct 23, 2019 peterlaw 6.9k points
0 votes
1 answer 5 views
Problem: I'm having problems during my learning as I mentioned in my question above, I try to find on web search but I can't get proper information, can you help me to continue my project?
asked Mar 21 shamimkhan 15.1k points
0 votes
2 answers 347 views
Problem : I am trying to consume a RESTful service from url https://someurl.com. But I am getting the following error: java security cert certpathvalidatorexception certificate chaining error
asked Oct 23, 2019 peterlaw 6.9k points