simplex-chat / simplex-chat/simplex-chat
[Bug]: Messages syncing out of order in group chat.
Nobody has claimed this yet.
- Dominant language
- Haskell
- Stars
- 19.5k
- Forks
- 1.4k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 71
Description
Is there an existing issue for this?
- I have searched the existing issues
Platform
Android
OS version
Tablet: Android 11, Phone: Android 13
App version
6.4.3.1 (arm64-v8a)
Current Behavior
First, I appreciate your hard work on this application.
Now,
The exact bug is actually described in #4677 but it happens on android.
Basically I have a group chat with 2 of my devices I'm certain it's not causing the problem but I'll mention it anyway.
I've set up notifications on phone to be disabled unless app is running. Notifications on tablet always running.
If many messages are sent (Unsure how many, and I am sorry for that, but I estimate over 300, which can easily happen in long conversations)
It syncs correctly on tablet the messages are ALREADY there. I'm certain it's thanks to the notification server always running on background. Making messages appear on time.
On phone however, the messages are not already there and start slowly appearing one by one instead of already being there.
However they still appear in order.
After a certain number of messages however, it no longers shows the messages in correct chronological order and sort instead by user.
A user gets his messages all timed correctly, another user may get all messages sent at the time phone connected to SimpleX.
Expected Behavior
The messages sync correctly in chronological order.
(Ideally without being slow. But I'm not technical enough to propose an easy solution my bad)
Setting up notifications to always be on fixed the issue for me. However if I shut down (completely turn off the phone) the problem will re-occur.
It does not impact me as I make sure not to. But I think I'd have to mention it.
Steps To Reproduce
- Create a group chat with at least 3 users. (Can be alt devices)
- Set up a device, let's say Device A, to have notifications that only work if the app is running. Or completely turn off Device A ensuring notifications don't run in background.
- Use 2 other devices/users to send A LOT of messages. I'm unsure of the number but ~300 messages seems to guarantee the bug.
- Turn on Device A / get into Simplex, then the group chat to activate its notifications.
- The described bug will happen.
Relevant log output
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the behavior described in related issue #4677 and reproduce this issue on Android using the listed steps: disable background notifications, send about 300 group messages, then reconnect the device. Done means messages appear in chronological order rather than grouped by sender, including after the device was shut down.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, haskell
- Domain
- distributed-systems, mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 43/100