twilio / voice-quickstart-android

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

Registration Error 31301 #568

Closed JoshanTandukar closed 5 months ago

JoshanTandukar commented 11 months ago

Registration Error 31301

During the process of registration using voice token and FCM token the method is returning the above issue.

Steps to Reproduce

  1. Connect to high latency network
  2. Run the registration process with process voice token and FCM token if needed loop it.
  3. At one particular moment when the network is very intermittent and volatile will produce this issue.

Note : If needed customize your network with low bandwidth or/and use VPN

Code

Voice.register(accessToken, Voice.RegistrationChannel.FCM, token, listener)

Expected Behavior

Network error or proper error

Actual Behavior

I/AccessTokenParser(409): JWT token HEADER: {"alg":"HS256","cty":"twilio-fpa;v=1","typ":"JWT"}
E/EventPublisher(409):  java.net.SocketTimeoutException: timeout
E/EventPublisher(409): java.net.SocketTimeoutException: timeout
D/EventPublisher(409): Start publishing events to : https://eventgw.twilio.com/v4/EndpointEvents
D/EventPublisher(409): {"name":"registration-error","group":"registration","timestamp":"2023-09-05T07:48:32.388Z","level":"ERROR","private":false,"payload_type":"application\/json","publisher":"twilio-voice-android","publisher_metadata":{"client_address":"FE80::5E46:1F58:6654:B3BE","os_name":"android","os_version":"9","device_model":"SM-N950F","device_vendor":"samsung","device_type":"SM-N950F","cpu_architecture":"arm64-v8a"},"payload":{"timestamp_ms":1693900112383,"sdk_version":"6.1.2","platform":"android","code":31301,"message":"Registration failed : timeout","request_sid":"RQ29f5d9b497a1d920210fc076a3436eea"}}
D/TwilioVoice(409): onError: 31301  Registration failed

Reproduces How Often

Mostly of the time, EU

Logs

I/AccessTokenParser(409): JWT token HEADER: {"alg":"HS256","cty":"twilio-fpa;v=1","typ":"JWT"}
E/EventPublisher(409):  java.net.SocketTimeoutException: timeout
E/EventPublisher(409): java.net.SocketTimeoutException: timeout
D/EventPublisher(409): Start publishing events to : https://eventgw.twilio.com/v4/EndpointEvents
D/EventPublisher(409): {"name":"registration-error","group":"registration","timestamp":"2023-09-05T07:48:32.388Z","level":"ERROR","private":false,"payload_type":"application\/json","publisher":"twilio-voice-android","publisher_metadata":{"client_address":"FE80::5E46:1F58:6654:B3BE","os_name":"android","os_version":"9","device_model":"SM-N950F","device_vendor":"samsung","device_type":"SM-N950F","cpu_architecture":"arm64-v8a"},"payload":{"timestamp_ms":1693900112383,"sdk_version":"6.1.2","platform":"android","code":31301,"message":"Registration failed : timeout","request_sid":"RQ29f5d9b497a1d920210fc076a3436eea"}}
D/TwilioVoice(409): onError: 31301  Registration failed

Versions

All relevant version information for the issue.

Voice Android SDK

"sdk_version":"6.1.2"

Device Info

"os_name":"android","os_version":"9","device_model":"SM-N950F","device_vendor":"samsung","device_type":"SM-N950F","cpu_architecture":"arm64-v8a"

JoshanTandukar commented 11 months ago

Requiring a proper resolution and also has followed the registration guide as well.

https://github.com/twilio/voice-quickstart-android/blob/master/Docs/access-token.md

afalls-twilio commented 7 months ago

@JoshanTandukar this is occurring because it is timing out. How bad is the latency?

afalls-twilio commented 5 months ago

closing due to inactivity