ulyssa / iamb

A Matrix client for Vim addicts
https://iamb.chat
Apache License 2.0
608 stars 45 forks source link

Login fails after :logout #298

Open kopperi opened 3 months ago

kopperi commented 3 months ago

After issuing :logout <user>:>server>, logging back in fails with following error after password is inserted.

$ iamb
* Logging in for @XXXXX:matrix.org...
Please select login type: [p]assword / [s]ingle sign on
p
Password:
Failed to login: Matrix client error: failed to read or write to the crypto store the account in the store doesn't match the account in the constructor: expected @XXXXX:matrix.org:EW........, got @XXXXX:matrix.org:TK........
Please select login type: [p]assword / [s]ingle sign on
^C

It seems that one workaround is to remove .sqlite3* files under /local/share/iamb/profiles/user/sqlitedir.

$ pwd
/home/<user>/.local/share/iamb/profiles/user/sqlite
$ rm *.sqlite3*
$ iamb
* Logging in for @kopperi:matrix.org...
Please select login type: [p]assword / [s]ingle sign on
p
Password:
* Successfully logged in!
* Syncing...
* ...

Used versions of iamb and rustc used to compile it, on Debian 12 Bookwarm host.

 $ iamb --version
iamb 0.0.9 (VERGEN_IDEMPOTENT_OUTPUT)

$ rustc --version
rustc 1.78.0 (9b00956e5 2024-04-29)

Please advise on any other logs or debug info you may need.

EDIT: Issue at matrix-org seems similar https://github.com/matrix-org/matrix-rust-sdk/issues/3270