element-desktop: "Message search initialisation failed, check your settings for more information"
Steps to reproduce
- Open an encrypted chat in the People category.
- Click the search button.
What happened?
What did you expect?
Search works.
What happened?
I see a message saying “Message search initialisation failed, check your settings for more information”.
Operating system
Windows 10 x64
Application version
Element version: 1.8.2, Olm version: 3.2.3
How did you install the app?
winget install element, subsequently upgraded within Element
Homeserver
matrix.org
Have you submitted a rageshake?
No
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 22
- Comments: 44 (7 by maintainers)
I have this issue on debian testing with element 1.10.1. With the following error message:
I did not have this issue on debian bullseye on element 1.9.9 and 1.10.1. Might try W10 later.
Note that if you’re seeing
Message search initialisation failed(andError opening the database: SqlCipherError("Sqlcipher support is missing")when expanded), then this is likely about https://github.com/matrix-org/seshat/issues/102. If you’re seeing something else, then you’re likely encountering a different bug.For https://github.com/matrix-org/seshat/issues/102, a temporary workaround, which works for Arch at least, can be found here. This workaround will be applied to the Arch package (or has been already) so that you don’t need to do it manually, but it might be useful for other affected distributions.
them*
Also the error is:
Error opening the database: SqlCipherError("Sqlcipher support is missing")But yes, the error message needs to be presented better to the user. If this is an Arch Linux packaging error, perhaps Element should check for Sqlcipher up front, and refuse to launch (or popup a dialog on startup) saying it’s missing, so the Arch packagers won’t ship a subtly broken package.
The weird thing is that I already have
sqlcipher-4.4.3-1installed, since the element-desktop package already requires sqlcipher… but it still fails to load.My element desktop was perpetually stuck at “Message search initialisation failed: Unknown error”.
Removing
~/.config/Element/EventStore/and starting element again started the re-index process (which now keeps running into #932).This is with the offical element deb packages.
Good to know but still such workarounds shouldn’t be normality to use the software as intended
The Arch bug is being tracked at https://bugs.archlinux.org/task/72359, which references https://github.com/matrix-org/seshat/issues/102 (probably the same bug reported in a different tracker). However it doesn’t seem fixed yet.
well the problem is with sqlcipher https://github.com/sqlcipher/sqlcipher/issues/385
I fixed this issue by shutting down element. I then deleted C:\Users\AAAAAA\AppData\Roaming\Element\EventStore and restarted the app. I then watched the indexes rebuild correctly under Settings / Security & Privacy / Message search / Manage.
Its back amon the living with the debian precompiled package
Version von Element: 1.11.23 Version von Olm: 3.2.12
If I use the Arch-Version, element-desktop crash if search is enable …
@bdrewery good spot, just made a PR to ensure EventStore is maintained per-profile
This https://github.com/vector-im/element-web/issues/14229#issuecomment-745276193 worked for me as a temporary fix, but one must wait for reindexing.
Looks like it broke again lmao
<del>reindexing fixed it again…</del>
hahah nvm it just broke again and now it hangs on
forever. I’ve recompiled it too and it does it still so whatever
I’ll leave it for a night maybe it is indexing… but barely any cpu/disk usage compared to last time.
Search has been working for me for months, but this issue just happened to me today, how can I fix it? I use Element on Ubuntu 22.04 as an apt package from the Debian repo.
I noticed those errors after upgrading from Fedora 36 to 37. The error was probably there before (the upgrade).
Initially, I was getting:
After resetting the search index I am getting:
The versions I am currently using: Element: 1.11.17 Olm: 3.2.12
Do you recommend me to re-install the app or maybe downgrade the version the some of the previous ones?
I have exactly the same problem as @G2G2G2G. I couldn’t search messages, tried to reset the index and now it cannot be recreated. I’ve installed element through the official ArchLinux packages.
Could you both try to “reset” the message index? You might experience a suboptimal search experience whilst seshat crawls through the sync history, but it will eventually catch up to the state it was on
It would be interesting to see whether Element can recover and initialise seshat properly. If that’s the case, it could indicate a race condition during the first initialisation phase. Otherwise it could be a packaging issue
Could be an arch issue, I am using https://aur.archlinux.org/packages/element-desktop-nightly-bin/ with a different error message (as posted above) however both are related to search…
@anoadragon453 (assuming it’s the same person) said
3.34.1 2021-01-20 14:10:07 10e20c0b43500cfb9bbc0eaa061c57514f715d87238f4d835880cd846b9ealt1 (SQLCipher 4.4.3 community)I also have it looks like
Next time tell him where the hell to find the error because it isn’t intuitive at all.
Also note this happens in e2e rooms only, and the NON ENCRYPTED MESSAGES do appear in those rooms (for example I sent POST requests via a bot into the room ID and those are (red alarm marked as non-encrypted) they appear via the search fine but no other post does. The error shows up regardless if the bot is in the room or not… it shows up in all e2e rooms.
This error appeared last few months, some of my rooms are year+ old and worked fine until month ago or more no idea… now they do not.