twilio / conversations-ios

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

Intermittent: Completion handler not called in getTemporaryContentUrlsForAttachedMedia #57

Open kuchmiyalex opened 4 months ago

kuchmiyalex commented 4 months ago

SDK version

4.0.3

Device model

iPhone 14 Pro Max

OS version

17.4

Issue description

Description

Problem:

The getTemporaryContentUrlsForAttachedMedia function in the TwilioConversationsClient library intermittently fails to call the completion handler as expected. This issue persists even after attempting to retry the function. It seems that only reconnecting the TwilioConversationsClient resolves this issue.

Function Signature:

- (nullable TCHCancellationToken *)getTemporaryContentUrlsForAttachedMediaWithCompletion:(nonnull TCHMediaSidsCompletion)completion NS_SWIFT_NAME(getTemporaryContentUrlsForAttachedMedia(completion:));

Expected Behavior:

The completion handler should be called upon the successful execution of the getTemporaryContentUrlsForAttachedMedia function, providing the necessary temporary content URLs for attached media.

Actual Behavior:

The completion handler is not being called intermittently, leaving the user without the expected temporary content URLs. Additionally, no error is received, which is part of the TCHMediaSidsCompletion definition. This intermittent issue results in infinite loading of attachments.

Debug Logs:

Debug logs are unavailable due to the rare scenario of this issue.

berkus commented 3 months ago

Thanks, will take a look at this.

Are you sure the client itself is not shutdown/disconnected while you're waiting for this response? I believe the callbacks might get dropped and not invoked if the client was shut down.

kuchmiyalex commented 3 months ago

@berkus thank you. Yes, I'm sure that the client is still connected state and even responds to fetching messages in the same conversation.

kuchmiyalex commented 2 months ago

@berkus hey, is there any update regarding this issue?

berkus commented 2 months ago

@kuchmiyalex not really, I'm not in Twilio anymore, but @AlejandroOrozco should be able to assist.