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

encryption.use should default to false (mjolnir 1.8.2) #534

Closed
MichaelSasser opened this issue Oct 3, 2024 · 1 comment · Fixed by #535
Closed

encryption.use should default to false (mjolnir 1.8.2) #534

MichaelSasser opened this issue Oct 3, 2024 · 1 comment · Fixed by #535

Comments

@MichaelSasser
Copy link

This is a followup to #531 (Unknown login type m.login.password since 1.8.0) and the fix #533 (Support non-password based login).

After upgrading from 1.7.0 to 1.8.2, the bot crashed just as before in #531, giving me back the same error message. But this time I was able to get it back up and running by setting encryption.use: false.

Logs
Oct 03 20:48:24 selene systemd[1]: Starting matrix-bot-mjolnir.service - Matrix Mjolnir bot...
Oct 03 20:48:24 selene systemd[1]: Started matrix-bot-mjolnir.service - Matrix Mjolnir bot.
Oct 03 20:48:26 selene matrix-bot-mjolnir[1888723]: 2024-10-03 18:48:26.963264: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneA>
Oct 03 20:48:26 selene matrix-bot-mjolnir[1888723]: To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
Oct 03 20:48:26 selene matrix-bot-mjolnir[1888723]: Thu, 03 Oct 2024 18:48:26 GMT [INFO] [index] Starting bot...
Oct 03 20:48:27 selene matrix-bot-mjolnir[1888723]: Thu, 03 Oct 2024 18:48:27 GMT [INFO] [Healthz] Listening for health requests on 0.0.0.0:8080
Oct 03 20:48:27 selene matrix-bot-mjolnir[1888723]: Thu, 03 Oct 2024 18:48:27 GMT [ERROR] [MatrixHttpClient] (REQ-1) { errcode: 'M_UNKNOWN', error: 'Unknown login type m.login.pa>
Oct 03 20:48:27 selene matrix-bot-mjolnir[1888723]: Failed to setup mjolnir from the config /data: Error: M_UNKNOWN: Unknown login type m.login.password
Oct 03 20:48:27 selene matrix-bot-mjolnir[1888723]: /node_modules/@vector-im/matrix-bot-sdk/lib/http.js:10
Oct 03 20:48:27 selene matrix-bot-mjolnir[1888723]:         new MatrixError_1.MatrixError(errBody, response.statusCode, response.headers) : undefined;
Oct 03 20:48:27 selene matrix-bot-mjolnir[1888723]:         ^
Oct 03 20:48:27 selene matrix-bot-mjolnir[1888723]: MatrixError: M_UNKNOWN: Unknown login type m.login.password
Oct 03 20:48:27 selene matrix-bot-mjolnir[1888723]:     at Object.defaultErrorHandler [as errorHandler] (/node_modules/@vector-im/matrix-bot-sdk/lib/http.js:10:9)
Oct 03 20:48:27 selene matrix-bot-mjolnir[1888723]:     at doHttpRequest (/node_modules/@vector-im/matrix-bot-sdk/lib/http.js:98:31)
Oct 03 20:48:27 selene matrix-bot-mjolnir[1888723]:     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Oct 03 20:48:27 selene matrix-bot-mjolnir[1888723]:     at async descriptor.value (/node_modules/@vector-im/matrix-bot-sdk/lib/metrics/decorators.js:19:32)
Oct 03 20:48:27 selene matrix-bot-mjolnir[1888723]:     at async MatrixAuth.passwordLogin (/node_modules/@vector-im/matrix-bot-sdk/lib/MatrixAuth.js:114:26)
Oct 03 20:48:27 selene matrix-bot-mjolnir[1888723]:     at async /mjolnir/index.js:85:36 {
Oct 03 20:48:27 selene matrix-bot-mjolnir[1888723]:   body: {
Oct 03 20:48:27 selene matrix-bot-mjolnir[1888723]:     errcode: 'M_UNKNOWN',
Oct 03 20:48:27 selene matrix-bot-mjolnir[1888723]:     error: 'Unknown login type m.login.password'
Oct 03 20:48:27 selene matrix-bot-mjolnir[1888723]:   },
Oct 03 20:48:27 selene matrix-bot-mjolnir[1888723]:   statusCode: 400,
Oct 03 20:48:27 selene matrix-bot-mjolnir[1888723]:   errcode: 'M_UNKNOWN',
Oct 03 20:48:27 selene matrix-bot-mjolnir[1888723]:   error: 'Unknown login type m.login.password',
Oct 03 20:48:27 selene matrix-bot-mjolnir[1888723]:   retryAfterMs: undefined
Oct 03 20:48:27 selene matrix-bot-mjolnir[1888723]: }
Oct 03 20:48:27 selene matrix-bot-mjolnir[1888723]: Node.js v20.17.0
Oct 03 20:48:27 selene systemd[1]: matrix-bot-mjolnir.service: Main process exited, code=exited, status=1/FAILURE

Making encryption.use: false the default would resolve this issue.

Also in this regard, the UX could be improved by handling the case where a user might set encryption.use: true but did not configure encryption.username or encryption.password. A brief error message should suffice.

@FSG-Cat
Copy link

FSG-Cat commented Oct 3, 2024

This issue is clearly describing a forwards compatibility break in the configuration.

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

Successfully merging a pull request may close this issue.

2 participants