twilio / voice-quickstart-android

Quickstart app for the Voice Android SDK
https://www.twilio.com/docs/api/voice-sdk/android/getting-started
MIT License
189 stars 141 forks source link

Registration failed error: 31301 #160

Closed imran-samed closed 6 years ago

imran-samed commented 6 years ago

this error is shown always

java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.

i am not able to register using twillio voice sdk

kbagchiGWC commented 6 years ago

@imran-samed

What version of the SDK are you using? Can you please provide logs?

imran-samed commented 6 years ago

compile 'com.twilio:voice-android:2.0.4' @kbagchiGWC

imran-samed commented 6 years ago

04-04 10:18:39.131 24110-24110/com.tamaaas E/VoiceActivity: Registration Error: 31301, Registration failed 04-04 10:18:41.578 24110-24110/com.tamaaas E/VoiceActivity: Connected: null -- CA30cbb82d19a3ba7035e891d8435022d5 -- null --CONNECTED 04-04 10:18:42.736 24110-24330/com.tamaaas V/FA: Inactivity, disconnecting from the service 04-04 10:18:51.323 24110-24363/com.tamaaas E/EventPublisher: javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found. 04-04 10:18:51.323 24110-24363/com.tamaaas E/EventPublisher: javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found. 04-04 10:19:00.575 24110-24507/com.tamaaas D/TWC: TNWebsocket: 548023731280 | 04/04/10:19:00.575 | DEBUG | 7 | TNWebsocket | Receive message 95 bytes 04-04 10:19:00.576 24110-24507/com.tamaaas D/TWC: TNTwilsockClient: 548023731280 | 04/04/10:19:00.576 | DEBUG | 1 | TNTwilsockClient | onMessageReceived (96) TWILSOCK V3.0 76 {"method":"ping","id":"TMb4ac8821e97c47969ba8ea8308591b17","payload_size":0} 04-04 10:19:00.576 24110-24507/com.tamaaas I/TWC: TNTwilsockClient: 548023731280 | 04/04/10:19:00.576 | INFO | 1 | TNTwilsockClient | onMessageReceived, method = 2, id = TMb4ac8821e97c47969ba8ea8308591b17 04-04 10:19:00.576 24110-24507/com.tamaaas D/TWC: TNTwilsockClientImpl: 548023731280 | 04/04/10:19:00.576 | DEBUG | 3 | TNTwilsockClientImpl | proceedPingMessage TMb4ac8821e97c47969ba8ea8308591b17 04-04 10:19:00.576 24110-24490/com.tamaaas I/TWC: TNTwilsockClient: 548079494224 | 04/04/10:19:00.576 | INFO | 1 | TNTwilsockClient | sendSuccessReplyImpl >> Connected 04-04 10:19:00.576 24110-24490/com.tamaaas D/TWC: TNTwilsockClientImpl: 548079494224 | 04/04/10:19:00.576 | DEBUG | 3 | TNTwilsockClientImpl | sendSuccessReply 04-04 10:19:00.576 24110-24490/com.tamaaas I/TWC: TNTwilsockClientImpl: 548079494224 | 04/04/10:19:00.576 | INFO | 3 | TNTwilsockClientImpl | sendSuccessReply, id = TMb4ac8821e97c47969ba8ea8308591b17 04-04 10:19:00.576 24110-24509/com.tamaaas D/TWC: TNWebsocket: 548021642320 | 04/04/10:19:00.576 | DEBUG | 7 | TNWebsocket | Sending frame via websocket (116) TWILSOCK V3.0 96 {"id":"TMb4ac8821e97c47969ba8ea8308591b17","method":"reply","status":{"code":200,"status":"ok"}} 04-04 10:19:01.285 24110-24458/com.tamaaas E/EventPublisher: javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found. 04-04 10:19:01.285 24110-24458/com.tamaaas E/EventPublisher: javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found. 04-04 10:19:11.244 24110-25130/com.tamaaas E/EventPublisher: javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found. 04-04 10:19:11.244 24110-25130/com.tamaaas E/EventPublisher: javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found. 04-04 10:19:19.026 24110-24110/com.tamaaas E/VoiceActivity: Disconnected: null -- CA30cbb82d19a3ba7035e891d8435022d5 -- null --DISCONNECTED 04-04 10:19:19.603 24110-25131/com.tamaaas E/EventPublisher: javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found. 04-04 10:19:19.603 24110-25131/com.tamaaas E/EventPublisher: javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found. 04-04 10:19:31.087 24110-24507/com.tamaaas D/TWC: TNWebsocket: 548023731280 | 04/04/10:19:31.087 | DEBUG | 7 | TNWebsocket | Receive message 95 bytes 04-04 10:19:31.087 24110-24507/com.tamaaas D/TWC: TNTwilsockClient: 548023731280 | 04/04/10:19:31.087 | DEBUG | 1 | TNTwilsockClient | onMessageReceived (96) TWILSOCK V3.0 76 {"method":"ping","id":"TMa625b464009a450684563b04f514ba50","payload_size":0} 04-04 10:19:31.087 24110-24507/com.tamaaas I/TWC: TNTwilsockClient: 548023731280 | 04/04/10:19:31.087 | INFO | 1 | TNTwilsockClient | onMessageReceived, method = 2, id = TMa625b464009a450684563b04f514ba50 04-04 10:19:31.087 24110-24507/com.tamaaas D/TWC: TNTwilsockClientImpl: 548023731280 | 04/04/10:19:31.087 | DEBUG | 3 | TNTwilsockClientImpl | proceedPingMessage TMa625b464009a450684563b04f514ba50 04-04 10:19:31.087 24110-24490/com.tamaaas I/TWC: TNTwilsockClient: 548079494224 | 04/04/10:19:31.087 | INFO | 1 | TNTwilsockClient | sendSuccessReplyImpl >> Connected 04-04 10:19:31.087 24110-24490/com.tamaaas D/TWC: TNTwilsockClientImpl: 548079494224 | 04/04/10:19:31.087 | DEBUG | 3 | TNTwilsockClientImpl | sendSuccessReply 04-04 10:19:31.087 24110-24490/com.tamaaas I/TWC: TNTwilsockClientImpl: 548079494224 | 04/04/10:19:31.087 | INFO | 3 | TNTwilsockClientImpl | sendSuccessReply, id = TMa625b464009a450684563b04f514ba50 04-04 10:19:31.088 24110-24509/com.tamaaas D/TWC: TNWebsocket: 548021642320 | 04/04/10:19:31.088 | DEBUG | 7 | TNWebsocket | Sending frame via websocket (116) TWILSOCK V3.0 96 {"id":"TMa625b464009a450684563b04f514ba50","method":"reply","status":{"code":200,"status":"ok"}}

