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

nixos: github login; Error:authentication failed #14028

Open
1 task done
lalishansh opened this issue Jul 9, 2024 · 16 comments
Open
1 task done

nixos: github login; Error:authentication failed #14028

lalishansh opened this issue Jul 9, 2024 · 16 comments
Labels
collaboration The umbrella label for all collaboration features defect [core label] linux

Comments

@lalishansh
Copy link

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

  1. Create a minimal OS instance (NixOS in my case) with just the window compositor (DWL in my case).
  2. launch zed and click Sign in at top right corner
  3. see Error: Authentication failed
[2024-07-00T02:00:00 00:00 ERROR gpui::platform::linux::platform] failed to open uri: "https://zed.dev/native_app_signin?native_app_port=35907&native_app_public_key=XXXXXXXX-L_XXXXXXXX-XXXXXXXX_XXXXXXXX_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX=", last error: Some(Os { code: 2, kind: NotFound, message: "No such file or directory" })

Environment

ilal@NixOS-Laptop
-----------------
OS: NixOS 24.11.20240705.4284c2b (Vicuna) x86_64
Host: OMEN Laptop 15-en1xxx
Kernel: Linux 6.6.36
Uptime: 2 hours, 14 mins
Packages: 872 (nix-system)
Shell: bash 5.2.26
Display (LGD05FE): 1920x1080 @ 144Hz (as 960x540) [Built-in]
Display (MSI3DB6): 3440x1440 @ 50Hz [External]
WM: dwl (Wayland)
Terminal: foot 1.17.2
Terminal Font: monospace (8pt)
CPU: AMD Ryzen 7 5800H (16) @ 4.46 GHz
GPU 1: NVIDIA GeForce RTX 3060 Mobile / Max-Q [Discrete]
GPU 2: AMD Radeon Vega Series / Radeon Vega Mobile Series @ 0.40 GHz [Integrated]
Memory: 2.86 GiB / 14.98 GiB (19%)
Swap: Disabled
Disk (/): 10.17 GiB / 737.16 GiB (1%) - ext4
Local IP (enp6s0f3u1): 192.168.164.192/24 *
Battery: 99% [AC Connected]
Locale: en_IN

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

A manual authentication method for places where zed fails to locate browser etc. but is connected to internet

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

Zed.log
[2024-07-00T02:00:00 00:00 ERROR gpui::platform::linux::platform] failed to open uri: "https://zed.dev/native_app_signin?native_app_port=35907&native_app_public_key=XXXXXXXX-L_XXXXXXXX-XXXXXXXX_XXXXXXXX_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX=", last error: Some(Os { code: 2, kind: NotFound, message: "No such file or directory" })
@lalishansh lalishansh added admin read Pending admin review defect [core label] triage Maintainer needs to classify the issue labels Jul 9, 2024
@lalishansh
Copy link
Author

To do a manual authentication

  1. run 'zed --foreground'
  2. copy the failed to open url ''https://zed.dev/native_app_signin..."
  3. paste it in your browser

zed will pick it up from there.

@notpeter notpeter added collaboration The umbrella label for all collaboration features linux and removed triage Maintainer needs to classify the issue admin read Pending admin review labels Jul 11, 2024
@notpeter notpeter changed the title Zed dosen't (github) login on minimal distros, Error: authentication failed nixos: github login; Error:authentication failed Jul 11, 2024
@HKalbasi
Copy link

There is no failed to open url ''https://zed.dev/native_app_signin..." log for me.

@lalishansh
Copy link
Author

lalishansh commented Jul 11, 2024

There is no failed to open url ''https://zed.dev/native_app_signin..." log for me.

Is zed able to access internet ? Can you share logs

@praveen70140
Copy link

i am not able to find any log related to failed to open url

@joeyjooste
Copy link

[2024-07-12T18:02:30 02:00 ERROR client] DBus error service error org.freedesktop.zbus.Error: The name org.freedesktop.secrets was not provided by any .service files
[2024-07-12T18:02:30 02:00 ERROR gpui] Zbus(MethodError(OwnedErrorName("org.freedesktop.DBus.Error.UnknownMethod"), Some("No such interface “org.freedesktop.portal.OpenURI” on object at path /org/freedesktop/portal/desktop"), Msg { type: Error, sender: UniqueName(":1.4"), reply-serial: 30, body: Signature("s"), fds: [] }))

This is what I'm getting when running with --foreground flag on Void Linux, running DWM. I'm running Zed through flatpak, with flatseal allowing DBUS access.

@coder3112
Copy link

I am on Arch XMonad. Same error as described above by @lalishansh including steps of reproduction. The relevant output after running `zen --foreground`` and then clicking on the "Sign in" button is:

[2024-07-12T23:03:25 02:00 ERROR client] DBus error service error org.freedesktop.zbus.Error: The name is not activatable
[2024-07-12T23:03:25 02:00 ERROR gpui] Zbus(MethodError(OwnedErrorName("org.freedesktop.DBus.Error.ServiceUnknown"), Some("The name is not activatable"), Msg { type: Error, sender: UniqueName("org.freedesktop.DBus"), reply-serial: 30, body: Signature("s"), fds: [] }))

Got a similar output as @joeyjooste , but the message is different. It says: The name is not activatable. I also do NOT get any links in the logs which I can use to sign in.

@Joel-Ostos
Copy link

I am on Arch XMonad. Same error as described above by @lalishansh including steps of reproduction. The relevant output after running `zen --foreground`` and then clicking on the "Sign in" button is:

[2024-07-12T23:03:25 02:00 ERROR client] DBus error service error org.freedesktop.zbus.Error: The name is not activatable
[2024-07-12T23:03:25 02:00 ERROR gpui] Zbus(MethodError(OwnedErrorName("org.freedesktop.DBus.Error.ServiceUnknown"), Some("The name is not activatable"), Msg { type: Error, sender: UniqueName("org.freedesktop.DBus"), reply-serial: 30, body: Signature("s"), fds: [] }))

Got a similar output as @joeyjooste , but the message is different. It says: The name is not activatable. I also do NOT get any links in the logs which I can use to sign in.

HI, I had the same problem on archlinux, the gnome-keyring-daemon -r -d did the magic, once the keyring restarted and entered in Zed all the git/authentication related things worked

@coder3112
Copy link

coder3112 commented Jul 13, 2024

HI, I had the same problem on archlinux, the gnome-keyring-daemon -r -d did the magic, once the keyring restarted and entered in Zed all the git/authentication related things worked

I am not running gnome, and don't think I have any keyrings otherwise installed. Also, what did you mean by "entered in Zed"? Do we need to manually add Zed to the keyring?

UPDATE: I installed gnome-keyring and ran gnome-keyring-daemon -r -d but it did not change anything.

@joeyjooste
Copy link

I ran gnome-keyring-daemon -r -d
Then when opening zed, gnome keyring opens and prompts me for a login password for zed. (this seems to be a keyring specific thing not the actual zed login) then after entering a password it goes away and zed behaves the same as before. Where it gives an error when clicking the Sign-In button.

image

@coder3112
Copy link

I ran gnome-keyring-daemon -r -d Then when opening zed, gnome keyring opens and prompts me for a login password for zed. (this seems to be a keyring specific thing not the actual zed login) then after entering a password it goes away and zed behaves the same as before. Where it gives an error when clicking the Sign-In button.

image

I have also received this error on several occasions, but I am not sure what the steps to reproduce in my case are. Simply opening the app does not do it for me. I cannot reproduce it consistently, but click the buttons and close it enough times, and I do get it.

@lalishansh
Copy link
Author

lalishansh commented Jul 14, 2024

I am able to resolve the issue with switching to gnome-keyring (😑) for secrets and encryption. gnome-keyring-daemon -r -d is required after login (for my setup) because this service depends on graphical-session-pre.target and graphical-session.target.
And for my minimal set it doesn't launch. (Using greetd-tuigreet, dwl (to keep user session WM separate, will do somthing about it))

I was also getting extension error not being able to execute. Fixed it with nix-ld as just like flatpaks, nix packages are sandboxed but need FHS compliance, so instead we make necessary deps available. Src https://nixos.wiki/wiki/Jetbrains_Tools

Current tree for my dotfiles

@coder3112
Copy link

I am able to resolve the issue with switching to gnome-keyring (😑) for secrets and encryption. gnome-keyring-daemon -r -d is required after login (for my setup) because this service depends on graphical-session-pre.target and graphical-session.target. And for my minimal set it doesn't launch. (Using greetd-tuigreet, dwl (to keep user session WM separate, will do somthing about it))

I was also getting extension error not being able to execute. Fixed it with nix-ld as just like flatpaks, nix packages are sandboxed but need FHS compliance, so instead we make necessary deps available. Src https://nixos.wiki/wiki/Jetbrains_Tools

Current tree for my dotfiles

After installing gnome-keyring and running the command, did you do anything special for Zed?

@coder3112
Copy link

Essentially, after doing the gnome-keyring/dbus config, Zed sign in prompts me to create a new keychain, and I enter the password and press continue. But then, I again get the error:

[2024-07-14T22:44:26 02:00 ERROR gpui] Zbus(MethodError(OwnedErrorName("org.freedesktop.DBus.Error.ServiceUnknown"), Some("The name is not activatable"), Msg { type: Error, sender: UniqueName("org.freedesktop.DBus"), reply-serial: 40, body: Signature("s"), fds: [] }))

@coder3112
Copy link

Fix was installing GTK properly and then using gnome-keyring. Apparently my GTK paths were broken.

@danielpizarrotadres
Copy link

Fix was installing GTK properly and then using gnome-keyring. Apparently my GTK paths were broken.

How did you fix the issue ? I ran gnome-keyring-daemon -r -d but nothing happens

@coder3112
Copy link

coder3112 commented Jul 17, 2024

Fix was installing GTK properly and then using gnome-keyring. Apparently my GTK paths were broken.

How did you fix the issue ? I ran gnome-keyring-daemon -r -d but nothing happen.

  1. (Re)Install xdg-desktop-portal-impl and xdg-desktop-portal. (or equivalent on your distro)
  2. The file /usr/share/xdg-desktop-portal/portals/gnome-keyring.portal should be:
[portal]
DBusName=org.freedesktop.secrets
Interfaces=org.freedesktop.impl.portal.Secret
UseIn=gnome;gtk;
  1. Run the commands:
    1. dbus-update-activation-environment --all
    2. dbus-update-activation-environment DISPLAY XAUTHORITY
    3. gnome-keyring-daemon -r -d

I do not know which of these was the actual fix, or whether all of them were needed. But, running all of them did work...

PS: Make sure you have GTK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
collaboration The umbrella label for all collaboration features defect [core label] linux
Projects
None yet
Development

No branches or pull requests

8 participants