RocketChat / RocketChat/Rocket.Chat.ReactNative

bug: starting an encrypted direct conversation from mobile fails to find key

Open
#6,566 12 comments 0 reactions 1 assignee View on GitHub

@diegolmello is already working on this.

Since Aug 15, 2025.

🐛 bug
Dominant language
TypeScript
Stars
2.4k
Forks
1.5k
Avg merge
1d 18h
Merged PRs (30d)
90

Description

Describe the Bug

There is a race condition when starting a direct message from mobile to a recipient on the server website. The recipient will often create the room key and create a E2ESuggestedKey in the sender's subscription. But the sender will not evaluate it because it does not listen to subscription changes yet (it lost the race).

Steps to Reproduce
  1. Log in with the recipient user to the server website.
  2. Make sure there is no direct message room existing between the sender and recipient.
  3. Use the sender's mobile device to start a direct message to the recipient.
  4. You will 90% of the time see that you should wait a while to get the E2E key and that will never happen if nothing else is done.
Expected Behavior

Starting a direct message with someone should allow sending a message immediately, without waiting for keys.

Actual Behavior

Starting a direct message for the first time with a recipient which is logged on to the server website will result in a "wait for keys" message that will not go away on its own.

Image
Rocket.Chat Server Version

7.9.3

Rocket.Chat App Version

4.63

Device Name

iPhone 16 Pro, Android Pixel 7

OS Version

iOS 16, Android API 35

Additional Context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.