twilio / conversations-ios

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

Crash +[TCHHelpers mainQueueOrQueue:], file TCHHelpers.mm, line 268 #21

Closed khanhson47 closed 2 years ago

khanhson47 commented 2 years ago

Hi,

I'm facing crashes when app tries to get conversation last message

func getLastMessages(withCount count: UInt, completion: @escaping TCHMessagesCompletion)

after calling below function to get Twilio client

class func  TwilioConversationsClient.conversationsClient(withToken token: String, properties: TwilioConversationsClientProperties?, delegate: TwilioConversationsClientDelegate?, completion: @escaping TCHTwilioClientCompletion)

Screen Shot 2022-03-22 at 18 14 26

The log wrote Assertion failed: (queue), function +[TCHHelpers mainQueueOrQueue:], file TCHHelpers.mm, line 268., but I tried to run it on many kinds of thread it stills crash.

What this crash is about? Is it said that we must run on specific thread? Do you know any solution for this?

Thanks

Gray-Wind commented 2 years ago

Hello!

What is the version of the SDK you use?

khanhson47 commented 2 years ago

Hi Gray,

Gray-Wind commented 2 years ago

First of all, remove TwilioAccessManager dependency, it is deprecated. All the token lifecycle management is included in the Conversations SDK.

Second, thank you, we will take a deeper look into the issue, it should not happen ever. Could you in the meanwhile check the issue on 2.2.1?

khanhson47 commented 2 years ago
Could you in the meanwhile check the issue on 2.2.1?

It still crash on 2.2.1

Gray-Wind commented 2 years ago

Thank you for the report! I would like to ask you to create a support ticket with logs of the reproduction (set please trace level), so I can understand what is going on. Add a link to the GitHub issue, so it will come back to me faster.

iain-reid commented 2 years ago

I'm experiencing this crash regularly on 2.2.1 - also when calling func getLastMessages(withCount count: UInt, completion: @escaping TCHMessagesCompletion)

I can open a support ticket also - but at the moment this issue is consistent enough that we are concerned about whether our app can launch without a fix (or resolution of some kind)

Are there any updates on this?

Gray-Wind commented 2 years ago

New version will be released soon.

Gray-Wind commented 2 years ago

Hello, version 2.2.2 with the fix has been released. Thank you for the report!