iOS SSL Error --- HTTP load failed (kCFStreamErrorDomainSSL, -9801)


#1

I am creating an ionic 2 app that uses an api

We have a test PC running windows application that has api i connect to
it has a self-signed certificate.

doing all the normal

findAll(lastUpdated: Date) {
  let headers = this.auth.getHeaders();
  let params = new URLSearchParams();
  params.set('lastUpdated', lastUpdated.toISOString())
  let options = {
    headers: headers,
    search: params
  };
  console.log('url ' + this.getAllURL);
  return this.http.get(this.getAllURL, options)
    .timeout(SERVER_TIMEOUT, new Error('update timedout!'))
    .map(res => {
    // If request fails, throw an Error that will be caught 
       if ( res.status !== 200) {
         throw new Error( this.getAllURL + ' Failed with status ' + res.status );
       }
       return res.json();  
  });
}

However still get
2016-11-01 15:49:41.526971 inVentryApp[6620:386308] [] nw_coretls_read_one_record tls_handshake_process: [-9801]
2016-11-01 15:49:41.693770 inVentryApp[6620:386308] [] nw_coretls_read_one_record tls_handshake_process: [-9801]
2016-11-01 15:49:41.694 inVentryApp[6620:386274] NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9801)

Any help would be appreciated :slight_smile:


#2

Did you ever solve this? Experiencing something very close. (-9802)