https icon indicating copy to clipboard operation
https copied to clipboard

Trust anchor for certification path not found

Open mariodiciccio opened this issue 6 years ago • 5 comments

Hi, i have a problem on nativescript-https 1.0.1.

I installed plugin with tns plugin add nativescript-https but when launch the app, his result is:

nativescript-https > Disabled SSL pinning
JS: Https.request error javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.

The code is:

  Https.disableSSLPinning();
  Https.request({
    url: 'https://dominio.com:6943/rest/api/',
    method: 'GET',
    headers: {
      'content-type': 'application/json'
    },
}).then(function(response) {
    console.log('Https.request response', response)
}).catch(function(error) {
    console.error('Https.request error', error)
})

Why? Any idea?

mariodiciccio avatar Jan 04 '19 13:01 mariodiciccio

are you using self-signed certificates? the certifcate is valid? if no.., it can be your problem, this plugin is not offering nothing to bypass ssl validation errors due invalid certificates.

nmocruz avatar Jan 09 '20 14:01 nmocruz

I have the same problem, the certificate is valid. Using HTTPer work correctly. Any idea?

alessandraferrua avatar Jun 16 '20 15:06 alessandraferrua

any news about it?

luiguild avatar Sep 16 '20 19:09 luiguild

got this very same issue, certifcate is valid and is working on web, but not on mobile. any workaround?

gonzalesgm-git avatar Oct 27 '23 11:10 gonzalesgm-git

These kind of errors usually come from misconfigured servers (like missing chain certs)

There are a few tools that can validate your config, hopefully this one does the trick https://whatsmychaincert.com/

edusperoni avatar Oct 27 '23 12:10 edusperoni