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

"Something went wrong" with low bandwidth mode and E2EE #11138

Closed
pacien opened this issue Oct 14, 2019 · 11 comments
Closed

"Something went wrong" with low bandwidth mode and E2EE #11138

pacien opened this issue Oct 14, 2019 · 11 comments
Labels

Comments

@pacien
Copy link
Contributor

pacien commented Oct 14, 2019

Description

On one of my device, a previously working Riot desktop session broke. Edit: after enabling low-bandwidth mode and trying to view an encrypted room
On 1.4.1, nothing but a blank screen appears when launching the app.
After upgrading to 1.4.2, nothing but a "Something went wrong" screen (probably the one added in #11009) appears.

Clearing the cache and reloading the app has no effect.

Oddly enough, the tray indicators works and displays the unread message count.

The Electron developper console shows a few exceptions in the log snippet that follows.
The last exception is a rendering issue that might be the cause of the problem.

Console log snippet
rageshake.js:107 Error: End-to-end encryption disabled
    at oe.getKeyBackupEnabled (client.js:1189)
    at t.render (RoomView.js:1892)
    at ya (react-dom.production.min.js:173)
    at va (react-dom.production.min.js:172)
    at Zs (react-dom.production.min.js:247)
    at qs (react-dom.production.min.js:216)
    at Gs (react-dom.production.min.js:210)
    at Ms (react-dom.production.min.js:206)
    at react-dom.production.min.js:114
    at t.unstable_runWithPriority (scheduler.production.min.js:20)
    at po (react-dom.production.min.js:113)
    at _o (react-dom.production.min.js:114)
    at go (react-dom.production.min.js:113)
    at Is (react-dom.production.min.js:204)
    at Object.enqueueSetState (react-dom.production.min.js:127)
    at t.E.setState (react.production.min.js:13)
forEach.e.(anonymous function) @ rageshake.js:107
Ma @ react-dom.production.min.js:187
Ka.n.payload @ react-dom.production.min.js:201
Bo @ react-dom.production.min.js:122
Uo @ react-dom.production.min.js:123
va @ react-dom.production.min.js:170
Zs @ react-dom.production.min.js:247
qs @ react-dom.production.min.js:216
Gs @ react-dom.production.min.js:210
Ms @ react-dom.production.min.js:206
(anonymous) @ react-dom.production.min.js:114
t.unstable_runWithPriority @ scheduler.production.min.js:20
po @ react-dom.production.min.js:113
_o @ react-dom.production.min.js:114
go @ react-dom.production.min.js:113
Is @ react-dom.production.min.js:204
enqueueSetState @ react-dom.production.min.js:127
E.setState @ react.production.min.js:13
(anonymous) @ MatrixChat.js:1003
c @ bluebird.js:5290
D._settlePromiseFromHandler @ bluebird.js:3302
D._settlePromise @ bluebird.js:3359
D._settlePromise0 @ bluebird.js:3404
D._settlePromises @ bluebird.js:3484
p @ bluebird.js:190
f @ bluebird.js:183
l._drainQueues @ bluebird.js:199
drainQueues @ bluebird.js:69
Promise.then (async)
a @ bluebird.js:4517
l._queueTick @ bluebird.js:208
d @ bluebird.js:140
D._fulfill @ bluebird.js:3430
D._resolveCallback @ bluebird.js:3222
F @ bluebird.js:3509
_onWorkerMessage @ indexeddb-remote-backend.js:206
rageshake.js:107 Error: End-to-end encryption disabled
    at oe.getKeyBackupEnabled (client.js:1189)
    at t.render (RoomView.js:1892)
    at ya (react-dom.production.min.js:173)
    at va (react-dom.production.min.js:172)
    at Zs (react-dom.production.min.js:247)
    at qs (react-dom.production.min.js:216)
    at Gs (react-dom.production.min.js:210)
    at Ms (react-dom.production.min.js:206)
    at react-dom.production.min.js:114
    at t.unstable_runWithPriority (scheduler.production.min.js:20)
    at po (react-dom.production.min.js:113)
    at _o (react-dom.production.min.js:114)
    at go (react-dom.production.min.js:113)
    at Is (react-dom.production.min.js:204)
    at Object.enqueueSetState (react-dom.production.min.js:127)
    at t.E.setState (react.production.min.js:13)
forEach.e.(anonymous function) @ rageshake.js:107
value @ ErrorBoundary.js:109
Ka.i.componentDidCatch.n.callback @ react-dom.production.min.js:201
Go @ react-dom.production.min.js:125
jo @ react-dom.production.min.js:125
Ws @ react-dom.production.min.js:238
t.unstable_runWithPriority @ scheduler.production.min.js:20
po @ react-dom.production.min.js:113
Hs @ react-dom.production.min.js:230
Ms @ react-dom.production.min.js:206
(anonymous) @ react-dom.production.min.js:114
t.unstable_runWithPriority @ scheduler.production.min.js:20
po @ react-dom.production.min.js:113
_o @ react-dom.production.min.js:114
go @ react-dom.production.min.js:113
Is @ react-dom.production.min.js:204
enqueueSetState @ react-dom.production.min.js:127
E.setState @ react.production.min.js:13
(anonymous) @ MatrixChat.js:1003
c @ bluebird.js:5290
D._settlePromiseFromHandler @ bluebird.js:3302
D._settlePromise @ bluebird.js:3359
D._settlePromise0 @ bluebird.js:3404
D._settlePromises @ bluebird.js:3484
p @ bluebird.js:190
f @ bluebird.js:183
l._drainQueues @ bluebird.js:199
drainQueues @ bluebird.js:69
Promise.then (async)
a @ bluebird.js:4517
l._queueTick @ bluebird.js:208
d @ bluebird.js:140
D._fulfill @ bluebird.js:3430
D._resolveCallback @ bluebird.js:3222
F @ bluebird.js:3509
_onWorkerMessage @ indexeddb-remote-backend.js:206
rageshake.js:107 The above error occured while React was rendering the following components: 
    in RoomView
    in div
    in t
    in div
    in LoggedInView
    in t
    in MatrixChat
forEach.e.(anonymous function) @ rageshake.js:107
value @ ErrorBoundary.js:110
Ka.i.componentDidCatch.n.callback @ react-dom.production.min.js:201
Go @ react-dom.production.min.js:125
jo @ react-dom.production.min.js:125
Ws @ react-dom.production.min.js:238
t.unstable_runWithPriority @ scheduler.production.min.js:20
po @ react-dom.production.min.js:113
Hs @ react-dom.production.min.js:230
Ms @ react-dom.production.min.js:206
(anonymous) @ react-dom.production.min.js:114
t.unstable_runWithPriority @ scheduler.production.min.js:20
po @ react-dom.production.min.js:113
_o @ react-dom.production.min.js:114
go @ react-dom.production.min.js:113
Is @ react-dom.production.min.js:204
enqueueSetState @ react-dom.production.min.js:127
E.setState @ react.production.min.js:13
(anonymous) @ MatrixChat.js:1003
c @ bluebird.js:5290
D._settlePromiseFromHandler @ bluebird.js:3302
D._settlePromise @ bluebird.js:3359
D._settlePromise0 @ bluebird.js:3404
D._settlePromises @ bluebird.js:3484
p @ bluebird.js:190
f @ bluebird.js:183
l._drainQueues @ bluebird.js:199
drainQueues @ bluebird.js:69
Promise.then (async)
a @ bluebird.js:4517
l._queueTick @ bluebird.js:208
d @ bluebird.js:140
D._fulfill @ bluebird.js:3430
D._resolveCallback @ bluebird.js:3222
F @ bluebird.js:3509
_onWorkerMessage @ indexeddb-remote-backend.js:206

Steps to reproduce

  • Launch the Riot desktop app.
  • Get unlucky.
  • Experience frustration.

See #11138 (comment)

15710522892788

Version information

  • Platform: desktop (Electron)
  • OS: Linux/NixOS
  • Version: 1.4.1 and 1.4.2
@t3chguy
Copy link
Member

t3chguy commented Oct 14, 2019

Where did you install this version from? It seems incorrectly built without encryption support

@pacien
Copy link
Contributor Author

pacien commented Oct 14, 2019

This is from the NixOS package which is based on the official pre-compiled release of riot-web.

The same package works on my other laptop and I'm able to send and receive messages in encrypted rooms, so the package is indeed supporting encryption.

The "something went wrong" screen appears only on one of my device. I suspect that it's trying to show a room which crashes the whole app instead of only one component after the upgrade to React 16.

@t3chguy
Copy link
Member

t3chguy commented Oct 14, 2019

@pacien
Copy link
Contributor Author

pacien commented Oct 14, 2019

Could the crash of one component prevent the crypto part from being initialised if it happens early?
I checked both installations and their checksums are matching, and the package does support E2EE.

I think that this session might be stuck on a broken room. I've tried setting mx_last_room_id in the Local Storage in the developper tools, but it keeps resetting itself to its current value. Is there any way I can set it to another value for testing purposes?

@t3chguy
Copy link
Member

t3chguy commented Oct 14, 2019

Could the crash of one component prevent the crypto part from being initialised if it happens early?
I checked both installations and their checksums are matching, and the package does support E2EE.

Crypto starts before any of the app gets mounted (other than the Spinner)

@pacien
Copy link
Contributor Author

pacien commented Oct 14, 2019

I've been able to identify the problem: I think there's a bug with the experimental low-bandwidth mode and end-to-end encryption support:

  • Enable encryption in a room without low-bandwidth mode.
  • Turn on low-bandwidth mode in the lab tab in the settings.
  • Refresh.
  • "Something went wrong!" appears when trying to display the encrypted room, with "Error: End-to-end encryption disabled" appearing in the logs.

Since Riot automatically re-opens the last viewed room, the error appears right on start, not allowing the user to disable the low-bandwidth mode without the help of the console.

I've been able to go to another room by setting window.location.href = "vector://vector/webapp/#/room/[another room without encryption] and refreshing, allowing me to access the settings and disable the low-bandwidth mode.

@pacien pacien changed the title "Something went wrong" "Something went wrong" with low bandwidth mode and E2EE Oct 14, 2019
@turt2live
Copy link
Member

Encryption is intentionally not supported in low bandwidth mode, which is why this is a labs flag.

@pacien
Copy link
Contributor Author

pacien commented Oct 14, 2019

Why close this issue though? It should really not lock the entire app with an error page asking for a bug report, without allowing the user to disable that mode.

Furthermore, what is the rationale for disabling E2EE in low bandwidth mode?

@t3chguy
Copy link
Member

t3chguy commented Oct 14, 2019

Furthermore, what is the rationale for disabling E2EE in low bandwidth mode?

e2ee key negotiation uses a lot of bandwidth.

Why close this issue though? It should really not lock the entire app with an error page asking for a bug report, without allowing the user to disable that mode.

Because its in Labs and this is expected behaviour

@turt2live
Copy link
Member

The low bandwidth option is meant to be paired with specific infrastructure. When you're not using that infrastructure, it has minimal value.

@mureni
Copy link

mureni commented Aug 29, 2020

I am encountering this exact error, since there was no indication in the Labs setting that it was not compatible with E2EE. Have not yet figured out how to "reset" since Element takes me directly to the "Something went wrong" page without any way to change this.

Suggestions:

  1. Make it clear that enabling Low-Bandwidth mode in the Labs will cause this problem
  2. Use UX elements to hide or disable E2EE rooms when in Low-Bandwidth mode
  3. Allow for users to edit their settings when "Something" goes wrong and/or add a button to reset labs flags

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants