Hello @everyone. I am in the beginning part of a debug effort and wanted to post in case anyone here has also seen and solved this issue.
Summary:
I am working on an app for a client that requires me to reach out to their server to get content. Their server is secured (https) with an SSL cert.
In short, while I can run all the tests and interactions I want from my Windows desktop using the app in the simulator, once I run it on my Android device I get this error:
ERROR: network: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.: https://www.fanpoweredmusic.ne t/api/public/v1/token (javax.net.ssl.SSLHandshakeException)
This is the code that causes the problem:
https://github.com/roaminggamer/RG_FreeStuff/raw/master/ForumsImages/2018/certException.zip
local function listener(event) for(k,v) in pairs(event) do print(k,v) end end local request = { timeout = 30, headers = { Authorization = "Basic fakeToken"} } -- FYI: Fails for real token too. local urlString = 'https://www.fanpoweredmusic.net/api/public/v1/token' network.request( urlString, "POST", listener, request )
Steps Taken So Far:
- I have searched this site and found a similar post but with no resolution:
https://forums.coronalabs.com/topic/62706-java-error-trust-anchor-for-certification-path-not-found/
- I did follow the advice in the above thread, and it turns out there may be a problem with the server. However, I’m pressing forward with the debugging till I hear back from the client’s server guy.
Possible Issues:
The server is not sending the required intermediate certificate.
Outdated Protocol Support
- Other reading on the WWW, but nothing so far.
Other Ideas:
I’m going to build and test on my iOS device when time permits (this is a slow path for me), but I expect the problem to still be present.
What I’m Looking For:
Basically, I’m hoping some guru out there has seen and solved this, but all insights are welcome.
I’ll post back when I resolve this and put some details on the actual resolution.