twilio / conversations-ios

SPM releases
https://www.twilio.com/docs/conversations/ios/changelog
10 stars 5 forks source link

Bug: TwilioConversationsClient crashes on Initialize a new conversations client instance with an expired jwt token. #60

Open haithngn opened 1 week ago

haithngn commented 1 week ago

SDK version

4.0.3

Device model

iPhone/Any Model

OS version

Any OS version

Issue description

We have faced this crash on the Twilio SDK, we tried too many ways to find the rootcause for a long time because the crash log doesn't help.

Now we found one reason is the JWT token which is passed into method conversationsClient was expired and caused the crash.

TwilioConversationsClient.conversationsClient(withToken: acessToken, properties: properties, delegate: 

We can avoid the crash by pre-check the token expiration before invoking the method.

IMHO, the client should throw an error/exception via the delegate method or completion block args instead.

cc: @berkus