RocketChat / RocketChat/Rocket.Chat
Failed to persist keys as they are not strings
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Description:
When I enabled E2EE and logged into the system, the browser console displayed the error shown in the screenshot. I checked the e2e.fetchMyKeys API, and the response data was:
{"success":true}
There was no public_key or private_key. Then, I checked the users table, and those fields were also missing.
According to the documentation, it is described as follows:
When a user logs in, the client auto-generates an encryption password and prompts the user to save it. This password generates a secure 256-bit AES-CBC encryption key called the “Master Key.” The Master Key is central to encrypting and decrypting the user’s private key.
Upon initial login, the system did not generate the expected private_key and public_key. What might be causing this issue? Are there manual allocation methods available?
Steps to reproduce:
Expected behavior:
Actual behavior:
Server Setup Information:
- Version of Rocket.Chat Server:
- License Type:
- Number of Users:
- Operating System:
- Deployment Method:
- Number of Running Instances:
- DB Replicaset Oplog:
- NodeJS Version:
- MongoDB Version:
Client Setup Information
- Desktop App or Browser Version:
- Operating System:
Additional context
Relevant logs:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file or test is named in the report. Start by tracing the e2e.fetchMyKeys entry point and the login-time E2EE key-generation flow, then compare the API response with the users table fields; done means generated keys are persisted and returned by the API.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, databases, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100