crisp-im / crisp-sdk-android

:package: Crisp Android SDK, add a chat in any Android app and communicate with your users.
https://docs.crisp.chat/guides/chatbox-sdks/android-sdk/
Other
56 stars 17 forks source link

Android messages are displayed in wrong order #130

Closed mauricedoepke closed 2 years ago

mauricedoepke commented 2 years ago

UPDATE: This issue occured in the simulator, but on my real device it is working fine.

sdk version: im.crisp:crisp-sdk:1.0.12 via: https://github.com/walterholohan/react-native-crisp-chat-sdk on: expo SDK 45

Screenshot 2022-08-13 at 18 33 39 Screenshot 2022-08-13 at 18 34 13

Compare the order of messages between the web version and the android one. The order in the webversion is right, but android is very weird. It first shows the messages sent from phone and then all the support answers. Not in the actual order they were sent.

Interestingly the same wrong order is shown on ios for messages sent from android: Screenshot 2022-08-13 at 18 40 57 Messages sent from ios however seem to be displayed in the right order even on all devices.

So something seems to be wrong with messages sent from android

Doc1faux commented 2 years ago

Hi @mauricedoepke and thank you for your feedback.

I tried to reproduce the issue you are facing with the Android SDK only (without the 3rd-party React Native bridge) but I struggle to reproducing it. What I have done is, having both the Android SDK opened and the Web dashboard, sending messages in both directions and messages are well ordered, even after relaunching the chat from the Android app and resetting the session if a tokenID is set.

Have you a reproductible case?

I could try to reproduce it with the React Native Bridge but given the bug you encountered, I doubt it is coming from here.

mauricedoepke commented 2 years ago

@Doc1faux As this happened in the emulator only, I suspect this was due to different time zones in the emulator and on the host computer where I opened the web version.