element-hq / element-hq/element-x-android

Unable to synchronize key storage on Element X

Open
#7,283 3 comments 0 reactions 0 assignees View on GitHub
A-E2EE O-Uncommon S-Major T-Defect
Dominant language
Kotlin
Stars
2.4k
Forks
624
Avg merge
1d 14h
Merged PRs (30d)
149

Description

### Steps to reproduce

I'm currently using Element Classic. I've been trying to migrate to Element X a few times in the last few months but have never been able to successfully restore my key storage on the new app.

After initially installing the app and verifying the session through emoji matching (while getting stuck multiple times, both on the confirming (Element Classic) and registering device (Element X), finally worked on the 5th attempt), it prompts me, "Your key storage is out of sync". Entering the recovery key I regenerated earlier this year, it tells me the key is invalid. However, I have reset my identity just earlier this year, and Element Classic accepts the exact same recovery key perfectly (Settings → Security & Privacy → Encrypted Messages Recovery → Restore from backup).

(Possibly related: I also have problems with Element Desktop/Web, where it continuously asks me to verify my session. However, I can read my encrypted messages there).

I have reproduced this on two separate devices. Element Classic and Fluffy Chat work perfectly. This leads me to believe that there's something wrong with my server account/user. I have tried to delete the server key backup & recreate it in the past, without fixing the issue.

Possible related issue: #5732.

### Outcome

#### What did you expect?
After setting up the app and entering my recovery key, the app should accept it and show my encrypted messages.

#### What happened instead?
It returns "Incorrect recovery key", the prompt stays.

### Your phone model

Samsung Z Fold 4 / Samsung Z Flip 6

### Operating system version

Android 16

### Application version and app store

Element X 26.07.1 (202607010)

### Homeserver

_No response_

### Will you send logs?

Yes

### Will you submit a Pull Request?

No

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the recovery-key restore flow on Element X Android 26.07.1 using the listed Samsung devices or an equivalent setup, then inspect the logs requested in the report and compare the same key-restore flow in Element Classic. Done means a valid recovery key is accepted and encrypted messages become available without the prompt remaining.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.