Skip to content

bug: 🐛 failure to decrypt when sending message to user with letter sealing off #54

Description

@clins1994

Bug Report: failure to decrypt when sending message to user with letter sealing off

Describe the bug

  • LSON - LINE User with Letter Sealed ON
  • LSOFF - LINE User with Letter Sealed OFF
  • BEEPERD - Beeper Desktop
  • BEEPERM - Beeper Mobile
  • LINEM - LINE Mobile
ID Status Header
1 Message sent via BEEPER from LSON to LSOFF directly
2 Message sent via BEEPER from LSON to group with LSOFF
3 Message sent via LINEM from LSON is displayed fine in BEEPERD & BEEPERM
4 Message sent via LINEM from LSOFF is displayed fine in BEEPERD & BEEPERM
5 Message sent via BEEPER from LSON to other group works
6 Message sent via BEEPER from LSON to other LSON works

To Reproduce

N/A

Expected behavior

N/A

Screenshots or logs

Screenshot from LINEM

Group

Image

Direct

Image

Screenshot from BEEPERM

Group

Image

Direct

Image

Screenshot from BEEPERD

Group

Image

Direct

Image

Logs from bridge

matrix-line-1  | 2026-03-16T02:06:09.67Z DBG Decrypting received event event_id=[EVENT_ID] session_id=[SESSION_ID]
matrix-line-1  | 2026-03-16T02:06:09.67Z DBG Sent response to transaction req_id=82 transaction_id=[TRANSACTION_ID] ws_command=transaction
matrix-line-1  | 2026-03-16T02:06:09.672Z DBG Upserting megolm inbound group session account_id= action="decrypt megolm event" event_id=[EVENT_ID] is_scheduled=false key_backup_version= max_age=2592000000 max_messages=10000 received_at=2026-03-16T02:00:01.239559997Z room_id=[ROOM_ID] sender=[USER_EMAIL] sender_key=[SENDER_KEY] session_id=[SESSION_ID] signing_key=[SIGNING_KEY]
matrix-line-1  | 2026-03-16T02:06:09.673Z DBG Ratchet safety data changed (ratchet state didn't change) action="decrypt megolm event" event_id=[EVENT_ID] lost_indices=[] max_messages=10000 missed_indices=[0,1] new_ratchet_index=0 next_new_index=3 prev_ratchet_index=1 sender=[USER_EMAIL] sender_key=[SENDER_KEY] session_id=[SESSION_ID]
matrix-line-1  | 2026-03-16T02:06:09.673Z DBG Event decrypted successfully action="decrypt megolm event" decrypted_event_type="m.room.message (message)" event_id=[EVENT_ID] message_index=2 sender=[USER_EMAIL] sender_key=[SENDER_KEY] session_id=[SESSION_ID]
matrix-line-1  | 2026-03-16T02:06:09.719Z DBG fetchAndUnwrapGroupKey before encrypt failed error="API error 400: {\"code\":10051,\"message\":\"RESPONSE_ERROR\",\"data\":{\"name\":\"TalkException\",\"message\":\"TalkException\",\"code\":5,\"reason\":\"not found\",\"parameterMap\":null}}" chat_mid=[CHAT_MID]
matrix-line-1  | 2026-03-16T02:06:09.754Z ERR Failed to handle Matrix message error="encrypt failed: no group key found for [CHAT_MID]" action="handle matrix event" event_id=[EVENT_ID] event_loop_index=31 event_type=m.room.message login_id=[LOGIN_ID] portal_id=[PORTAL_ID] portal_mxid=[PORTAL_MXID] sender=[USER_EMAIL]
matrix-line-1  | 2026-03-16T02:06:10.078Z DBG Request completed action="handle matrix event" beeper_request_id=[REQUEST_ID] duration=322.817564 event_id=[EVENT_ID] event_loop_index=31 event_type=m.room.message method=PUT portal_id=[PORTAL_ID] portal_mxid=[PORTAL_MXID] req_body={"internal_error":"encrypt failed: no group key found for [CHAT_MID]","m.relates_to":{"event_id":"[EVENT_ID]","rel_type":"m.reference"},"reason":"m.event_not_handled","status":"FAIL_RETRIABLE"} req_id=158 response_length=73 response_mime=application/json sender=[USER_EMAIL] status_code=200 url=[REDACTED_URL]
matrix-line-1  | 2026-03-16T02:06:40.274Z WRN SSE Disconnected error="context deadline exceeded (Client.Timeout or context cancellation while reading body)"

Additional context

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinghelp wantedExtra attention is needed

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions