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

DBus service error org.freedesktop.zbus.Error: The name org.freedesktop.secrets was not provided by any .service files #14210

Open
1 task done
mfarley281 opened this issue Jul 11, 2024 · 9 comments
Labels
bug [core label] linux linux-x11 Linux X11

Comments

@mfarley281
Copy link

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

When attempting to save an OpenAI API key, upon pressing "enter" the Zed.log shows this error:

[ERROR] DBus error service error org.freedesktop.zbus.Error: The name org.freedesktop.secrets was not provided by any .service files

Environment

Zed: v0.143.6 (Zed)
OS: Linux X11 ubuntu 22.04
Memory: 62.6 GiB
Architecture: x86_64

Kubuntu 22.04.2 LTS x86_64
Kernel: 6.5.0-41-generic
DE: Plasma 5.24.7

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your Zed.log file to this issue.

Zed.log
[ERROR] DBus error service error org.freedesktop.zbus.Error: The name org.freedesktop.secrets was not provided by any .service files
@mfarley281 mfarley281 added admin read Pending admin review bug [core label] triage Maintainer needs to classify the issue labels Jul 11, 2024
@mfarley281
Copy link
Author

Ugly hack workaround: Install "gnome-keyring" (but I'm KDE with kwallet!)

Reference: atom/node-keytar#74

It seems that node-keytar relies on libsecret on Linux, and libsecret in turn relies on gnome-keyring. It's possible that libsecret would support other keyrings implementing the org.freedesktop.secrets DBus functionality, but none appear to exist so far.

For me, as a KDE Plasma user, none of the solutions or workarounds that I've found for this problem are desirable.

@apricotbucket28
Copy link
Contributor

Ugly hack workaround: Install "gnome-keyring" (but I'm KDE with kwallet!)

Reference: atom/node-keytar#74

It seems that node-keytar relies on libsecret on Linux, and libsecret in turn relies on gnome-keyring. It's possible that libsecret would support other keyrings implementing the org.freedesktop.secrets DBus functionality, but none appear to exist so far.

For me, as a KDE Plasma user, none of the solutions or workarounds that I've found for this problem are desirable.

Zed doesn't use node-keytar, it instead uses the oo7 crate, which talks to the DBus secret service portal directly.

I'm on KDE and I haven't had any problems with storing keyrings, and according to the Arch wiki KDE Frameworks 5.97.0+ supports the secret service API. What's your KDE Frameworks version? This is what my "About this System" page says:
image

@mfarley281
Copy link
Author

KDE Frameworks v. 5.92.0

I have several dependencies that prevent me from updating KDE beyond Kubuntu 22.04

What can be done?

@notpeter notpeter added linux linux-x11 Linux X11 and removed triage Maintainer needs to classify the issue admin read Pending admin review labels Jul 13, 2024
@mfarley281
Copy link
Author

I ended up installing gnome-keyring to make it work

@github-actions github-actions bot added admin read Pending admin review triage Maintainer needs to classify the issue labels Nov 5, 2024
@notpeter notpeter removed triage Maintainer needs to classify the issue admin read Pending admin review labels Nov 5, 2024
@Haraven
Copy link

Haraven commented Dec 5, 2024

I ended up installing gnome-keyring to make it work

I had to do the same thing. I have KDE and Hyprland both installed. Under KDE, Zed correctly uses kwallet and keeps me signed in. Under Hyprland, even though kwallet is installed, Zed doesn't seem to pick it up and asks me to sign in every time I launch it.

I ended up installing gnome-keyring. The issue went away. Hopefully nothing will break with both kwallet and gnome-keyring installed on my system.

@jozsefk9
Copy link

I am getting this same error message on Deepin Linux 23. Is there a way to turn off this feature of Zed in settings?

@cole-miller
Copy link
Contributor

cole-miller commented Dec 30, 2024

I would like to separate out three different concerns here:

  1. The error message showing up in the Zed log. By itself, this is not a big deal; you can ignore it unless some Zed functionality is not working for you.
  2. Zed failing to use kwallet in some cases when it is installed and supports the Secret Service APIs, i.e. @Haraven's issue. I suspect this is not a Zed issue but rather hyprland not starting the kwallet daemon/setting up dbus stuff.
  3. What Zed should do when neither org.freedesktop.Secrets nor org.freedesktop.portal.Secrets is available. I'm not sure there's anything better to do here than prompting for sign-in on every startup; Zed could persist the secret itself somehow but that seems like a can of worms.

@Haraven
Copy link

Haraven commented Dec 30, 2024

Regarding this:

2. Zed failing to use kwallet in some cases when it is installed and supports the Secret Service APIs, i.e. @Haraven's issue. I suspect this is not a Zed issue but rather hyprland not starting the kwallet daemon/setting up dbus stuff

The thing is this issue only happened with Zed. If it were a Hyprland not seting up kwallet/dbus issue, other software should've been affected as well, right? But everything else worked fine. For example, I have the Cursor IDE installed alongside Zed, and I logged into my Cursor account to use the AI features. It never asked me to sign in again after I did it the first time. My browsers also make use of kwallet just fine under Hyprland.

@cole-miller
Copy link
Contributor

@Haraven Thanks, that's useful context! Is there any open-source app you use that successfully talks to kwallet while Zed doesn't (so I can compare what they're doing to our code)? Alternatively, could you get me dbus-monitor traces of Cursor successfully using kwallet and of Zed failing to use it? Also, what version of KDE Frameworks are you on?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug [core label] linux linux-x11 Linux X11
Projects
None yet
Development

No branches or pull requests

6 participants