Skip to content

Mjolnirs Native Encryption Doesn't Support v12 (Management) Rooms #641

@june128

Description

@june128

When switching our deployment from mjolnir on NixOS using pantalaimon to mjolnir on Docker using the new native encryption backend, I noticed that mjolnir would refuse to start up. Investigation showed that the problem lies in our management room being room version 12, indicating that the native encryption backend doesn't support that room version.
Workaround of using a v11 management room worked.

Here are some of the logs:

mjolnir-1  | Wed, 11 Feb 2026 00:20:28 GMT [DEBUG] [MatrixHttpClient] (REQ-175) GET https://matrix.hamburg.ccc.de/_matrix/client/v3/rooms/<some v12 room id>/state/m.room.power_levels/
mjolnir-1  | Wed, 11 Feb 2026 00:20:28 GMT [DEBUG] [MatrixHttpClient] (REQ-176) GET https://matrix.hamburg.ccc.de/_matrix/client/v3/rooms/<some v12 room id>/state/m.room.create/
mjolnir-1  | Wed, 11 Feb 2026 00:20:28 GMT [DEBUG] [MatrixHttpClient] (REQ-177) GET https://matrix.hamburg.ccc.de/_matrix/client/v3/rooms/<management room v12 room id>/members
mjolnir-1  | Wed, 11 Feb 2026 00:20:28 GMT [DEBUG] [MatrixHttpClient] (REQ-178) GET https://matrix.hamburg.ccc.de/_matrix/client/v3/rooms/<management room v12 room id>/members
mjolnir-1  | Wed, 11 Feb 2026 00:20:28 GMT [ERROR] [Mjolnir] Error during startup:
mjolnir-1  | Wed, 11 Feb 2026 00:20:28 GMT [ERROR] [Mjolnir] Error: Room ID does not have a valid server_name
mjolnir-1  |     at /node_modules/@vector-im/matrix-bot-sdk/lib/e2ee/RustEngine.js:143:62
mjolnir-1  |     at /node_modules/async-lock/lib/index.js:171:12
mjolnir-1  |     at AsyncLock._promiseTry (/node_modules/async-lock/lib/index.js:306:31)
mjolnir-1  |     at exec (/node_modules/async-lock/lib/index.js:170:9)
mjolnir-1  |     at AsyncLock.acquire (/node_modules/async-lock/lib/index.js:189:3)
mjolnir-1  |     at RustEngine.prepareEncrypt (/node_modules/@vector-im/matrix-bot-sdk/lib/e2ee/RustEngine.js:142:25)
mjolnir-1  |     at async CryptoClient.encryptRoomEvent (/node_modules/@vector-im/matrix-bot-sdk/lib/e2ee/CryptoClient.js:202:9)
mjolnir-1  |     at async MatrixClient.sendEvent (/node_modules/@vector-im/matrix-bot-sdk/lib/MatrixClient.js:1246:23)
mjolnir-1  |     at async descriptor.value (/node_modules/@vector-im/matrix-bot-sdk/lib/metrics/decorators.js:19:32)
mjolnir-1  |     at async descriptor.value (/node_modules/@vector-im/matrix-bot-sdk/lib/metrics/decorators.js:19:32) {
mjolnir-1  |   code: 'GenericFailure'
mjolnir-1  | }
mjolnir-1  | Wed, 11 Feb 2026 00:20:28 GMT [INFO] [Mjolnir] Stopping Mjolnir...
mjolnir-1  | Wed, 11 Feb 2026 00:20:28 GMT [DEBUG] [MatrixHttpClient] (REQ-179) GET https://matrix.hamburg.ccc.de/_matrix/client/v3/rooms/<management room v12 room id>/state/m.room.canonical_alias/
mjolnir-1  | Wed, 11 Feb 2026 00:20:28 GMT [DEBUG] [MatrixHttpClient] (REQ-180) GET https://matrix.hamburg.ccc.de/_matrix/client/v3/rooms/<management room v12 room id>/members
mjolnir-1  | Wed, 11 Feb 2026 00:20:28 GMT [DEBUG] [MatrixHttpClient] (REQ-181) GET https://matrix.hamburg.ccc.de/_matrix/client/v3/rooms/<management room v12 room id>/members
mjolnir-1  | Wed, 11 Feb 2026 00:20:28 GMT [ERROR] [Mjolnir@startup] Startup failed due to error - see console
mjolnir-1  | Mjolnir failed to start: Error: Room ID does not have a valid server_name
mjolnir-1  | node:internal/process/promises:391
mjolnir-1  |     triggerUncaughtException(err, true /* fromPromise */);
mjolnir-1  |     ^
mjolnir-1  | 
mjolnir-1  | Error: Room ID does not have a valid server_name
mjolnir-1  |     at /node_modules/@vector-im/matrix-bot-sdk/lib/e2ee/RustEngine.js:143:62
mjolnir-1  |     at /node_modules/async-lock/lib/index.js:171:12
mjolnir-1  |     at AsyncLock._promiseTry (/node_modules/async-lock/lib/index.js:306:31)
mjolnir-1  |     at exec (/node_modules/async-lock/lib/index.js:170:9)
mjolnir-1  |     at AsyncLock.acquire (/node_modules/async-lock/lib/index.js:189:3)
mjolnir-1  |     at RustEngine.prepareEncrypt (/node_modules/@vector-im/matrix-bot-sdk/lib/e2ee/RustEngine.js:142:25)
mjolnir-1  |     at async CryptoClient.encryptRoomEvent (/node_modules/@vector-im/matrix-bot-sdk/lib/e2ee/CryptoClient.js:202:9)
mjolnir-1  |     at async MatrixClient.sendEvent (/node_modules/@vector-im/matrix-bot-sdk/lib/MatrixClient.js:1246:23)
mjolnir-1  |     at async descriptor.value (/node_modules/@vector-im/matrix-bot-sdk/lib/metrics/decorators.js:19:32)
mjolnir-1  |     at async descriptor.value (/node_modules/@vector-im/matrix-bot-sdk/lib/metrics/decorators.js:19:32) {
mjolnir-1  |   code: 'GenericFailure'
mjolnir-1  | }
mjolnir-1  | 
mjolnir-1  | Node.js v20.19.4
  • I also noticed that mention forwarding doesn't work in v12 rooms. I don't know, if this worked before, but it might be affected by the native crypto as well.
  • Mention spam protection also doesn't work at all (neither in a v12 nor in a v10 room I tested), tho that worked with the old crypto before.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions