Incorrect syncmanager event flow when sending a image/video

Hello,

We’re using SendBirdSDK version 3.0.218 and SendBirdSyncManager 1.1.36. The problem is on retry sending image/video messages. The SBSMMessageCollectionDelegate event flow is not correct for video/photos, but it works as expected for text messages. We’re receiving the following events:

Text message:

2021-03-12 17:16:23.521> [CHAT] Insert 1 pending messages
2021-03-12 17:16:25.278> [CHAT] Remove 1 pending messages
2021-03-12 17:16:25.281> [CHAT] Insert 1 failed messages. Reason 0
2021-03-12 17:16:25.289> [CHAT] Update 1 failed messages. Reason 1
---- User taps to resend a message ----
2021-03-12 17:17:20.797> [CHAT] Remove 1 failed messages. Reason 2
2021-03-12 17:17:20.804> [CHAT] Insert 1 succeeded messages

Image/Video:

2021-03-12 17:34:40.961> [CHAT] Insert 1 pending messages
2021-03-12 17:35:41.090> [CHAT] Remove 1 pending messages
2021-03-12 17:35:41.092> [CHAT] Insert 1 failed messages. Reason 0
---- User taps to resend this message ----
2021-03-12 17:38:02.445> [CHAT] Update image/video progress: 0.012652399382284286
2021-03-12 17:38:02.757> [CHAT] Update image/video progress: 0.40487678023309714
2021-03-12 17:38:04.306> [CHAT] Update image/video progress: 0.5060959752913714
2021-03-12 17:38:05.007> [CHAT] Update image/video progress: 0.6073151703496457
2021-03-12 17:38:06.004> [CHAT] Update image/video progress: 0.70853436540792
2021-03-12 17:38:06.934> [CHAT] Update image/video progress: 0.8097535604661943
2021-03-12 17:38:07.930> [CHAT] Update image/video progress: 0.9109727555244685
2021-03-12 17:38:09.124> [CHAT] Update image/video progress: 1.0
2021-03-12 17:38:16.788> [CHAT] Insert 1 succeeded messages

The image/video is not removed from failed messages. Also, when the upload fails, the reason is 0 (SBSMFailedMessageEventActionReasonNone).

The easiest way to reproduce:

  • Open the chat
  • Turn the internet off to force an error
  • Send a message → the message will fails
  • Turn the internet on and retry

Do you have any ideia?

Thank you,
Paulo

@PauloFonseca Thanks for report! I will look into this as soon as possible. Thanks you for your patient.

1 Like

I think I found a cause, however one of my colleague is out of town and I cannot release a patch without code review. He will be back around 1.5 week from now. I will release the patch once he comes back. Thank you!

1 Like

@PauloFonseca new version has been released v1.1.37 would you wanna try that version and see if that fixes your issue?

Great! I’ll try and let you know. Thank you

Hey @Woo, It’s working now. Thank you

@PauloFonseca good to hear that :slight_smile: