Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can we have more info about why messages are undecrypted ? #904

Open
estellecomment opened this issue Feb 13, 2024 · 7 comments
Open

Can we have more info about why messages are undecrypted ? #904

estellecomment opened this issue Feb 13, 2024 · 7 comments
Labels
P2 Priority 2 web

Comments

@estellecomment
Copy link
Contributor

Users don't know what to do when messages are undecrypted.

  • Are they coming later, but not there yet ? (everything is fine, just wait)
  • decryption problem : which type ? (help user diagnose, and go to the appropriate FAQ section)
@github-actions github-actions bot added the web label Feb 13, 2024
@estellecomment
Copy link
Contributor Author

We can get more info in UI : click "..." > "Afficher la source"

Screen Shot 2024-02-13 at 11 38 04 AM

You can see :
image
Screen Shot 2024-02-13 at 11 43 07 AM

@estellecomment
Copy link
Contributor Author

You can see error codes thrown by js-sdk with DecryptionError : (there is no complete list, the string for errorcode is freeform)
https://github.com/search?q=repo%3Amatrix-org%2Fmatrix-js-sdk+%22new+DecryptionError%28%22&type=code

@estellecomment
Copy link
Contributor Author

You can search in console by eventId (identifiant de l'évenement) :

Error decrypting event (id=$NlBEAMosSpoC_NUXXXX type=m.room.encrypted sender=@XXXX:agent.dinum.tchap.gouv.fr room=!AhRwTGkjJegYVGSfaJ:agent.dinum.tchap.gouv.fr ts=2024-02-13T10:35:14.204Z): DecryptionError[msg: The sender's device has not sent us the keys for this message., session: knRj9pU2ww2SXXXX]

Which in the code corresponds to : MEGOLM_UNKNOWN_INBOUND_SESSION_ID

This is the case where I did not get keys when I logged in, because I skipped both Secure Storage connection and device emoji exchange.

@estellecomment
Copy link
Contributor Author

estellecomment commented Feb 13, 2024

Reproduce a slow sync (by throttling network) and see what error is displayed in "Afficher la source".

@odelcroi
Copy link
Member

See also this ticket which investigate auto rageshake when unable to decrypt : #920

@odelcroi odelcroi added the P2 Priority 2 label Jun 10, 2024
@MarcWadai MarcWadai moved this to En étude in Roadmap Produit Jun 10, 2024
@MarcWadai MarcWadai moved this from En étude to prêt pour le sprint in Roadmap Produit Jun 18, 2024
@MarcWadai
Copy link
Contributor

New in matrix-react-sdk 3.101.0 :

  • Updated code on DecryptionFailureTracker.ts -> new properties and analytics to posthog
  • In DeviceListener.ts -> new method reportCryptoSessionStateToAnalytics -> sends analytics to posthog

@MarcWadai
Copy link
Contributor

MarcWadai commented Jul 9, 2024

From element side :

Address UTDs - June Summary:
A new source of UTD was discovered affecting Element-X android and fixed. Rageshake analysis showed some new occurrences of failure to establish olm sessions with federation when the remote federated server is having transient connectivity failures, MSC4081 could fix this problem by eagerly caching and serving fallback keys.

Investigation results
New UTD cases (+ impact / effort to fix as of our dashboard)
EX Android: events can be sent without an up-to-date member list causing UTDs (already fixed)
Sliding Sync: dropping the database causes UTD
Unsent messages (due to being too large) appear as UTDs: element-hq/element-web#27656 - which is a variant of element-hq/element-web#27334 - this appears as “unknown error” when breaking down by name in posthog.
Delayed membership responses in /sync cause UTDs: matrix-org/matrix-rust-sdk#3622 and matrix-org/matrix-js-sdk#4291 - this will impact bots and DMs, anything which instantly does invite->send_message, exacerbated on JS SDK.
Unable to decrypt message, keys aren't getting transferred from other devices: element-hq/element-web#27623 - we see various forms of gossiping not exchanging all keys, see element-hq/element-web#27655 for a similar (code agrees with itself for this though) failure mode for the self-signing key.
Confusion over not sending to unverified devices causing UTDs: element-hq/element-meta#2450 - Seen at least 1 user who got a UTD because the sender refused to send to unverified devices (on EA).
Message previews in the room list can erroneously show UTDs: https://github.com/element-hq/element-web/issues/27579 and element-hq/element-x-ios#2977 - same bug independently done?
Rageshakes:
element-hq/synapse#17267 has been seen twice, and MSC4081 could fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 Priority 2 web
Projects
Status: prêt pour le sprint
Development

No branches or pull requests

3 participants