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

Element Installed via Flatpak Won't Search Encrypted Rooms #303

Open
NoraCodes opened this issue Oct 7, 2022 · 7 comments
Open

Element Installed via Flatpak Won't Search Encrypted Rooms #303

NoraCodes opened this issue Oct 7, 2022 · 7 comments

Comments

@NoraCodes
Copy link

Duplicate of element-hq/element-web#23437 because @t3chguy didn't want this issue on that repo.

Steps to reproduce

  1. I open Element, installed via Flatpak, on Fedora.
  2. I open an encrypted room.
  3. I click the circled-magnifying-glass icon in the top right hand corner.

Outcome

What did you expect?

I expected to see a search bar and get messages as results when searching.

What happened instead?

Instead I see a search bar which doesn't give me results and the message "Use the Desktop app to search encrypted messages".

Operating system

Fedora Linux

Application version

"Element im.riot.Riot 1.11.8"

How did you install the app?

Flatpak im.riot.Riot

Homeserver

nora.codes. Synapse 1.66.0 Python3 on Ubuntu

Will you send logs?

No

@SISheogorath
Copy link
Collaborator

I've seen this problem as an "on & off" situation in the recent two years. #123

Usually it's an issue with the "Secret Service" and Element not coming together because one of them got corrupted or is unavailable.

Hope this provides some helpful insights. I wasn't able to fully pin it down yet.

@mjg
Copy link

mjg commented Nov 17, 2023

With the current flatpak installed as a user flatpak on Fedora 39, I had the same problem. The solution was to allow im.riot.Riot to "talk to" org.freedesktop.secrets on the session bus (using flatseal). I tested with two different profiles, and it seems to work without the two profiles overwriting each other's index key, but I haven't confirmed whether they are separate. (Note: You have to reset the index after doing this.)

@SISheogorath
Copy link
Collaborator

Yeah, this is one of these things that are incredibly hard to debug. Why? Because often it just works. The org.freedesktop.secrets bus has a portal. And that should just work, like it does for many people (including me on Fedora Silberblue 39), but then it doesn't. And sometimes it just stops working mid way.

I haven't really figured out a reproducer. So when someone comes across this and faces the same problem with the bus allows, try to turn it off. It's an interesting mess.

@mjg
Copy link

mjg commented Nov 18, 2023

Oh, good point. Portals. Which one is it that should handle this?
xdg-portals (upstream) changed recently: They used to apply a default where now they require a config. Some desktop environments or packages have adjusted to that, some not. I'm using i3, and I had to set some portal config so that opening links from a flatpak app would work again (i.e. be directed to a running browser).

@SISheogorath
Copy link
Collaborator

I don't know which binary it is. https://docs.flatpak.org/en/latest/portal-api-reference.html#gdbus-org.freedesktop.portal.Secret

@mjg
Copy link

mjg commented Nov 18, 2023

Cool! This works. So, in .config/xdg-desktop-portal/portals.conf, I now have

[preferred]
default=gtk;
org.freedesktop.impl.portal.Secret=gnome-keyring;

and reset permssions with flatseal (and restarted xdg-desktop-portal.service). Works!
More specifically, I had to recreate the search index again. As far or little as I understand, access via the portal gives an app specific secret (which is a good thing) rather than access to the main keyring (or to its contens).
My environment is gdm+i3, and one probably wants to me make the config above i3-specific, but that is the easy part.

@SISheogorath
Copy link
Collaborator

Exactly, the beauty of the portal is, that everything is namespaced and therefore should prevent access to other apps' secrets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants