I am getting unusual exception suddenly after base url got changed from http:// to https://. Every time I hit API with https:// I can see log flashing "HTTP FAILED: javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found." this error.
I thought retrofit auto imports the certificate most times (as I have tried connecting https:// many times using retrofit. I didn't faced this issue earlier)
Your server may use an auto-signed certificate for https.
If this is true, you can avoid the exception by disabling retrofit to check the certificate.
Please, read this:
Disable SSL certificate check in retrofit library
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With