element-hq / element-web

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

Improve error handling when login is not working #22859

Closed pedro-nonfree closed 2 years ago

pedro-nonfree commented 2 years ago

Steps to reproduce

Synapse server had a problem of no space left (check out annex 1 to see how was in logs) (EDIT: no space left problem is unrelated to this database problem, see #167), but for me it was difficult to determine that the problem was in the server, I thought it was the client. The errors shown:

image

after pressing OK stays syncing indefinitely, and that's confusing:

image

look the javascript errors at annex 2

hydrogen.element.io did better error handling, they said:

Something went wrong: Invalid access token passed. on POST https://matrix.example.com/_matrix/client/r0/keys/upload?.

image

and in detail:

                    "name": "HomeServerError",
                    "message": "Invalid access token passed. on POST https://matrix.guifi.net/_matrix/client/r0/keys/upload?"

then I realized, oh, so this is really a homeserver error

annex 1: the synapse error

2022-07-15 14:19:40,194 - synapse.storage.database - 803 - WARNING - sentinel - Starting db txn 'add_access_token_to_user' from sentinel context
2022-07-15 14:19:40,280 - synapse.api.auth - 450 - WARNING - GET-472531 - Invalid access token in auth: <class 'pymacaroons.exceptions.MacaroonDeserializationException'> cannot determine data format of binary-encoded macaroon.
2022-07-15 14:19:40,280 - synapse.http.server - 167 - INFO - GET-472531 - <SynapseRequest at 0x7f024d753d30 method='GET' uri='/_matrix/client/unstable/org.matrix.msc2697.v2/dehydrated_device?&_cacheBuster=6499453651040419' clientproto='HTTP/1.0' site='8008'> SynapseError: 401 - Invalid access token passed.
2022-07-15 14:19:40,455 - synapse.api.auth - 450 - WARNING - POST-472533 - Invalid access token in auth: <class 'pymacaroons.exceptions.MacaroonDeserializationException'> cannot determine data format of binary-encoded macaroon.
2022-07-15 14:19:40,455 - synapse.http.server - 167 - INFO - POST-472533 - <SynapseRequest at 0x7f027074aee0 method='POST' uri='/_matrix/client/r0/keys/upload?' clientproto='HTTP/1.0' site='8008'> SynapseError: 401 - Invalid access token passed.

annex 2: the javascript error

posted here because is very long

Initialised rageshake.
rageshake.ts:73 To fix line numbers in Chrome: Meatball menu → Settings → Ignore list → Add /rageshake\.js$
rageshake.ts:73 Using Web platform
rageshake.ts:73 wasm streaming compile failed: TypeError: Failed to execute 'compile' on 'WebAssembly': Incorrect response MIME type. Expected 'application/wasm'.
e.<computed> @ rageshake.ts:73
rageshake.ts:73 falling back to ArrayBuffer instantiation
e.<computed> @ rageshake.ts:73
rageshake.ts:73 Using WebAssembly Olm
/config.element.example.com.json?cachebuster=1657888236177:1          Failed to load resource: the server responded with a status of 404 ()
rageshake.ts:73 Configuring rageshake persistence...
2rageshake.ts:73 returning explicit theme: light
rageshake.ts:73 set language to en
rageshake.ts:73 Application is running in production mode
rageshake.ts:73 Vector starting at https://element.example.com/
rageshake.ts:73 startUpdater, current version is 1.11.0
rageshake.ts:73 Verifying homeserver configuration
rageshake.ts:73 Config uses a default_server_config - validating object
rageshake.ts:73 No update available, already on 1.11.0
rageshake.ts:73 Using homeserver config: u
rageshake.ts:73 Updating SdkConfig with validated discovery information
rageshake.ts:73 returning explicit theme: light
rageshake.ts:73 newscreen login
rageshake.ts:73 Skipping flow Object due to unsupported login type m.login.application_service
DevTools failed to load source map: Could not load content for chrome-extension://cdcoopnlkdlmphjpjggdmhohkiklonkh/lib/webextension-polyfill/dist/browser-polyfill.min.js.map: System error: net::ERR_BLOCKED_BY_CLIENT
rageshake.ts:73 Overrode homeserver setting with https://matrix.example.com/ from login response
rageshake.ts:73 Created pickle key
rageshake.ts:73 setLoggedIn: mxid: @myuser:matrix.example.com deviceId: VCDAYDPRDY guest: false hs: https://matrix.example.com/ softLogout: false  freshLogin: true
rageshake.ts:73 Removing indexeddb instance: matrix-js-sdk:crypto
rageshake.ts:73 Removed indexeddb instance: matrix-js-sdk:crypto
rageshake.ts:73 IndexedDB worker is ready
logger.ts:52 Removing indexeddb instance: matrix-js-sdk:riot-web-sync
logger.ts:52 Removed indexeddb instance: matrix-js-sdk:riot-web-sync
rageshake.ts:73 Deleted indexeddb data.
rageshake.ts:73 StorageManager: Checking storage consistency
rageshake.ts:73 StorageManager: Local storage supported? true
rageshake.ts:73 StorageManager: IndexedDB supported? true
rageshake.ts:73 StorageManager: Local storage contains data? false
rageshake.ts:73 StorageManager: Crypto initialised? false
rageshake.ts:73 StorageManager: Sync store using IndexedDB contains data? false
rageshake.ts:73 StorageManager: Crypto store using IndexedDB contains data? false
rageshake.ts:73 StorageManager: Storage consistency checks passed
rageshake.ts:73 Session persisted for @myuser:matrix.example.com
rageshake.ts:73 Lifecycle: Starting MatrixClient
rageshake.ts:73 EventIndex: Platform doesn't support event indexing, not initializing.
rageshake.ts:73 IndexedDBStore.startup: connecting to backend
rageshake.ts:73 MatrixClientPeg: waiting for MatrixClient store to initialise
rageshake.ts:73 IndexedDB worker is ready
logger.ts:52 LocalIndexedDBStoreBackend.connect: connecting...
logger.ts:52 LocalIndexedDBStoreBackend.connect: awaiting connection...
index.js:218          GET https://matrix.example.com/_matrix/client/r0/thirdparty/protocols 401
(anonymous) @ index.js:218
t @ index.js:179
(anonymous) @ browser-index.js:34
doRequest @ http-api.ts:849
requestOtherUrl @ http-api.ts:724
request @ http-api.ts:676
authedRequest @ http-api.ts:620
getThirdpartyProtocols @ client.ts:8728
checkProtocols @ CallHandler.tsx:223
start @ CallHandler.tsx:176
ue @ Lifecycle.ts:806
ie @ Lifecycle.ts:634
await in ie (async)
ae @ Lifecycle.ts:513
await in ae (async)
(anonymous) @ MatrixChat.tsx:1863
(anonymous) @ Login.tsx:205
Promise.then (async)
(anonymous) @ Login.tsx:203
(anonymous) @ PasswordLogin.tsx:117
await in (anonymous) (async)
qe @ react-dom.production.min.js:52
Ye @ react-dom.production.min.js:52
(anonymous) @ react-dom.production.min.js:53
wr @ react-dom.production.min.js:100
xr @ react-dom.production.min.js:101
(anonymous) @ react-dom.production.min.js:113
Me @ react-dom.production.min.js:292
(anonymous) @ react-dom.production.min.js:50
Or @ react-dom.production.min.js:105
Xt @ react-dom.production.min.js:75
Zt @ react-dom.production.min.js:74
t.unstable_runWithPriority @ scheduler.production.min.js:18
zi @ react-dom.production.min.js:122
Ie @ react-dom.production.min.js:292
$t @ react-dom.production.min.js:73
logger.ts:52 LocalIndexedDBStoreBackend.connect: upgrading from 0
rageshake.ts:73 Failed to check for protocol support: will retry M_UNKNOWN_TOKEN: Invalid access token passed.
    at w (https://element.example.com/bundles/3021093bbd74213f659a/vendors~init.js:2:875615)
    at https://element.example.com/bundles/3021093bbd74213f659a/vendors~init.js:2:875018
    at Object.callback (https://element.example.com/bundles/3021093bbd74213f659a/vendors~init.js:2:874581)
    at https://element.example.com/bundles/3021093bbd74213f659a/vendors~init.js:2:11897
    at i.onreadystatechange (https://element.example.com/bundles/3021093bbd74213f659a/vendors~init.js:2:11921)
rageshake.ts:73 Starting load of AsyncWrapper for modal
logger.ts:52 LocalIndexedDBStoreBackend.connect: connected
logger.ts:52 LocalIndexedDBStoreBackend: loading account data...
logger.ts:52 LocalIndexedDBStoreBackend: loading sync data...
logger.ts:52 LocalIndexedDBStoreBackend: loaded account data
logger.ts:52 LocalIndexedDBStoreBackend: loaded sync data
logger.ts:52 LocalIndexedDBStoreBackend: loaded initial data
rageshake.ts:73 IndexedDBStore.startup: loading presence events
rageshake.ts:73 IndexedDBStore.startup: processing presence events
rageshake.ts:73 Crypto: Starting up crypto store...
rageshake.ts:73 connecting to indexeddb matrix-js-sdk:crypto
rageshake.ts:73 Upgrading IndexedDBCryptoStore from version 0 to 10
rageshake.ts:73 connected to indexeddb matrix-js-sdk:crypto
rageshake.ts:73 Crypto: initialising roomlist...
rageshake.ts:73 Crypto: initialising crypto object...
rageshake.ts:73 Crypto: initialising Olm...
rageshake.ts:73 Crypto: initialising Olm device...
rageshake.ts:73 Crypto: loading device list...
rageshake.ts:73 Crypto: fetching own devices...
rageshake.ts:73 Crypto: adding this device to the store...
rageshake.ts:73 Now tracking device list for @myuser:matrix.example.com
rageshake.ts:73 Crypto: checking for key backup...
rageshake.ts:73 Checking key backup status...
rageshake.ts:73 MatrixClientPeg: really starting MatrixClient
rageshake.ts:73 Fetching new TURN credentials
index.js:218          POST https://matrix.example.com/_matrix/client/r0/logout 401
(anonymous) @ index.js:218
t @ index.js:179
(anonymous) @ browser-index.js:34
doRequest @ http-api.ts:849
requestOtherUrl @ http-api.ts:724
request @ http-api.ts:676
authedRequest @ http-api.ts:620
logout @ client.ts:7130
le @ Lifecycle.ts:739
(anonymous) @ MatrixChat.tsx:572
e._invokeCallback @ Dispatcher.js:198
e.dispatch @ Dispatcher.js:174
setTimeout (async)
dispatch @ dispatcher.ts:52
(anonymous) @ MatrixChat.tsx:1419
s.emit @ events.js:158
emit @ typed-event-emitter.ts:61
(anonymous) @ http-api.ts:624
Promise.catch (async)
authedRequest @ http-api.ts:622
getThirdpartyProtocols @ client.ts:8728
checkProtocols @ CallHandler.tsx:223
start @ CallHandler.tsx:176
ue @ Lifecycle.ts:806
ie @ Lifecycle.ts:634
await in ie (async)
ae @ Lifecycle.ts:513
await in ae (async)
(anonymous) @ MatrixChat.tsx:1863
(anonymous) @ Login.tsx:205
Promise.then (async)
(anonymous) @ Login.tsx:203
(anonymous) @ PasswordLogin.tsx:117
await in (anonymous) (async)
qe @ react-dom.production.min.js:52
Ye @ react-dom.production.min.js:52
(anonymous) @ react-dom.production.min.js:53
wr @ react-dom.production.min.js:100
xr @ react-dom.production.min.js:101
(anonymous) @ react-dom.production.min.js:113
Me @ react-dom.production.min.js:292
(anonymous) @ react-dom.production.min.js:50
Or @ react-dom.production.min.js:105
Xt @ react-dom.production.min.js:75
Zt @ react-dom.production.min.js:74
t.unstable_runWithPriority @ scheduler.production.min.js:18
zi @ react-dom.production.min.js:122
Ie @ react-dom.production.min.js:292
$t @ react-dom.production.min.js:73
rageshake.ts:73 Failed to call logout API: token will not be invalidated M_UNKNOWN_TOKEN: Invalid access token passed.
    at w (https://element.example.com/bundles/3021093bbd74213f659a/vendors~init.js:2:875615)
    at https://element.example.com/bundles/3021093bbd74213f659a/vendors~init.js:2:875018
    at Object.callback (https://element.example.com/bundles/3021093bbd74213f659a/vendors~init.js:2:874581)
    at https://element.example.com/bundles/3021093bbd74213f659a/vendors~init.js:2:11897
    at i.onreadystatechange (https://element.example.com/bundles/3021093bbd74213f659a/vendors~init.js:2:11921)
e.<computed> @ rageshake.ts:73
(anonymous) @ logger.ts:50
(anonymous) @ Lifecycle.ts:747
Promise.then (async)
le @ Lifecycle.ts:739
(anonymous) @ MatrixChat.tsx:572
e._invokeCallback @ Dispatcher.js:198
e.dispatch @ Dispatcher.js:174
setTimeout (async)
dispatch @ dispatcher.ts:52
(anonymous) @ MatrixChat.tsx:1419
s.emit @ events.js:158
emit @ typed-event-emitter.ts:61
(anonymous) @ http-api.ts:624
Promise.catch (async)
authedRequest @ http-api.ts:622
getThirdpartyProtocols @ client.ts:8728
checkProtocols @ CallHandler.tsx:223
start @ CallHandler.tsx:176
ue @ Lifecycle.ts:806
ie @ Lifecycle.ts:634
await in ie (async)
ae @ Lifecycle.ts:513
await in ae (async)
(anonymous) @ MatrixChat.tsx:1863
(anonymous) @ Login.tsx:205
Promise.then (async)
(anonymous) @ Login.tsx:203
(anonymous) @ PasswordLogin.tsx:117
await in (anonymous) (async)
qe @ react-dom.production.min.js:52
Ye @ react-dom.production.min.js:52
(anonymous) @ react-dom.production.min.js:53
wr @ react-dom.production.min.js:100
xr @ react-dom.production.min.js:101
(anonymous) @ react-dom.production.min.js:113
Me @ react-dom.production.min.js:292
(anonymous) @ react-dom.production.min.js:50
Or @ react-dom.production.min.js:105
Xt @ react-dom.production.min.js:75
Zt @ react-dom.production.min.js:74
t.unstable_runWithPriority @ scheduler.production.min.js:18
zi @ react-dom.production.min.js:122
Ie @ react-dom.production.min.js:292
$t @ react-dom.production.min.js:73
rageshake.ts:73 newscreen login
rageshake.ts:73 stopping OutgoingRoomKeyRequestManager
rageshake.ts:73 stopping MatrixClient
rageshake.ts:73 Removing indexeddb instance: matrix-js-sdk:crypto
rageshake.ts:73 versionchange for indexeddb matrix-js-sdk:crypto: closing
rageshake.ts:73 Removed indexeddb instance: matrix-js-sdk:crypto
rageshake.ts:73 Getting saved sync token...
rageshake.ts:73 Getting push rules...
rageshake.ts:73 MatrixClientPeg: MatrixClient started
rageshake.ts:73 Got saved sync token
rageshake.ts:73 Getting saved sync...
DeviceListener.ts:71 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'on')
    at P.start (DeviceListener.ts:71:25)
    at ue (Lifecycle.ts:825:37)
    at async ie (Lifecycle.ts:632:21)
    at async Object.onLoggedIn (MatrixChat.tsx:1860:12)
start @ DeviceListener.ts:71
ue @ Lifecycle.ts:825
await in ue (async)
(anonymous) @ Login.tsx:205
Promise.then (async)
(anonymous) @ Login.tsx:203
(anonymous) @ PasswordLogin.tsx:117
await in (anonymous) (async)
qe @ react-dom.production.min.js:52
Ye @ react-dom.production.min.js:52
(anonymous) @ react-dom.production.min.js:53
wr @ react-dom.production.min.js:100
xr @ react-dom.production.min.js:101
(anonymous) @ react-dom.production.min.js:113
Me @ react-dom.production.min.js:292
(anonymous) @ react-dom.production.min.js:50
Or @ react-dom.production.min.js:105
Xt @ react-dom.production.min.js:75
Zt @ react-dom.production.min.js:74
t.unstable_runWithPriority @ scheduler.production.min.js:18
zi @ react-dom.production.min.js:122
Ie @ react-dom.production.min.js:292
$t @ react-dom.production.min.js:73
index.js:218          GET https://matrix.example.com/_matrix/client/unstable/room_keys/version 401
(anonymous) @ index.js:218
t @ index.js:179
(anonymous) @ browser-index.js:34
doRequest @ http-api.ts:849
requestOtherUrl @ http-api.ts:724
request @ http-api.ts:676
authedRequest @ http-api.ts:620
getKeyBackupVersion @ client.ts:2608
checkAndStart @ backup.ts:226
init @ index.ts:502
await in init (async)
initCrypto @ client.ts:1695
await in initCrypto (async)
assign @ MatrixClientPeg.ts:200
await in assign (async)
start @ MatrixClientPeg.ts:232
ue @ Lifecycle.ts:818
await in ue (async)
ie @ Lifecycle.ts:634
await in ie (async)
ae @ Lifecycle.ts:513
await in ae (async)
(anonymous) @ MatrixChat.tsx:1863
(anonymous) @ Login.tsx:205
Promise.then (async)
(anonymous) @ Login.tsx:203
(anonymous) @ PasswordLogin.tsx:117
await in (anonymous) (async)
qe @ react-dom.production.min.js:52
Ye @ react-dom.production.min.js:52
(anonymous) @ react-dom.production.min.js:53
wr @ react-dom.production.min.js:100
xr @ react-dom.production.min.js:101
(anonymous) @ react-dom.production.min.js:113
Me @ react-dom.production.min.js:292
(anonymous) @ react-dom.production.min.js:50
Or @ react-dom.production.min.js:105
Xt @ react-dom.production.min.js:75
Zt @ react-dom.production.min.js:74
t.unstable_runWithPriority @ scheduler.production.min.js:18
zi @ react-dom.production.min.js:122
Ie @ react-dom.production.min.js:292
$t @ react-dom.production.min.js:73
rageshake.ts:73 Got reply from saved sync, exists? false
rageshake.ts:73 Error checking for active key backup M_UNKNOWN_TOKEN: Invalid access token passed.
    at w (https://element.example.com/bundles/3021093bbd74213f659a/vendors~init.js:2:875615)
    at https://element.example.com/bundles/3021093bbd74213f659a/vendors~init.js:2:875018
    at Object.callback (https://element.example.com/bundles/3021093bbd74213f659a/vendors~init.js:2:874581)
    at https://element.example.com/bundles/3021093bbd74213f659a/vendors~init.js:2:11897
    at i.onreadystatechange (https://element.example.com/bundles/3021093bbd74213f659a/vendors~init.js:2:11921)
index.js:218          GET https://matrix.example.com/_matrix/client/r0/voip/turnServer 401
(anonymous) @ index.js:218
t @ index.js:179
(anonymous) @ browser-index.js:34
doRequest @ http-api.ts:849
requestOtherUrl @ http-api.ts:724
request @ http-api.ts:676
authedRequest @ http-api.ts:620
turnServer @ client.ts:6275
checkTurnServers @ client.ts:6309
startClient @ client.ts:1157
start @ MatrixClientPeg.ts:235
await in start (async)
ue @ Lifecycle.ts:818
await in ue (async)
ie @ Lifecycle.ts:634
await in ie (async)
ae @ Lifecycle.ts:513
await in ae (async)
(anonymous) @ MatrixChat.tsx:1863
(anonymous) @ Login.tsx:205
Promise.then (async)
(anonymous) @ Login.tsx:203
(anonymous) @ PasswordLogin.tsx:117
await in (anonymous) (async)
qe @ react-dom.production.min.js:52
Ye @ react-dom.production.min.js:52
(anonymous) @ react-dom.production.min.js:53
wr @ react-dom.production.min.js:100
xr @ react-dom.production.min.js:101
(anonymous) @ react-dom.production.min.js:113
Me @ react-dom.production.min.js:292
(anonymous) @ react-dom.production.min.js:50
Or @ react-dom.production.min.js:105
Xt @ react-dom.production.min.js:75
Zt @ react-dom.production.min.js:74
t.unstable_runWithPriority @ scheduler.production.min.js:18
zi @ react-dom.production.min.js:122
Ie @ react-dom.production.min.js:292
$t @ react-dom.production.min.js:73
rageshake.ts:73 Failed to get TURN URIs M_UNKNOWN_TOKEN: Invalid access token passed.
    at w (https://element.example.com/bundles/3021093bbd74213f659a/vendors~init.js:2:875615)
    at https://element.example.com/bundles/3021093bbd74213f659a/vendors~init.js:2:875018
    at Object.callback (https://element.example.com/bundles/3021093bbd74213f659a/vendors~init.js:2:874581)
    at https://element.example.com/bundles/3021093bbd74213f659a/vendors~init.js:2:11897
    at i.onreadystatechange (https://element.example.com/bundles/3021093bbd74213f659a/vendors~init.js:2:11921)
e.<computed> @ rageshake.ts:73
(anonymous) @ logger.ts:50
checkTurnServers @ client.ts:6324
await in checkTurnServers (async)
startClient @ client.ts:1157
start @ MatrixClientPeg.ts:235
await in start (async)
ue @ Lifecycle.ts:818
await in ue (async)
ie @ Lifecycle.ts:634
await in ie (async)
ae @ Lifecycle.ts:513
await in ae (async)
(anonymous) @ MatrixChat.tsx:1863
(anonymous) @ Login.tsx:205
Promise.then (async)
(anonymous) @ Login.tsx:203
(anonymous) @ PasswordLogin.tsx:117
await in (anonymous) (async)
qe @ react-dom.production.min.js:52
Ye @ react-dom.production.min.js:52
(anonymous) @ react-dom.production.min.js:53
wr @ react-dom.production.min.js:100
xr @ react-dom.production.min.js:101
(anonymous) @ react-dom.production.min.js:113
Me @ react-dom.production.min.js:292
(anonymous) @ react-dom.production.min.js:50
Or @ react-dom.production.min.js:105
Xt @ react-dom.production.min.js:75
Zt @ react-dom.production.min.js:74
t.unstable_runWithPriority @ scheduler.production.min.js:18
zi @ react-dom.production.min.js:122
Ie @ react-dom.production.min.js:292
$t @ react-dom.production.min.js:73
index.js:218          POST https://matrix.example.com/_matrix/client/r0/keys/upload 401
(anonymous) @ index.js:218
t @ index.js:179
(anonymous) @ browser-index.js:34
doRequest @ http-api.ts:849
requestOtherUrl @ http-api.ts:724
request @ http-api.ts:676
authedRequest @ http-api.ts:620
uploadKeysRequest @ client.ts:8184
(anonymous) @ index.ts:1830
Promise.then (async)
uploadDeviceKeys @ index.ts:1829
startClient @ client.ts:1147
start @ MatrixClientPeg.ts:235
await in start (async)
ue @ Lifecycle.ts:818
await in ue (async)
ie @ Lifecycle.ts:634
await in ie (async)
ae @ Lifecycle.ts:513
await in ae (async)
(anonymous) @ MatrixChat.tsx:1863
(anonymous) @ Login.tsx:205
Promise.then (async)
(anonymous) @ Login.tsx:203
(anonymous) @ PasswordLogin.tsx:117
await in (anonymous) (async)
qe @ react-dom.production.min.js:52
Ye @ react-dom.production.min.js:52
(anonymous) @ react-dom.production.min.js:53
wr @ react-dom.production.min.js:100
xr @ react-dom.production.min.js:101
(anonymous) @ react-dom.production.min.js:113
Me @ react-dom.production.min.js:292
(anonymous) @ react-dom.production.min.js:50
Or @ react-dom.production.min.js:105
Xt @ react-dom.production.min.js:75
Zt @ react-dom.production.min.js:74
t.unstable_runWithPriority @ scheduler.production.min.js:18
zi @ react-dom.production.min.js:122
Ie @ react-dom.production.min.js:292
$t @ react-dom.production.min.js:73
http-api.ts:1005 Uncaught (in promise) M_UNKNOWN_TOKEN: Invalid access token passed.
    at w (https://element.example.com/bundles/3021093bbd74213f659a/vendors~init.js:2:875615)
    at https://element.example.com/bundles/3021093bbd74213f659a/vendors~init.js:2:875018
    at Object.callback (https://element.example.com/bundles/3021093bbd74213f659a/vendors~init.js:2:874581)
    at https://element.example.com/bundles/3021093bbd74213f659a/vendors~init.js:2:11897
    at i.onreadystatechange (https://element.example.com/bundles/3021093bbd74213f659a/vendors~init.js:2:11921)
w @ http-api.ts:1005
(anonymous) @ http-api.ts:955
(anonymous) @ http-api.ts:872
(anonymous) @ index.js:294
i.onreadystatechange @ index.js:244
XMLHttpRequest.send (async)
(anonymous) @ index.js:218
t @ index.js:179
(anonymous) @ browser-index.js:34
doRequest @ http-api.ts:849
requestOtherUrl @ http-api.ts:724
request @ http-api.ts:676
authedRequest @ http-api.ts:620
uploadKeysRequest @ client.ts:8184
(anonymous) @ index.ts:1830
Promise.then (async)
uploadDeviceKeys @ index.ts:1829
startClient @ client.ts:1147
start @ MatrixClientPeg.ts:235
await in start (async)
ue @ Lifecycle.ts:818
await in ue (async)
ie @ Lifecycle.ts:634
await in ie (async)
ae @ Lifecycle.ts:513
await in ae (async)
(anonymous) @ MatrixChat.tsx:1863
(anonymous) @ Login.tsx:205
Promise.then (async)
(anonymous) @ Login.tsx:203
(anonymous) @ PasswordLogin.tsx:117
await in (anonymous) (async)
qe @ react-dom.production.min.js:52
Ye @ react-dom.production.min.js:52
(anonymous) @ react-dom.production.min.js:53
wr @ react-dom.production.min.js:100
xr @ react-dom.production.min.js:101
(anonymous) @ react-dom.production.min.js:113
Me @ react-dom.production.min.js:292
(anonymous) @ react-dom.production.min.js:50
Or @ react-dom.production.min.js:105
Xt @ react-dom.production.min.js:75
Zt @ react-dom.production.min.js:74
t.unstable_runWithPriority @ scheduler.production.min.js:18
zi @ react-dom.production.min.js:122
Ie @ react-dom.production.min.js:292
$t @ react-dom.production.min.js:73
/#/login:1 Access to XMLHttpRequest at 'https://matrix.example.com/.well-known/matrix/client' from origin 'https://element.example.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
index.js:218          GET https://matrix.example.com/.well-known/matrix/client net::ERR_FAILED 200
(anonymous) @ index.js:218
t @ index.js:179
(anonymous) @ browser-index.js:34
(anonymous) @ autodiscovery.ts:417
fetchWellKnownObject @ autodiscovery.ts:413
getRawClientConfig @ autodiscovery.ts:354
fetchClientWellKnown @ client.ts:6411
startClient @ client.ts:1191
await in startClient (async)
start @ MatrixClientPeg.ts:235
await in start (async)
ue @ Lifecycle.ts:818
await in ue (async)
ie @ Lifecycle.ts:634
await in ie (async)
ae @ Lifecycle.ts:513
await in ae (async)
(anonymous) @ MatrixChat.tsx:1863
(anonymous) @ Login.tsx:205
Promise.then (async)
(anonymous) @ Login.tsx:203
(anonymous) @ PasswordLogin.tsx:117
await in (anonymous) (async)
qe @ react-dom.production.min.js:52
Ye @ react-dom.production.min.js:52
(anonymous) @ react-dom.production.min.js:53
wr @ react-dom.production.min.js:100
xr @ react-dom.production.min.js:101
(anonymous) @ react-dom.production.min.js:113
Me @ react-dom.production.min.js:292
(anonymous) @ react-dom.production.min.js:50
Or @ react-dom.production.min.js:105
Xt @ react-dom.production.min.js:75
Zt @ react-dom.production.min.js:74
t.unstable_runWithPriority @ scheduler.production.min.js:18
zi @ react-dom.production.min.js:122
Ie @ react-dom.production.min.js:292
$t @ react-dom.production.min.js:73
index.js:218          GET https://matrix.example.com/_matrix/client/r0/pushrules/ 401
(anonymous) @ index.js:218
t @ index.js:179
(anonymous) @ browser-index.js:34
doRequest @ http-api.ts:849
requestOtherUrl @ http-api.ts:724
request @ http-api.ts:676
authedRequest @ http-api.ts:620
getPushRules @ client.ts:8043
i @ sync.ts:643
sync @ sync.ts:781
startClient @ client.ts:1185
await in startClient (async)
start @ MatrixClientPeg.ts:235
await in start (async)
ue @ Lifecycle.ts:818
await in ue (async)
ie @ Lifecycle.ts:634
await in ie (async)
ae @ Lifecycle.ts:513
await in ae (async)
(anonymous) @ MatrixChat.tsx:1863
(anonymous) @ Login.tsx:205
Promise.then (async)
(anonymous) @ Login.tsx:203
(anonymous) @ PasswordLogin.tsx:117
await in (anonymous) (async)
qe @ react-dom.production.min.js:52
Ye @ react-dom.production.min.js:52
(anonymous) @ react-dom.production.min.js:53
wr @ react-dom.production.min.js:100
xr @ react-dom.production.min.js:101
(anonymous) @ react-dom.production.min.js:113
Me @ react-dom.production.min.js:292
(anonymous) @ react-dom.production.min.js:50
Or @ react-dom.production.min.js:105
Xt @ react-dom.production.min.js:75
Zt @ react-dom.production.min.js:74
t.unstable_runWithPriority @ scheduler.production.min.js:18
zi @ react-dom.production.min.js:122
Ie @ react-dom.production.min.js:292
$t @ react-dom.production.min.js:73
rageshake.ts:73 Getting push rules failed M_UNKNOWN_TOKEN: Invalid access token passed.
    at w (https://element.example.com/bundles/3021093bbd74213f659a/vendors~init.js:2:875615)
    at https://element.example.com/bundles/3021093bbd74213f659a/vendors~init.js:2:875018
    at Object.callback (https://element.example.com/bundles/3021093bbd74213f659a/vendors~init.js:2:874581)
    at https://element.example.com/bundles/3021093bbd74213f659a/vendors~init.js:2:11897
    at i.onreadystatechange (https://element.example.com/bundles/3021093bbd74213f659a/vendors~init.js:2:11921)
e.<computed> @ rageshake.ts:73
(anonymous) @ logger.ts:50
i @ sync.ts:648
await in i (async)
sync @ sync.ts:781
startClient @ client.ts:1185
await in startClient (async)
start @ MatrixClientPeg.ts:235
await in start (async)
ue @ Lifecycle.ts:818
await in ue (async)
ie @ Lifecycle.ts:634
await in ie (async)
ae @ Lifecycle.ts:513
await in ae (async)
(anonymous) @ MatrixChat.tsx:1863
(anonymous) @ Login.tsx:205
Promise.then (async)
(anonymous) @ Login.tsx:203
(anonymous) @ PasswordLogin.tsx:117
await in (anonymous) (async)
qe @ react-dom.production.min.js:52
Ye @ react-dom.production.min.js:52
(anonymous) @ react-dom.production.min.js:53
wr @ react-dom.production.min.js:100
xr @ react-dom.production.min.js:101
(anonymous) @ react-dom.production.min.js:113
Me @ react-dom.production.min.js:292
(anonymous) @ react-dom.production.min.js:50
Or @ react-dom.production.min.js:105
Xt @ react-dom.production.min.js:75
Zt @ react-dom.production.min.js:74
t.unstable_runWithPriority @ scheduler.production.min.js:18
zi @ react-dom.production.min.js:122
Ie @ react-dom.production.min.js:292
$t @ react-dom.production.min.js:73
rageshake.ts:73 Token no longer valid - assuming logout
e.<computed> @ rageshake.ts:73
(anonymous) @ logger.ts:50
shouldAbortSync @ sync.ts:609
i @ sync.ts:649
await in i (async)
sync @ sync.ts:781
startClient @ client.ts:1185
await in startClient (async)
start @ MatrixClientPeg.ts:235
await in start (async)
ue @ Lifecycle.ts:818
await in ue (async)
ie @ Lifecycle.ts:634
await in ie (async)
ae @ Lifecycle.ts:513
await in ae (async)
(anonymous) @ MatrixChat.tsx:1863
(anonymous) @ Login.tsx:205
Promise.then (async)
(anonymous) @ Login.tsx:203
(anonymous) @ PasswordLogin.tsx:117
await in (anonymous) (async)
qe @ react-dom.production.min.js:52
Ye @ react-dom.production.min.js:52
(anonymous) @ react-dom.production.min.js:53
wr @ react-dom.production.min.js:100
xr @ react-dom.production.min.js:101
(anonymous) @ react-dom.production.min.js:113
Me @ react-dom.production.min.js:292
(anonymous) @ react-dom.production.min.js:50
Or @ react-dom.production.min.js:105
Xt @ react-dom.production.min.js:75
Zt @ react-dom.production.min.js:74
t.unstable_runWithPriority @ scheduler.production.min.js:18
zi @ react-dom.production.min.js:122
Ie @ react-dom.production.min.js:292
$t @ react-dom.production.min.js:73
rageshake.ts:73 SyncApi.stop
rageshake.ts:73 MatrixClient sync state => ERROR
rageshake.ts:73 IndexedDB worker is ready
logger.ts:52 Removing indexeddb instance: matrix-js-sdk:riot-web-sync
logger.ts:52 Removed indexeddb instance: matrix-js-sdk:riot-web-sync
rageshake.ts:73 Deleted indexeddb data.
rageshake.ts:73 Failed to check for protocol support: will retry TypeError: Cannot read properties of null (reading 'getThirdpartyProtocols')
    at $.checkProtocols (CallHandler.tsx:223:53)
    at CallHandler.tsx:250:26
rageshake.ts:73 Failed to check for protocol support and no retries remain: assuming no support TypeError: Cannot read properties of null (reading 'getThirdpartyProtocols')
    at $.checkProtocols (CallHandler.tsx:223:53)
    at CallHandler.tsx:250:26

Outcome

improve error handling, so when support service looks for the error, require less time what to look at

Operating system

No response

Browser information

No response

URL for webapp

No response

Application version

No response

Homeserver

No response

Will you send logs?

Yes

t3chguy commented 2 years ago

This is a Synapse issue in it not issuing a soft logout, so clients SHOULD be wiping data because this is the same mechanism used for remote deauth (for when your device is stolen and thus should be wiped of keys).

I suggest adding your edge case of disk full to https://github.com/matrix-org/synapse/issues/13203 which is the issue tracking sending soft_logout: true in the default case and only omitting it when the user explicitly asked to deauth that device.

Hydrogen's messaging is more vague which Element tries to avoid as most users don't have a connection to their homeserver admin. If Synapse fixed their behaviour to send soft_logout then you'd be presented with a screen to log in once again (without losing any keys) and that login might fail if your disk is full but it would be with a clear error.

Closing as fundamentally a security position which only Synapse can improve.

pedro-nonfree commented 2 years ago

after freeing the server space problem is still not solved (I thought it was just that), in my case, the user auth is expired matrix-org/synapse#13203 ; then, that user cannot do almost anything

with server error code 401 on path /_matrix/client/r0/thirdparty/protocols

with the following response

{"errcode":"M_UNKNOWN_TOKEN","error":"Invalid access token passed.","soft_logout":false}
pedro-nonfree commented 2 years ago

update: filldisk is unrelated to this, followup of our bug on: https://github.com/matrix-org/matrix-synapse-ldap3/issues/167