You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 15, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 15, 2026. It is now read-only.
[BUG] After setting up access token, the bot is unable to find correct session id in decryption #48
Thanks for the great library. I have a problem when switching to the access token
Describe the bug
The bot worked fine with the password. After switching to the access token I have the error "Error decrypting megolm event, no session found with session id XXXXX".
Switching back to the password, the bot seems to still be broken with the same error.
Changing the device_id and using the password again makes the bot functional again.
To Reproduce
Create a ping bot. use niocli to generate the access token. Join a room with the bot and try to use the ping command. The error is then:
Received a undecryptable Megolm event from a device with no Olm sessions: @account:homeserver SOMESESSIONVALUEError decrypting megolm event, no session found with session id LONGIDSESSION for room !ROOMNAME:homeserver
Expected behavior
The bot should behave the same with the access token and the password.
How are you getting the access token? To use an E2EE-ready access token, you need to use niocli get-access-token or call /login on the API manually. Tokens fetched from another client, like Element, will already have crypto initialised, so can't be re-used.
It is in the root folder of the python repo I am using at the moment. I'm not using any sort of container for now.
It is very odd indeed, I don't know if the fact that I am using a beeper account to send the message matters. I also have tried using an account on matrix.org and got a similar result
Okay so just to confirm, running niocli get-access-token to get a fresh access token, and then using both the access token and device ID it produces, it still isn't able to decrypt?
Yeah exactly. I have a bot that works with the password. I switch to access_token in the run and I get an access token with niocli and it is unable to decrypt.
Thanks for the great library. I have a problem when switching to the access token
Describe the bug
The bot worked fine with the password. After switching to the access token I have the error "Error decrypting megolm event, no session found with session id XXXXX".
Switching back to the password, the bot seems to still be broken with the same error.
Changing the
device_idand using the password again makes the bot functional again.To Reproduce
Create a ping bot. use niocli to generate the access token. Join a room with the bot and try to use the ping command. The error is then:
Expected behavior
The bot should behave the same with the access token and the password.