idelgado commented 6 years ago

Hi. Please open a support ticket and provide the ticket number here. We will follow up there. https://www.twilio.com/console/support/tickets/create

idelgado commented 6 years ago

Closing due to inactivity. Please re-open if you have additional information.

imran-samed commented 6 years ago

@idelgado When i'm trying QuickStart code, i'm not getting any kind of error, its working absolutely fine. But when i'm trying to implement that in my application , it gives

java.security.cert.CertPathValidatorException: Trust anchor for certification path not found. error

i can't understand why, if there is any issue with my server then how its working fine in QuickStart Please help, I'm stuck in this from so long.

idelgado commented 6 years ago

@imran-samed we have identified a compatibility issue with Chat or Sync and Voice that can cause this issue. We are working on a fix that requires a fix in the Voice SDK. It looks like this may be the cause of your problem given the logs you've provided.

idelgado commented 6 years ago

Can you confirm which version of Programmable Chat or Sync you are using?

imran-samed commented 6 years ago

its Voice calling

and This is twilio log after registration failed

E/TWC: TNTwilsockClientImpl: 547074245712 | 04/18/14:32:20.491 | CRITICAL | 3 | TNTwilsockClientImpl | Message type list is empty A/TWC: TNNotificationClient: 547074245712 | 04/18/14:32:20.491 | FATAL | 12 | TNNotificationClient | Fatal error while registering twilsock connection: 9: Message type list is empty, public error code: 0

while debugging i'm getting this error

java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.

its voice-sdk compile 'com.twilio:voice-android:2.0.5'

idelgado commented 6 years ago

@imran-samed we have released 2.0.6 which should address your issue. Please try this version.

imran-samed commented 6 years ago

@idelgado Thanks Sir, this solved my issue.

hvlong commented 6 years ago

Sorry, I installed twilio voice version 2.0.6 but I still get error '31301, Registration failed'. I spend a lot of time to research and fix it, But It is't working for me. Please help me fix this issue. Thanks.

kbagchiGWC commented 6 years ago

Hi @hvlong

Can you share logs?

kbagchiGWC commented 6 years ago

@hvlong Please set the loglevel as the following before collecting logs.

Voice.setLogLevel(LogLevel.DEBUG);
Voice.setModuleLogLevel(LogModule.PJSIP, LogLevel.ALL);
hvlong commented 6 years ago

@kbagchiGWC Thank you for responding, I resolved this error, My sever configured incorrect key, Sorry for this mistake