element-hq / element-web

A glossy Matrix collaboration client for the web.
https://element.io
GNU Affero General Public License v3.0
11.23k stars 2k forks source link

Error message for "Room was previously configured to use encryption, but is no longer." is now swallowed rather than presented to the user #18463

Open ara4n opened 3 years ago

ara4n commented 3 years ago

Steps to reproduce

Go to an e2ee room whose m.room.encryption event has been reset and send a message. (In this instance, it hasn't deliberately been reset, but the client has got confused)

What happened?

Screenshot 2021-08-09 at 16 59 14

The relevant error ends up in the JS console however:

sendEvent of type m.room.message in !kGLhQmvYrFWnVNxhBx:matrix.org with txnId m1628524623349.189
16:57:03.366 rageshake.js?432e:65 setting pendingEvent status to encrypting in !kGLhQmvYrFWnVNxhBx:matrix.org event ID ~!kGLhQmvYrFWnVNxhBx:matrix.org:m1628524623349.189 -> undefined
16:57:03.383 rageshake.js?432e:65 Error sending event Error: Room was previously configured to use encryption, but is no longer. Perhaps the homeserver is hiding the configuration event.
    at Crypto.encryptEvent (webpack-internal:///164:2598:13)
    at MatrixClient.encryptEventIfNeeded (webpack-internal:///118:3151:24)
    at eval (webpack-internal:///118:3057:38)
consoleObj.<computed> @ rageshake.js?432e:65
16:57:03.384 rageshake.js?432e:65 setting pendingEvent status to not_sent in !kGLhQmvYrFWnVNxhBx:matrix.org event ID ~!kGLhQmvYrFWnVNxhBx:matrix.org:m1628524623349.189 -> undefined

So this is a regression where we should be showing the human-facing error to the user, but we're not any more since we redesigned the error UI a few months ago.

What did you expect?

Error should be presented to the user in the UI like we used to.

Operating system

macOS

Application version

nightly today

How did you install the app?

No response

t3chguy commented 3 years ago

Related https://github.com/vector-im/element-web/issues/17663