element-web icon indicating copy to clipboard operation
element-web copied to clipboard

Fail to display timeline history when joining E2E room.

Open erikjohnston opened this issue 2 years ago • 2 comments

Steps to reproduce

  1. Invited to e2e room and immediately join (this is a remote join if it makes a difference)

Outcome

Join the room, get told: You can't see earlier messages \n Encrypted messages before this point are unavailable.

Operating system

Ubuntu

Browser information

Version 103.0.5060.114 (Official Build) (64-bit)

URL for webapp

develop.element.io

Application version

Element version: 3e3f279469ad-react-a866005bea85-js-3907d1c28f87 Olm version: 3.2.12

Homeserver

jki.re

Will you send logs?

Yes

erikjohnston avatar Aug 04 '22 18:08 erikjohnston

S-Major because of hidden data (not quite data loss, but valid history is hidden)

This issue also applies if there's unencrypted messages before join: they are hidden.

turt2live avatar Aug 05 '22 03:08 turt2live

Reincarnation of https://github.com/vector-im/element-web/issues/16983

t3chguy avatar Aug 05 '22 06:08 t3chguy

Adding context from #23429. Also to note, for users with only one room, it's impossible to perform this workaround, so they can't recover history.

Steps to reproduce

  1. Get an invite to an e2ee room (A)
  2. Join the room (A)
  3. (Possibly) see some messages in A
  4. Click on another room (B)
  5. Click back to room A
  6. See more history in A
  7. Click on another room (B)
  8. Click back to room A
  9. See more history in A

Outcome

What did you expect?

When I join a room, I should see history, even if it takes time to load.

What happened instead?

I have to click around the UI to load messages.

benparsons avatar Oct 06 '22 08:10 benparsons

I could mention that the vast majority of our users have a single room and cannot use the workaround.

And the flaw is devastating since this single room is often used to bring in new collaborators when there is already a lot of history in the room.

thoraj avatar Oct 07 '22 14:10 thoraj

I just want to drop my 2 cents on this issue (it is happening to me as well here)

The old history might be getting stopped if it fails to decrypt a message (either can't or hasn't gotten a decryption key from a user) as the preview in the room list suggests a key was withheld. I do have multiple rooms (actually a ton of them) and switching rooms does not help to get older history at all. It just says that older messages are not available. Exporting the room history (set to "from the beginning") does manage to export out decryptable messages that are otherwise hidden in the client.

My android session actually has the older history. It's just the desktop and web clients for me that are unable to do so at all.

shinji257 avatar Nov 14 '22 09:11 shinji257

Please can people seeing this make sure that they send a rageshake from their device, and get the person who sent them an invite to send a rageshake too. In the case of @erikjohnston's original report the problem seems to have been on the inviter's side, but we don't have any logs from the inviter to investigate.

richvdh avatar Nov 16 '22 12:11 richvdh

It's worth noting that Element only concerns itself with the most recent unable-to-decrypt message, and won't show any messages before that, even if it has successfully decrypted them. (see https://github.com/matrix-org/matrix-react-sdk/blob/v3.60.0/src/components/structures/TimelinePanel.tsx#L1555-L1566) It's far from clear to me that that is intended behaviour.

richvdh avatar Nov 16 '22 13:11 richvdh

This is exactly the issue I'm trying to describe. I've used other clients (not forked from Element) and those clients show all the history going beyond the messages that it couldn't decrypt.

shinji257 avatar Nov 16 '22 13:11 shinji257

image

There's a another issue with e2e rooms for space members - "Users joining a private room within a space via "restricted" join rule have no way of accessing history" (https://github.com/vector-im/element-meta/issues/646). Allowing room admins to select all three of Encrypted, Access - Space members, and Members since the point in time of selecting this option produces a result that does not work. Inviting a space member to the group does not send the keys. Ironically making the rooms private and then explicitly inviting members does work, but defeats the purpose of a space membership.

There is a proposal to add a way to manually request access from other members (https://github.com/vector-im/element-meta/issues/750). Until then it seems like a warning that "this feature does not work (yet)" would be appropriate for space rooms to avoid creating lots of debugging confusion.

osresearch avatar Dec 02 '22 16:12 osresearch

There doesn't seem to be much left to do here.

  • #23778 tracks a known issue that can cause this problem.
  • https://github.com/vector-im/element-meta/issues/646 covers the issue mentioned by @osresearch.
  • I have opened https://github.com/vector-im/element-web/issues/24190 to reflect the fact that this warning is too trigger-happy.

richvdh avatar Jan 09 '23 13:01 richvdh