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

Android clients hides room history from newly invited users in a room

Open daniellekirkwood opened this issue 2 years ago • 14 comments

Steps to reproduce

Our customers are complaining that export of room history does not work. They expect to have new users in a room be able to see the complete message history of the room, but previous history doesn't load automatically when joining the room, and there is no sign or indications of loading nor any errors.

  • [ ] Does this happen on the 'regular' Android client

Repro:
Prerequisite:

  1. Need multiple users
  2. Web users & Mobile device user (Android)

Issue (1)

  • Step 1: Create history between two web-users(make sure "made future room history visible to all room members." option is on).
  • Step 2: Invite a third web-user to the room: Third user can't see any messages until another activity is happening (e.g. switching room back and forth, sending a message or simply receiving one). Furthermore, room history is added in chunks, and will not be complete until after several actions/activities in the room.

Issue (2)

  • Step 3: Invite an Android user into the room (Android users loads the entire room history upon joining the room).
  • Step 4: Android user send a message in the room.
  • Step 5: (optional) Send a message or two from the other web users.
  • Step 6: Invite a new web-user to the room.

New web user can only see messages AFTER the message Android user sent. IOW messages sent earlier that the first Android message will be excluded from the room history.

Outcome

What did you expect?

What happened instead?

Your phone model

No response

Operating system version

No response

Application version and app store

No response

Homeserver

No response

Will you send logs?

No

daniellekirkwood avatar Nov 18 '21 10:11 daniellekirkwood

I think this is because of the lack of MSC3061: Sharing room keys for past messages on android (and ios).

Existing issues:

  • https://github.com/vector-im/element-android/issues/4153
  • https://github.com/vector-im/element-ios/issues/4947

manuroe avatar Nov 18 '21 11:11 manuroe

Even if Element iOS or Android does not support key sharing yet, their presence in a room should not prevent web users from sharing keys?

It sounds like these are two separate issues:

  1. Presence of Android (and iOS?) devices in a room prevents key sharing between Element Web clients
  2. Android and iOS devices do not support sharing keys

thoraj avatar Nov 19 '21 13:11 thoraj

I see this has been moved to Need info - what info is needed, and from whom?

benparsons avatar Dec 13 '21 14:12 benparsons

We believe this is a Crypto issue and would fall to @BillCarsonFr and team.

@BillCarsonFr is that right, what can we do to help you with this?

daniellekirkwood avatar Dec 13 '21 19:12 daniellekirkwood

I have to check, if by 'hides history' you mean that the message are not displayed, it's a timeline issue to be handled by platform. If by hides history you mean that the events can't be decrypted it's expected as per @manuroe comment because sharing key history not implemented on mobile.

But this need some investigation, try to reproduce and provide more details / screenshots, hard to understand as is without investigation

BillCarsonFr avatar Dec 14 '21 08:12 BillCarsonFr

The symptom is that messages are not shown in the room history on the web client. The assumption is that Element Web hides the messages it is not able to decrypt.

Also note that the issue is NOT that Android (or iOS clients cannot view history). The issue is:

If a room has only Element Web devices, key sharing works as expected. I.e. newly invited users can indeed see the history in the room.

BUT if an Android device gets into the room, the next web device which gets invited to the room will NOT be able to see the history.

thoraj avatar Dec 14 '21 08:12 thoraj

@BillCarsonFr Are you not seeing the issue when following the repro steps?

thoraj avatar Dec 14 '21 08:12 thoraj

Out of curiousity if you go to settings > Advanced and enable show all history image

Are the messages in fail to decrypt?

BillCarsonFr avatar Dec 17 '21 16:12 BillCarsonFr

It all look like the same bug and it's on web. Probably some bugs in the code that was made to hide history of e2e rooms (as you were not suppose to see it previous to this share history feature).

Try to reply to an old message that the last web don't see. Then on the last web tap on the embedded reply, the timeline flickers a bit and we can see the room create tile for a second and then the timeline is laggy

I would be in favor to close here and open an issue on web

BillCarsonFr avatar Dec 17 '21 16:12 BillCarsonFr

Regarding the android part, it should be fixed when This will be implemented vector-im/element-web#4153 (Sharing room keys for past messages )

And this https://github.com/vector-im/element-android/pull/2190 will be tweaked to enable back pagination if history is shared and also show event and request keys.

BillCarsonFr avatar Jan 21 '22 14:01 BillCarsonFr

I would be in favor to close here and open an issue on web

So we can keep this open for android (we have now to enable back showing history and backpaginating when history is shared and query keys).

A separate issue must be open on web regarding the display/pagination issue

BillCarsonFr avatar Jan 21 '22 14:01 BillCarsonFr

As seen with @duxovni Web issues already exists:

https://github.com/vector-im/element-meta/issues/647 https://github.com/vector-im/element-web/issues/16983

BillCarsonFr avatar Jan 21 '22 14:01 BillCarsonFr

Regarding the android part, it should be fixed when This will be implemented vector-im/element-web#4153 (Sharing room keys for past messages )

And this vector-im/element-web#2190 will be tweaked to enable back pagination if history is shared and also show event and request keys.

Looks like vector-im/element-web#4153 is now closed. What does that mean for the status of this bug?

emmaburton1 avatar Jul 07 '22 10:07 emmaburton1

@daniellekirkwood according to @BillCarsonFr comment, it should be fixed now, can you test again?

Florian14 avatar Aug 24 '22 13:08 Florian14