element-hq / element-android

A Matrix collaboration client for Android.
https://element.io/
GNU Affero General Public License v3.0
3.37k stars 722 forks source link

Authenticity of some encrypted messages inexplicably can't be guaranteed #8533

Open c-x-berger opened 1 year ago

c-x-berger commented 1 year ago

Steps to reproduce

I'm not sure how to properly reproduce this, since it seemed to just start happening (retroactively marking old messages with grey shields as I scrolled up as well).

  1. Open E2EE room
  2. Notice grey shield on seemingly random incoming messages
    • I haven't found a real pattern yet.
    • Messages from users on the same homeserver as me seem fine so far. At least one other single-user homeserver seems to also be consistently good.
    • So far, I have seen messages from beeper.com, matrix.org, and (most?) single-user homeservers get inexplicable grey shields.
    • In all cases, the same messages validate correctly on my laptop (running Element Web).
  3. Scroll up to past messages which used to be just fine. See grey everywhere.
    • Everywhere. Even messages I'm pretty sure I sent from this phone, without signing out from said phone the meantime.
  4. Try to clear cache and reload. Same results.

All my sessions are, as far as I can tell, verified correctly. Both my phone and laptop display all of my sessions as verified. I have submitted a rageshake with as much information as a rageshake is allowed to contain and a screenshot of some affected messages (though I think maybe I should've filed this first so I could include a reference... whoops).

I doubt this is a homeserver problem, given that my laptop is behaving correctly even after clearing cache and reloading on it.

Outcome

What did you expect?

Incoming messages probably shouldn't have issues. Old messages almost certainly shouldn't have issues.

What happened instead?

see description above

Your phone model

Pixel 6

Operating system version

Android 13

Application version and app store

Element version 1.6.2 [40106022] (G-9f797e49)

Homeserver

boiler.social (Synapse 1.85.2)

Will you send logs?

Yes

Are you willing to provide a PR?

No

c-x-berger commented 1 year ago

Update: messages from the same homeserver are not always good. At least one user on the same homeserver as me triggers the issue as well. Looks fine on my laptop, grey shield on mobile. (And this is someone who I've gone and verified their sessions too!)

waclaw66 commented 1 year ago

I've noticed this since 1.6.x next to (almost) every incomming message within encrypted rooms. Element Web seems ok, no gray shield. Initial sync doesn't help.

hiinaspace commented 1 year ago

I'm having the same issue ever since whatever the latest update is, an inexplicable grey shield on messages from other logins, despite full cross-signing. I sent a bug report through the app as well, but also posting here in case it helps.

mokazemi commented 2 weeks ago

It's also happenning to me. I'm getting this gray shield in one of my devices (on Android) for receiving messages from a friend, but I don't get this shield for same messages on the web! Is it related to this one?