element-hq / element-hq/element-android
Session redacted: expired Using mautrix-discord bridge
- Dominant language
- Kotlin
- Stars
- 3.7k
- Forks
- 917
- PR merge metrics
- No merged PRs in 30d
Description
### Steps to reproduce
1. Send a message in a room bridged to Discord with mautrix-discord after it has been active for ~ 2 weeks
2. Bridge bot returns error:
`Your message was not bridged: failed to get group session: group session has been withheld: com.beeper.redacted (Session redacted: expired).`
Per [this issue](https://github.com/mautrix/meta/issues/50) reported on the mautrix meta repo, element-android is using megolm sessions that are too old, causing issues sending messages to the bridge. This requires a manual `/discardsession` command in element-android to restore functionality.
Perhaps element-android should be updated to refresh its sessions more expediently?
### Outcome
#### What did you expect?
Users should not be prompted to deal with expired sessions, the client should be replacing sessions before they expire.
#### What happened instead?
When trying to send a message, the bridge bot reports the client is using an expired session:
`Your message was not bridged: failed to get group session: group session has been withheld: com.beeper.redacted (Session redacted: expired).`
### Your phone model
Pixel 7
### Operating system version
Android 17
### Application version and app store
Element 1.6.62 from F-Droid
### Homeserver
Synapse 1.147.1
### Will you send logs?
No
### Are you willing to provide a PR?
No
Contributor guide
Research direction
Start by reproducing the mautrix-discord bridge failure after a room has been active for about two weeks, and compare it with the manual /discardsession recovery described in the issue. Trace Element Android's session refresh and replacement entry points; done means bridged messages continue working without users needing to discard sessions manually.
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
- Mostly clear
- Newbie friendliness
- 45/100