Trust anchor for certification path not found when using API - android

I’m making a news app and I’m using newsapi.org to get the news. I tried my app on the emulator and on one device and it works correctly but then I tried it on another device and I get this error: Caused by: java.security.cert.CertificateException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found. Does anyone know why this might be happening?
Thanks in advance!

Related

Why cant I deploy on an App with certification on an lower Api version?

I'm trying to deploy my App on another phone. I already installed the cert on the new phone and I'm still facing this problem.
java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
The first phone had android 9 and the new one has android 6.

Problem with SSL certificate on Android 4.4: Trust anchor for certification path not found

I do know why but my app on Android 4.4 (HTC 626) couldn't connect to my site. The problem occurs and from the app using URLConnection and OkHttpClient and when I try to open a site in Chrome ("Connection is not private").
javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
Certificate issued by Sectigo. SSL Checker doesn't show problems with a certificate on the server. The problem does not occur on Android 9 (Samsung A50). I suppose to try another CA. Any ideas?
The problem was solved by replacing the Comodo (Sectigo) Positive SL with the Thawte SSL123. It is not advertising. Both certificates were installed by one specialist, so I do not think there was wrong nginx configuration.

SSLHandshakeException while calling webservice through volley library

I am getting this exception
com.android.volley.NoConnectionError: javax.net.ssl.SSLHandshakeException:
java.security.cert.CertPathValidatorException: Trust anchor for certification
path not found.
from volley while accessing web service in some devices. I have searched a lot, but certificate of SSL is properly inserted in server side. Is there anything else to do in android side?
Thanks in advance.

Android app don't trust SSL certifcate but Chrome do

We have an internal CA server.
We have an Android app that should communicate via https with our webserver, and have generated the required certificates. When we connect to the server through our app, it fails with the current stacktrace:
Caused by: java.security.cert.CertificateException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
But when we browse the server through Android Chrome it works, and we get a green keylock. We have uploaded the certificate on the android device under settings. So it's listed under User certificates.
My question is: Do I need to do anything codewise? I figured that the app would look at the certificates located on the phone, and use this. The way Chrome seems to do. But some guides tell me that I manually have make a keystore and supply this to the SSLFactory (Link to guide). But on other pages it seems that this should work out of the box...
Can anyone point me in the right direction?

javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found on Android 2.2

I am getting this issue when i replace my url with https...my url with http working fine but with https it's crashed,i search internet but not find any solution
You are probably using a CA for your certificate which is not known as trusted in the very old version of Android you are trying. More details might be given if you provide your URL.

Categories

Resources