I ran out of disk space and I believe I rebooted in a disk full condition in order to lose swap files. After reboot, I get #2996. I'm not sure if #3660 is related or if desktop uses a real file API where you can avoid writing to a file when there is no disk space.
We currently use the localStorage API to store key data; we're about to switch to indexeddb though. Both will likely fail if your disk fills however (although it shouldn't corrupt entirely, it's up to Chromium rather than us). However, once #2286 you should at least be able to re-request the missing keys from other devices (including the sender).
So I guess the same would happen in a browser?
Browser behaviour is to stop accepting new keys because it can't, leading to future messages being unable to decrypt. I've run into this failure mode many times on riot-web.
@turt2live so #2996?
yes, but I'm not sure how desktop behaves, or how the browser behaves when your disk is full tbh.
Assigning a high severity and a low priority to reflect that this is highly disruptive but should be solved by #2286 (rather than taking specific steps to handle diskfill)
I'm tired of waking up to "* Unable to decrypt: InvalidStateError: Failed to execute 'transaction' on 'IDBDatabase': The database connection is closing. **" which means I have to quit Riot, delete all of Riot's files, launch and login again, and ask everyone to resend the messages I missed. Riot taunts me with "Re-request encryption keys from your other devices." but that doesn't work because I don't have another device.
I use my computer and sometimes it runs out of disk space. You have to deal with it. If you are using a broken library you have to patch it or find something else. Nobody cares if Chrome is broken or whatever. All they think is "Riot is shit and so is my friend for convincing me to use it." So I can't recommend Riot to anyone at least until you fix this.
For future reference and in hopes that it will be useful to others, here is how I got rid of this problem:
My encrypted conversations were all back to normal.
Furthermore, would it be possible to show something friendlier to users, to help them? The current message is pretty horrible (you can't read your correspondant's messages, which is bad and stressful and makes you wonder if you've done something wrong, and on top of that the message is super technical/jargon-y).
Can I suggest:
Sorry, there is no disk space left on your device, because of this Riot couldn't store the secret keys needed to decrypt the message. Please make some space by deleting some data and restart Riot.
this should now be alleviated on the Desktop app and Firefox where we get Persistent Storage permissions, in Chrome it may/may not get the permissions.
This just happened to me on the desktop app and unfortunately, nothing is improved compared to the situation described several years ago.
The exact same message is still the one shown:
Unable to decrypt: InvalidStateError: Failed to execute 'transaction' on 'IDBDatabase': The database connection is closing
That message should really be changed to something understandable by someone who doesn't have a PhD in databaseology.
How problematic would it be to just replace the current error message with the one i suggested in November 2018? Can there be another cause but lack of disk space for throwing "Unable to decrypt: InvalidStateError: Failed to execute 'transaction' on 'IDBDatabase': The database connection is closing"?
I'll just add to the issue that it just occured to me. My disk got full and somebody I couldn't receive or send encrypted messages on Riot afterward, previous messages showed the same failed transaction message.
I didn't troubleshoot much. I restarted Riot and had access to the previous messages but couldn't send any. I just started a new encrypted room since it was a new server.
Most helpful comment
Furthermore, would it be possible to show something friendlier to users, to help them? The current message is pretty horrible (you can't read your correspondant's messages, which is bad and stressful and makes you wonder if you've done something wrong, and on top of that the message is super technical/jargon-y).
Can I suggest: