Android Question ResponseError. Reason: javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path...

pojeck

Member
Hi,
I developed an applicaton and it was working fine.
But last 10 days it's not working anymore
I'm getting this error for old android devices ( s3mini 4.1.2 and Samsung Galaxy J2 Android 5.1 (SDK 22) )
ResponseError. Reason: javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found., Response:

MY CODE:
Sub Lokasyon_Click
    Dim j As HttpJob
    j.Initialize("joblokasyon", Me)
    j.GetRequest.Timeout = 5000
    j.Download("https://ezanvaktim.com/ezan/mobile/lite/status.php")

    Wait For (j) JobDone(j As HttpJob)
    If j.Success Then
        Log (j.GetString)
        StartActivity(Lokasyon)
    Else
        If PanelVakitler.Visible = False Then
            PanelNoInternet.Visible = True
        End If
        ToastMessageShow ("Konum Ayarlarını Yapabilmeniz için İnternete Bağlı Olmalısınız.",True)
    End If
    j.Release
End Sub


How can i solve this problem
 

drgottjr

Well-Known Member
Licensed User
you may have to try a compiler option. see the attached. there is an issue with the server's certificate (it could be issued by letsencrypt or it could actually be invalid for some reason.) the owner of the server has to deal with it. if the certificate is issued by letsencrypt, this is a known android issue. not much you can do about it except use the compiler option. note: if your app is on play, google may question you why you are bypassing https.
 

Attachments

  • accept.png
    accept.png
    14.5 KB · Views: 53
Upvote 0

pojeck

Member
you may have to try a compiler option. see the attached. there is an issue with the server's certificate (it could be issued by letsencrypt or it could actually be invalid for some reason.) the owner of the server has to deal with it. if the certificate is issued by letsencrypt, this is a known android issue. not much you can do about it except use the compiler option. note: if your app is on play, google may question you why you are bypassing https.
Hi drgottjr, first of thank you so much for useful answer.
I talked with my hosting company and as you said he said the old android machines are can not get the new letsencrypt certificate to their system. Is it true?


1634547533662.png

I tried your solution and it's really worked. I just changed Conditional Symbols like this and it's worked. Thank you so much.
i uploaded my project (updated to new pakage) to google play like this, lets see what happens :)

Thank you so much again.
Have a good day.
 
Upvote 0
Top