Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Messages & Read Receipts Repeating Infinitely #5690

Closed
lanerussell opened this issue Apr 4, 2022 · 7 comments
Closed

Messages & Read Receipts Repeating Infinitely #5690

lanerussell opened this issue Apr 4, 2022 · 7 comments
Labels
A-Read-Receipts A-Timeline O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect Something isn't working: bugs, crashes, hangs and other reported problems X-Needs-Investigation

Comments

@lanerussell
Copy link

Steps to reproduce

  1. Where are you starting? What can you see?
    • Open app
    • Open bugged chat
    • Scroll back through message history
    • See duplicate messages and read receipts

You can see the "Encryption Enabled" message appears multiple times. This is the same for the few messages in the chat, and will repeat infinitely if I keep scrolling.

Screenshots

screenshot

screenshot2

Outcome

What did you expect?

Only 1 copy of each message should appear, only 1 read receipt per user.

What happened instead?

Duplicates of both appear.

Your phone model

Pixel 3

Operating system version

Android 12

Application version and app store

1.44 olm 3.2.10 Play Store

Homeserver

matrix-synapse-py3/unknown,now 1.49.2+bionic1

Will you send logs?

Yes

@lanerussell lanerussell added the T-Defect Something isn't working: bugs, crashes, hangs and other reported problems label Apr 4, 2022
@ganfra
Copy link
Member

ganfra commented Apr 6, 2022

Have you tried upgrading your app to the latest version?

@lanerussell
Copy link
Author

My app has updated to 1.4.8 since this issue was opened, and the issue persists.

@ericdecanini
Copy link
Contributor

I am unable to reproduce this myself but I would like to push further investigation into this. @lanerussell if you could give us some more context around this, i.e. if you see this in any other rooms, if it only happens in encrypted rooms, anything you might think might be causing this bug and if you are able to reproduce this by creating a new room (and thus, the steps in doing so) then that would help us a lot!

@ericdecanini ericdecanini added S-Major Severely degrades major functionality or product features, with no satisfactory workaround O-Uncommon Most users are unlikely to come across this or unexpected workflow X-Needs-Investigation labels Apr 11, 2022
@lanerussell
Copy link
Author

Sure thing. This is the only room I'm seeing this in. This is one of many of my rooms (encrypted and unencrypted) I upgraded to room version 8 around August 2021. I haven't been able to reproduce this bug by creating new rooms. It's interesting that the issue persists after removing the app and setting it back up from scratch.

I'll also include a screenshot from element-web which shows some additional older messages that don't appear on android. Web also shows the link to the old version of the room (which is empty at this point due to homeserver retention policy:

retention:
  enabled: true

  default_policy:
    min_lifetime: 1d
    max_lifetime: 90d

  allowed_lifetime_min: 1d
  allowed_lifetime_max: 90d

  purge_jobs:
    - longest_max_lifetime: 3d
      interval: 1h
    - shortest_max_lifetime: 3d
      interval: 1d
Element Web Screenshot

1

@mirenbz
Copy link

mirenbz commented Jun 9, 2022

This is happening to me as well. Only in the Android app; desktop and web look fine. Not in all rooms either: one v4, one v5 and one v6, but not another v4 room 🤷🏼

@JayFoxRox
Copy link

JayFoxRox commented Jun 28, 2022

(The following is written purely from a users perspective; "events" refers to visible items/text in the message window; it does not necessarily mean "internal matrix events" or anything of that sort. There was no code inspection, sniffing, logging or similar on my part. There's no technical background here, just observations)


I'm also affected on 1.4.20, installed through F-Droid.

I think I know why this problem exists though. The problematic chat in my case is on hackint IRC https://hackint.org/transport/matrix (which is a public server, so I guess you can use some of their channel to test this; I strongly assume this is reproducible, although I didn't try it)
Their retention policy is to only send you messages up until 2 minutes ago since join.

The web client shows "You can't see earlier messages" (tagline: "You don't have permission to view messages from before you joined.") when scrolling up.
The android client, however, tries to loads non-existing messages as soon as I scroll up.

Because there are no earlier messages than what's already downloaded, it keeps adding the same handful of messages. Each time a block of messages is loaded, the "Seen by" counters also increment.

The timeline looks unordered / skewed as a result.

Interestingly, the android client loads messages even further ago than 2 minutes (for whatever reason).
On the web version I only see events from 26th-28th of June (today).
On the Android version I see more events (although exclusively join/leave messages, as there wasn't any chat since I joined) this pattern repeating (read from bottom to top, as if this was the message window):

  • [Swirl, which will load events from the 28th June again]
  • April 6
  • April 7
  • June 26
  • June 27
  • June 28 [second repeat]
  • April 6
  • April 7
  • June 26
  • June 27
  • June 28 [first repeat]
  • April 6
  • April 7
  • June 26
  • June 27
  • June 28 [newest message]

So I believe this happens because the android client does not respect the boundary / "no more earlier messages".
Each time it loads the same message again, you also seem to get the read receipt again (which also counts for all clones of said message).

Furthermore, the retention for join/leave messages appears to be broken (likely due to the member list being reconstructed from join/leave messages, so they are replayed? - the web client does not show this though; the android version does)


I'm also on another bridged libera.chat IRC channel where the web version shows "You can't see earlier messages", but the android versions swirls infinitely long, never finishing to load any events (which is also a bug in itself, as there shouldn't be infinitely long swirls). The event duplication does not happen there.

@jmartinesp
Copy link
Member

This should have been fixed by #6318, please re-open the issue otherwise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Read-Receipts A-Timeline O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect Something isn't working: bugs, crashes, hangs and other reported problems X-Needs-Investigation
Projects
None yet
Development

No branches or pull requests

6 participants