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

Message search can never be enabled in some situations #19358

Closed
aneverhopefulhelper opened this issue Oct 12, 2021 · 4 comments
Closed

Message search can never be enabled in some situations #19358

aneverhopefulhelper opened this issue Oct 12, 2021 · 4 comments
Labels
A-Indexing Indexing messages via Seshat O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect

Comments

@aneverhopefulhelper
Copy link

aneverhopefulhelper commented Oct 12, 2021

It seems somehow the passphrase in keytar can get out of sync with the actual database password. Element doesn't appear to be able to recover from this situation, leading to message search just not turning on. We should detect a passphrase mismatch and probably just delete the database and start re-indexing (probably warning the user, lest they end up in a cycle of it re-indexing without their knowledge every time the app is restarted). According to this report, the spinner keeps spinning too, even after it fails.

Original report below:

Steps to reproduce

  1. Trying to enable message search in Element desktop
  2. Enable message search under Settings > Security & Privacy

Outcome

What did you expect?

I expected message search to be enabled

What happened instead?

The loading/processing wheel spins for hours and does not enable message search

Operating system

Linux Mint

Application version

Element version: 1.9.2 Olm version: 3.2.3

How did you install the app?

https://packages.riot.im/debian default/main amd64

Homeserver

semi.social

Will you send logs?

Yes

@aneverhopefulhelper
Copy link
Author

In the logs I am seeing EventIndex: Error initializing the event index {"message":"Error opening the database: DatabaseUnlockError("Invalid passphrase")"} I suspect this is related, however, I am unsure how to fix this, if there is a file or something I can delete or modify or some setting I can change then I am willing to do so, but right now I don't know what to do.

@dbkr
Copy link
Member

dbkr commented Oct 12, 2021

You could try manually deleting the event index (~/.config/Element/EventStore). I'm going to repurpose this issue into Element not handling the situation where the passphrase from keytar doesn't match the passphrase on the database.

@dbkr dbkr changed the title Unable to Enable Message search Message search can never be enabled in some situations Oct 12, 2021
@dbkr dbkr added O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Major Severely degrades major functionality or product features, with no satisfactory workaround A-Indexing Indexing messages via Seshat labels Oct 12, 2021
@aneverhopefulhelper
Copy link
Author

You could try manually deleting the event index (~/.config/Element/EventStore).

Do you mean delete everything in there or just files called .store? Because I tried deleting everything (after backing it all up, just in case) and then when I tried to enable message search again I got this error in the log: EventIndex: Error initializing the event index {"message":"Error opening the database: IndexError(IOError(IOError { path: None, err: Custom { kind: Other, error: "Invalid MAC" } }))"}

@turt2live
Copy link
Member

Duplicate of element-hq/element-desktop#904 I believe

@turt2live turt2live closed this as not planned Won't fix, can't repro, duplicate, stale Jan 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Indexing Indexing messages via Seshat O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect
Projects
None yet
Development

No branches or pull requests

3 participants