Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trust anchor for certification path not found. #119

Closed
canwushuang opened this issue May 15, 2024 · 3 comments
Closed

Trust anchor for certification path not found. #119

canwushuang opened this issue May 15, 2024 · 3 comments
Labels
rejected The issue is rejected. You can find more info in the comments. wontfix This will not be worked on

Comments

@canwushuang
Copy link

canwushuang commented May 15, 2024

Self-built server api error.

An error has been occurred during generation. See the error details below:

p2.b: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found. at z2.d.b(Unknown Source:69) at z2.d.f(Unknown Source:89) at z2.c.p(Unknown Source:12) at z8.a.g(Unknown Source:5) at p9.l0.run(Unknown Source:101) at android.os.Handler.handleCallback(Handler.java:966) at android.os.Handler.dispatchMessage(Handler.java:110) at android.os.Looper.loopOnce(Looper.java:205) at android.os.Looper.loop(Looper.java:293) at android.app.ActivityThread.loopProcess(ActivityThread.java:9934) at android.app.ActivityThread.main(ActivityThread.java:9923) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:586) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1240) Caused by: javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found. at com.android.org.conscrypt.SSLUtils.toSSLHandshakeException(SSLUtils.java:363) at com.android.org.conscrypt.ConscryptEngine.convertException(ConscryptEngine.java:1134) at com.android.org.conscrypt.ConscryptEngine.readPlaintextData(ConscryptEngine.java:1089) at com.android.org.conscrypt.ConscryptEngine.unwrap(ConscryptEngine.java:876) at com.android.org.conscrypt.ConscryptEngine.unwrap(ConscryptEngine.java:747) at com.android.org.conscrypt.ConscryptEngine.unwrap(ConscryptEngine.java:712) at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.processDataFromSocket(ConscryptEngineSocket.java:854) at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.access$100(ConscryptEngineSocket.java:727) at com.android.org.conscrypt.ConscryptEngineSocket.doHandshake(ConscryptEngineSocket.java:241) at com.android.org.conscrypt.ConscryptEngineSocket.startHandshake(ConscryptEngineSocket.java:220) at com.android.okhttp.internal.io.RealConnection.connectTls(RealConnection.java:196) at com.android.okhttp.internal.io.RealConnection.connectSocket(RealConnection.java:153) at com.android.okhttp.internal.io.RealConnection.connect(RealConnection.java:116) at com.android.okhttp.internal.http.StreamAllocation.findConnection(StreamAllocation.java:186) at com.android.okhttp.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:128) at com.android.okhttp.internal.http.StreamAllocation.newStream(StreamAllocation.java:97) at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:289) at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:232) at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:465) at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:131) at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:262) at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getOutputStream(DelegatingHttpsURLConnection.java:219) at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:30) at g7.d.c(Unknown Source:513) at f7.b.p(Unknown Source:58) at z8.a.g(Unknown Source:5) at p9.l0.run(Unknown Source:109) at q9.c.run(Unknown Source:280) at v9.i.run(Unknown Source:2) at v9.a.run(Unknown Source:91) Caused by: java.security.cert.CertificateException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found. at com.android.org.conscrypt.TrustManagerImpl.checkTrustedRecursive(TrustManagerImpl.java:656) at com.android.org.conscrypt.TrustManagerImpl.checkTrusted(TrustManagerImpl.java:505) at com.android.org.conscrypt.TrustManagerImpl.checkTrusted(TrustManagerImpl.java:425) at com.android.org.conscrypt.TrustManagerImpl.getTrustedChainForServer(TrustManagerImpl.java:353) at android.security.net.config.NetworkSecurityTrustManager.checkServerTrusted(NetworkSecurityTrustManager.java:94) at android.security.net.config.RootTrustManager.checkServerTrusted(RootTrustManager.java:90) at com.android.org.conscrypt.ConscryptEngineSocket$2.checkServerTrusted(ConscryptEngineSocket.java:163) at com.android.org.conscrypt.Platform.checkServerTrusted(Platform.java:255) at com.android.org.conscrypt.ConscryptEngine.verifyCertificateChain(ConscryptEngine.java:1638) at com.android.org.conscrypt.NativeCrypto.ENGINE_SSL_read_direct(Native Method) at com.android.org.conscrypt.NativeSsl.readDirectByteBuffer(NativeSsl.java:569) at com.android.org.conscrypt.ConscryptEngine.readPlaintextDataDirect(ConscryptEngine.java:1095) at com.android.org.conscrypt.ConscryptEngine.readPlaintextData(ConscryptEngine.java:1079) ... 27 more Caused by: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found. ... 40 more

java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
@AndraxDev
Copy link
Owner

With details provided by you I'm unable to ensure this problem is related to SpeakGPT but not to your server/phone configuration. Even if your server works with other clienst you need to ensure you have SSL (https) connection. Can you please provide more details:

Have you installed SSL certificate of your server on your phone?

Have you ever have SSL certificate?

Please note that the requirement of Google Play Store is to block cleartext (non-SSL) traffic and you need secure your connection even when working with local server.

Warning

if you will not provide information requested the issue will be closed as not planned.

@AndraxDev
Copy link
Owner

Its also be useful to provide instructions how you built your server and which technologies you've used so I can build a one and test it. Without this info I can't help you, sorry!

Also please note that I can not provide any warranty that SpeakGPT will work with your self-builded because I obviously don't have access to your code, server config and API endpoint. The note in readme like "supports third-party API" means that SpeakGPT can use base url (which) can be a local server. Thank you for undrestanding and willing your issue will be resolved as soon as possible!

@AndraxDev
Copy link
Owner

This issue has been closed because I received no feedback from you. You can reopen it anytime. Creating duplicated issues will not solve your problem faster. Duplicated issues will be deleted without further notice.

@AndraxDev AndraxDev added wontfix This will not be worked on rejected The issue is rejected. You can find more info in the comments. labels May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rejected The issue is rejected. You can find more info in the comments. wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants