element-hq / element-web

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

Unable to load session after Riot update #6647

Closed tues closed 6 years ago

tues commented 6 years ago

Description

After clicking the "Update" button yesterday I was logged out of Riot and can no longer log in. I haven't changed anything regarding my browser settings, version or add-ons.

Riot on my Android phone is working fine (I haven't updated it recently though).

BTW, thanks for creating Riot, it is great :slightly_smiling_face:

Steps to reproduce

I can only see a throbber on a white background, but I expect to see normal chat interface.

I have tried refreshing browser cache but it doesn't help. I haven't tried clearing local storage because I don't want to create new encryption keys as I always have some issues with missing chat history afterwards (even if I import old keys as well). I have tried signing in from an incognito window and it doesn't work as well.

Log: not sent (because I can't sign in)

Here are the logs from my browser's console:

XML Parsing Error: syntax error
Location: https://riot.im/app/version?cachebuster=1525170423400
Line Number 1, Column 1:
version:1:1
setLoggedIn: mxid: @me:example.com deviceId: ABCDEFGHIJ guest: false hs: https://matrix.org
rageshake.js:66:16
Unhandled rejection stopPageChangeTimer@https://riot.im/app/bundles/3de1254efca2af5ec784/bundle.js:127:12580
componentDidUpdate@https://riot.im/app/bundles/3de1254efca2af5ec784/bundle.js:127:11683
a</e.prototype.notifyAll@https://riot.im/app/bundles/3de1254efca2af5ec784/bundle.js:73:17383
close@https://riot.im/app/bundles/3de1254efca2af5ec784/bundle.js:153:28341
closeAll@https://riot.im/app/bundles/3de1254efca2af5ec784/bundle.js:36:9965
perform@https://riot.im/app/bundles/3de1254efca2af5ec784/bundle.js:36:9457
perform@https://riot.im/app/bundles/3de1254efca2af5ec784/bundle.js:36:9377
perform@https://riot.im/app/bundles/3de1254efca2af5ec784/bundle.js:14:3943
x@https://riot.im/app/bundles/3de1254efca2af5ec784/bundle.js:14:4120
closeAll@https://riot.im/app/bundles/3de1254efca2af5ec784/bundle.js:36:9965
perform@https://riot.im/app/bundles/3de1254efca2af5ec784/bundle.js:36:9457
batchedUpdates@https://riot.im/app/bundles/3de1254efca2af5ec784/bundle.js:153:21416
l@https://riot.im/app/bundles/3de1254efca2af5ec784/bundle.js:14:3070
r@https://riot.im/app/bundles/3de1254efca2af5ec784/bundle.js:50:8217
enqueueSetState@https://riot.im/app/bundles/3de1254efca2af5ec784/bundle.js:50:9360
r.prototype.setState@https://riot.im/app/bundles/3de1254efca2af5ec784/bundle.js:74:7463
setStateForNewView@https://riot.im/app/bundles/3de1254efca2af5ec784/bundle.js:127:12866
onAction@https://riot.im/app/bundles/3de1254efca2af5ec784/bundle.js:127:16298
a</e.prototype._invokeCallback@https://riot.im/app/bundles/3de1254efca2af5ec784/bundle.js:98:20483
a</e.prototype.dispatch@https://riot.im/app/bundles/3de1254efca2af5ec784/bundle.js:98:20298
value@https://riot.im/app/bundles/3de1254efca2af5ec784/bundle.js:1:16489
e/<@https://riot.im/app/bundles/3de1254efca2af5ec784/bundle.js:69:1831
r@https://riot.im/app/bundles/3de1254efca2af5ec784/bundle.js:82:25773
u/<@https://riot.im/app/bundles/3de1254efca2af5ec784/bundle.js:82:26820
s/</e[t]@https://riot.im/app/bundles/3de1254efca2af5ec784/bundle.js:82:25949
o@https://riot.im/app/bundles/3de1254efca2af5ec784/bundle.js:1:21111
e.exports/l.prototype._promiseFulfilled@https://riot.im/app/bundles/3de1254efca2af5ec784/bundle.js:38:3700
e.exports/e.coroutine/<@https://riot.im/app/bundles/3de1254efca2af5ec784/bundle.js:38:5546
E</<@https://riot.im/app/bundles/3de1254efca2af5ec784/bundle.js:69:2780
c@https://riot.im/app/bundles/3de1254efca2af5ec784/bundle.js:69:239
onPasswordLogin/<@https://riot.im/app/bundles/3de1254efca2af5ec784/bundle.js:132:17545
o@https://riot.im/app/bundles/3de1254efca2af5ec784/bundle.js:1:21111
e.exports/i.prototype._settlePromiseFromHandler@https://riot.im/app/bundles/3de1254efca2af5ec784/bundle.js:38:24060
e.exports/i.prototype._settlePromise@https://riot.im/app/bundles/3de1254efca2af5ec784/bundle.js:38:24863
e.exports/i.prototype._settlePromise0@https://riot.im/app/bundles/3de1254efca2af5ec784/bundle.js:38:25564
e.exports/i.prototype._settlePromises@https://riot.im/app/bundles/3de1254efca2af5ec784/bundle.js:38:26894
r.prototype._drainQueue@https://riot.im/app/bundles/3de1254efca2af5ec784/bundle.js:37:10365
r.prototype._drainQueues@https://riot.im/app/bundles/3de1254efca2af5ec784/bundle.js:37:10423
r/this.drainQueues@https://riot.im/app/bundles/3de1254efca2af5ec784/bundle.js:37:8580

Using riot.im/develop:

Unable to load session 
TypeError: measurement is undefined
Stack trace:
stopPageChangeTimer@https://riot.im/develop/bundles/82d62c1ea127adaeee12/bundle.js:128788:10
componentDidUpdate@https://riot.im/develop/bundles/82d62c1ea127adaeee12/bundle.js:128758:31
measureLifeCyclePerf@https://riot.im/develop/bundles/82d62c1ea127adaeee12/bundle.js:275622:13
_performComponentUpdate/<@https://riot.im/develop/bundles/82d62c1ea127adaeee12/bundle.js:276275:12
notifyAll@https://riot.im/develop/bundles/82d62c1ea127adaeee12/bundle.js:114476:10
close@https://riot.im/develop/bundles/82d62c1ea127adaeee12/bundle.js:280650:6
closeAll@https://riot.im/develop/bundles/82d62c1ea127adaeee12/bundle.js:47124:12
perform@https://riot.im/develop/bundles/82d62c1ea127adaeee12/bundle.js:47071:12
perform@https://riot.im/develop/bundles/82d62c1ea127adaeee12/bundle.js:47058:14
perform@https://riot.im/develop/bundles/82d62c1ea127adaeee12/bundle.js:13633:13
flushBatchedUpdates@https://riot.im/develop/bundles/82d62c1ea127adaeee12/bundle.js:13716:8
closeAll@https://riot.im/develop/bundles/82d62c1ea127adaeee12/bundle.js:47124:12
perform@https://riot.im/develop/bundles/82d62c1ea127adaeee12/bundle.js:47071:12
batchedUpdates@https://riot.im/develop/bundles/82d62c1ea127adaeee12/bundle.js:279025:15
enqueueUpdate@https://riot.im/develop/bundles/82d62c1ea127adaeee12/bundle.js:13744:6
enqueueUpdate@https://riot.im/develop/bundles/82d62c1ea127adaeee12/bundle.js:70756:4
enqueueSetState@https://riot.im/develop/bundles/82d62c1ea127adaeee12/bundle.js:70950:6
ReactComponent.prototype.setState@https://riot.im/develop/bundles/82d62c1ea127adaeee12/bundle.js:117100:4
setStateForNewView@https://riot.im/develop/bundles/82d62c1ea127adaeee12/bundle.js:128803:10
onAction@https://riot.im/develop/bundles/82d62c1ea127adaeee12/bundle.js:129002:18
_invokeCallback@https://riot.im/develop/bundles/82d62c1ea127adaeee12/bundle.js:192883:6
dispatch@https://riot.im/develop/bundles/82d62c1ea127adaeee12/bundle.js:192859:10
dispatch@https://riot.im/develop/bundles/82d62c1ea127adaeee12/bundle.js:1115:19
_callee3$@https://riot.im/develop/bundles/82d62c1ea127adaeee12/bundle.js:75538:26
tryCatch@https://riot.im/develop/bundles/82d62c1ea127adaeee12/bundle.js:231986:38
invoke@https://riot.im/develop/bundles/82d62c1ea127adaeee12/bundle.js:232220:23
defineIteratorMethods/</prototype[method]@https://riot.im/develop/bundles/82d62c1ea127adaeee12/bundle.js:232038:17
tryCatcher@https://riot.im/develop/bundles/82d62c1ea127adaeee12/bundle.js:9210:17
module.exports/PromiseSpawn.prototype._promiseFulfilled@https://riot.im/develop/bundles/82d62c1ea127adaeee12/bundle.js:175227:19
module.exports/Promise.coroutine/<@https://riot.im/develop/bundles/82d62c1ea127adaeee12/bundle.js:175331:10
_doSetLoggedIn@https://riot.im/develop/bundles/82d62c1ea127adaeee12/bundle.js:75609:17
_callee2$@https://riot.im/develop/bundles/82d62c1ea127adaeee12/bundle.js:75482:56
tryCatch@https://riot.im/develop/bundles/82d62c1ea127adaeee12/bundle.js:231986:38
invoke@https://riot.im/develop/bundles/82d62c1ea127adaeee12/bundle.js:232220:23
defineIteratorMethods/</prototype[method]@https://riot.im/develop/bundles/82d62c1ea127adaeee12/bundle.js:232038:17
tryCatcher@https://riot.im/develop/bundles/82d62c1ea127adaeee12/bundle.js:9210:17
module.exports/PromiseSpawn.prototype._promiseFulfilled@https://riot.im/develop/bundles/82d62c1ea127adaeee12/bundle.js:175227:19
module.exports/Promise.coroutine/<@https://riot.im/develop/bundles/82d62c1ea127adaeee12/bundle.js:175331:10
_restoreFromLocalStorage@https://riot.im/develop/bundles/82d62c1ea127adaeee12/bundle.js:75507:17
_callee$@https://riot.im/develop/bundles/82d62c1ea127adaeee12/bundle.js:75367:56
tryCatch@https://riot.im/develop/bundles/82d62c1ea127adaeee12/bundle.js:231986:38
invoke@https://riot.im/develop/bundles/82d62c1ea127adaeee12/bundle.js:232220:23
defineIteratorMethods/</prototype[method]@https://riot.im/develop/bundles/82d62c1ea127adaeee12/bundle.js:232038:17
tryCatcher@https://riot.im/develop/bundles/82d62c1ea127adaeee12/bundle.js:9210:17
module.exports/PromiseSpawn.prototype._promiseFulfilled@https://riot.im/develop/bundles/82d62c1ea127adaeee12/bundle.js:175227:19
module.exports/Promise.coroutine/<@https://riot.im/develop/bundles/82d62c1ea127adaeee12/bundle.js:175331:10
loadSession@https://riot.im/develop/bundles/82d62c1ea127adaeee12/bundle.js:75404:17
componentDidMount/</<@https://riot.im/develop/bundles/82d62c1ea127adaeee12/bundle.js:128724:25
tryCatcher@https://riot.im/develop/bundles/82d62c1ea127adaeee12/bundle.js:9210:17
module.exports/Promise.prototype._settlePromiseFromHandler@https://riot.im/develop/bundles/82d62c1ea127adaeee12/bundle.js:176344:14
module.exports/Promise.prototype._settlePromise@https://riot.im/develop/bundles/82d62c1ea127adaeee12/bundle.js:176401:14
module.exports/Promise.prototype._settlePromiseCtx@https://riot.im/develop/bundles/82d62c1ea127adaeee12/bundle.js:176438:6
Async.prototype._drainQueue@https://riot.im/develop/bundles/82d62c1ea127adaeee12/bundle.js:173504:10
Async.prototype._drainQueues@https://riot.im/develop/bundles/82d62c1ea127adaeee12/bundle.js:173509:6
Async/this.drainQueues@https://riot.im/develop/bundles/82d62c1ea127adaeee12/bundle.js:173383:10
run@https://riot.im/develop/bundles/82d62c1ea127adaeee12/bundle.js:260710:23
notify/<@https://riot.im/develop/bundles/82d62c1ea127adaeee12/bundle.js:260727:31
flush@https://riot.im/develop/bundles/82d62c1ea127adaeee12/bundle.js:67047:10
bundle.js:107947:22
Starting load of AsyncWrapper for modal
bundle.js:107947:22
AsyncWrapper load completed with SessionRestoreErrorDialog
bundle.js:107947:22
Initialised anonymous analytics
bundle.js:107947:22
XML Parsing Error: syntax error
Location: https://riot.im/develop/version?cachebuster=1525170288400
Line Number 1, Column 1:

Version information

For the web app:

alex-mayorga commented 6 years ago

¡Hola @ara4n!

I have the exact same symptoms as the initial reporter on Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0 ID:20180501220047 at https://riot.im/develop/#/room/#freenode_#gultec:matrix.org

Please find below the bits of the web console that seem relevant.

¡Gracias! Alex

Successfully compiled asm.js code (total compilation time 74ms; stored in cache) olm.js Download the React DevTools for a better development experience: https://fb.me/react-devtools bundle.js:114792:10 Warning: Accessing createClass via the main React package is deprecated, and will be removed in React v16.0. Use a plain JavaScript class instead. If you're not yet ready to migrate, create-react-class v15.* is available on npm as a temporary, drop-in replacement. For more info see https://fb.me/react-create-class bundle.js:107908:22 Warning: Accessing PropTypes via the main React package is deprecated, and will be removed in React v16.0. Use the latest available v15.* prop-types package from npm instead. For info on usage, compatibility, migration and more, see https://fb.me/prop-types-docs bundle.js:107908:22 Initialised rageshake: See https://bugs.chromium.org/p/chromium/issues/detail?id=583193 to fix line numbers on Chrome. bundle.js:107908:22 unreachable code after return statement bundle.js:1719:5 unreachable code after return statement bundle.js:9395:5 unreachable code after return statement bundle.js:1719:5 unreachable code after return statement bundle.js:9395:5 [Mostrar/hide detalles del mensaje.] bad serialized structured data (incompatible structured clone scope) bundle.js:108138:46 [SW] on message <unavailable> js/lib/push_worker.js:85:3 set language to es bundle.js:107908:22 [SW] on message <unavailable> js/lib/push_worker.js:85:3 Vector starting at https://riot.im/develop/#/room/#freenode_#gultec:matrix.org bundle.js:107908:22 Restoring session for @alex_mayorga:matrix.org bundle.js:107908:22 setLoggedIn: mxid: @alex_mayorga:matrix.org deviceId: YKLIOSIVWH guest: false hs: https://matrix.org bundle.js:107908:22 Session persisted for @alex_mayorga:matrix.org bundle.js:107908:22 Lifecycle: Starting MatrixClient bundle.js:107908:22 connecting to indexeddb matrix-js-sdk:crypto bundle.js:107908:22 connected to indexeddb matrix-js-sdk:crypto bundle.js:107908:22 Unable to initialise e2e: undefined bundle.js:107908:22 IndexedDBStore.startup: connecting to backend bundle.js:107908:22 MatrixClientPeg: waiting for MatrixClient store to initialise bundle.js:107908:22 Hubo un fallo al cargar el <script> con fuente “https://piwik.riot.im/piwik.js”. develop:1 [Mostrar/hide detalles del mensaje.] bad serialized structured data (incompatible structured clone scope) bundle.js:248408:22 Error de lectura XML: error de sintaxis Ubicación: https://riot.im/develop/version?cachebuster=1525242779775 Número de línea 1, columna 1: version:1:1 unreachable code after return statement indexeddb-worker.js:275:5 Error de lectura XML: error de sintaxis Ubicación: https://riot.im/develop/version?cachebuster=1525242779789 Número de línea 1, columna 1: version:1:1 Switching to room alias #freenode_#gultec:matrix.org at event undefined bundle.js:107908:22 unreachable code after return statement indexeddb-worker.js:275:5 IndexedDB worker is ready bundle.js:107908:22 LocalIndexedDBStoreBackend.connect: connecting... indexeddb-worker.js:3841:10 LocalIndexedDBStoreBackend.connect: awaiting connection... indexeddb-worker.js:3858:10 LocalIndexedDBStoreBackend.connect: connected indexeddb-worker.js:3860:14 LocalIndexedDBStoreBackend: loading account data... indexeddb-worker.js:4083:10 LocalIndexedDBStoreBackend: loading sync data... indexeddb-worker.js:4103:10 bad serialized structured data (incompatible structured clone scope) indexeddb-worker.js:4088:18 bad serialized structured data (incompatible structured clone scope) indexeddb-worker.js:4108:18 Presence: online bundle.js:107908:22 Switching to room alias #freenode_#gultec:matrix.org at event undefined bundle.js:107908:22

alex-mayorga commented 6 years ago

¡Hola @tues!

FYI this is now working for me on Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0 ID:20180502220059.

¡Gracias! Alex

lampholder commented 6 years ago

@alex-mayorga glad this is working for you! I think that your two issues were similar in experience but different in cause (I was about to carve out a separate bug for your problem).

@tues have you tried running firefox without extensions? The problem seems to be with a recent performance metric change we made, but it seems strange that it would be affecting just you (unless there were something strange with your browser setup). We're currently looking in to a fix that stops this from happening - a telemetry failure should under no circumstances stop the app from functioning :(

mirrorway commented 6 years ago

Login stuck at the throbber over a white screen:

Successful login:

tues commented 6 years ago

Thank you @lampholder and @mirrorway for looking into this.

I confirm that just disabling privacy.resistFingerprinting in Firefox 59 fixes the issue, although I've lost my private keys anyway and have over 20 new devices :disappointed: Thankfully now there's an option to delete multiple devices at once :smile:

I really hope that you'll find a way to make Riot work despite telemetry failures :slightly_smiling_face:

lampholder commented 6 years ago

Ah, that makes sense!

Yes - we're only just starting to add telemetry; this has been a valuable lesson - I'll enabled the resistFingerprinting stuff on my test machine at work, too.

Thanks, and thanks for your patience :)

tues commented 6 years ago

To be fair, resistFingerprinting is a quite drastic measure, having visible impact on some websites (e.g. time zones may be wrong), but so far I've seen only one website not working at all with this setting enabled (and it was made by a company known for evil practices in general) so it would be really nice to have Riot working even with this setting on.

Thanks again :slightly_smiling_face:

herbsmn commented 6 years ago

It doesn't seem as though Tails OS users are able to use riot with the default Tor Browser Bundle due to this resistFingerprinting issue. I've never had a problem using any other webpage due to this. Would love to see this fixed.

lampholder commented 6 years ago

We've made a change that stops Riot from breaking when it can't access the performance object - it's currently live on https://riot.im/staging - if you get a chance could you try it out and let me know how you get on?

herbsmn commented 6 years ago

Yes, this staging site is working for me with Tor Browser on Tails. Thanks!

tues commented 6 years ago

I can confirm: it's working in Firefox with resistFingerprinting enabled :slightly_smiling_face: Thank you very much!