NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.79k stars 13.89k forks source link

github-desktop login is broken #344911

Open simonvanbernem opened 2 weeks ago

simonvanbernem commented 2 weeks ago

Describe the bug

Signing in to github-desktop is not possible. During the login process you must sign into github in the browser, but after a successful login there, nothing happens. github-desktop just waits for ever, as if it hadn't gotten any notification from the browser that the login was successful.

Steps To Reproduce

Steps to reproduce the behavior:

  1. start github-desktop
  2. click on Sign in to Github.com
  3. in the browser, sign in to github. The resulting page says "You are being redirected to the authorized application." but this never happens. Manually clicking the link does not help either.

Expected behavior

After signing in to github in the browser, github-desktop should be able to proceed with the login.

Screenshots

Initiating the browser login by pressing this button in github-desktop: image Sign-in in the browser was successful: image The sign-in buttun in github-desktop will forever show this waiting animation: image

Additional context

This issue occurres on a fresh install of the latest recommended x64 nixos iso, with no changes other than the fact that github-desktop is installed. The browser used is firefox.

I believe the issue here might be that the link that the browser tries to forward to github-desktop (in my case x-github-desktop-dev-auth://oauth?code=57775b16ac14ea1112ca&state=1fd7cd98-6b18-2280-9014-1338696a92a3), fails to reach github-desktop to notify it of the successful login. I have had various issues with clicked links not opening correctly in different applications (e.g. a VSCode fails to open the browser for a sign-in, and manually clicking links in VSCode does nothing). I have tried to dig into this a bit, and xdg-open seems to be involved. When I call xdg-open manually with the link, github-desktop moves to the foreground and gets input focus, as if it had gotten the info it wanted and is ready to proceed, but nothing happens. The command itself yields this:

[simon@nixos:~]$ xdg-open x-github-desktop-dev-auth://oauth?code=57775b16ac14ea1112ca&state=1fd7cd98-6b18-2280-9014-1338696a92a3
[1] 7217

[simon@nixos:~]$ [7268:0927/173958.142310:ERROR:angle_platform_impl.cc(44)] Display.cpp:1052 (initialize): ANGLE Display::initialize error 12289: Could not dlopen libGL.so.1: libGL.so.1: cannot open shared object file: No such file or directory
ERR: Display.cpp:1052 (initialize): ANGLE Display::initialize error 12289: Could not dlopen libGL.so.1: libGL.so.1: cannot open shared object file: No such file or directory
[7268:0927/173958.142686:ERROR:gl_display.cc(515)] EGL Driver message (Critical) eglInitialize: Could not dlopen libGL.so.1: libGL.so.1: cannot open shared object file: No such file or directory
[7268:0927/173958.142804:ERROR:gl_display.cc(786)] eglInitialize OpenGL failed with error EGL_NOT_INITIALIZED, trying next display type
[7268:0927/173958.143136:ERROR:angle_platform_impl.cc(44)] Display.cpp:1052 (initialize): ANGLE Display::initialize error 12289: Could not dlopen libGL.so.1: libGL.so.1: cannot open shared object file: No such file or directory
ERR: Display.cpp:1052 (initialize): ANGLE Display::initialize error 12289: Could not dlopen libGL.so.1: libGL.so.1: cannot open shared object file: No such file or directory
[7268:0927/173958.143227:ERROR:gl_display.cc(515)] EGL Driver message (Critical) eglInitialize: Could not dlopen libGL.so.1: libGL.so.1: cannot open shared object file: No such file or directory
[7268:0927/173958.143315:ERROR:gl_display.cc(786)] eglInitialize OpenGLES failed with error EGL_NOT_INITIALIZED
[7268:0927/173958.143388:ERROR:gl_display.cc(820)] Initialization of all EGL display types failed.
[7268:0927/173958.143473:ERROR:gl_ozone_egl.cc(26)] GLDisplayEGL::Initialize failed.
[7268:0927/173958.148277:ERROR:angle_platform_impl.cc(44)] Display.cpp:1052 (initialize): ANGLE Display::initialize error 12289: Could not dlopen libGL.so.1: libGL.so.1: cannot open shared object file: No such file or directory
ERR: Display.cpp:1052 (initialize): ANGLE Display::initialize error 12289: Could not dlopen libGL.so.1: libGL.so.1: cannot open shared object file: No such file or directory
[7268:0927/173958.148449:ERROR:gl_display.cc(515)] EGL Driver message (Critical) eglInitialize: Could not dlopen libGL.so.1: libGL.so.1: cannot open shared object file: No such file or directory
[7268:0927/173958.148518:ERROR:gl_display.cc(786)] eglInitialize OpenGL failed with error EGL_NOT_INITIALIZED, trying next display type
[7268:0927/173958.148668:ERROR:angle_platform_impl.cc(44)] Display.cpp:1052 (initialize): ANGLE Display::initialize error 12289: Could not dlopen libGL.so.1: libGL.so.1: cannot open shared object file: No such file or directory
ERR: Display.cpp:1052 (initialize): ANGLE Display::initialize error 12289: Could not dlopen libGL.so.1: libGL.so.1: cannot open shared object file: No such file or directory
[7268:0927/173958.148756:ERROR:gl_display.cc(515)] EGL Driver message (Critical) eglInitialize: Could not dlopen libGL.so.1: libGL.so.1: cannot open shared object file: No such file or directory
[7268:0927/173958.148827:ERROR:gl_display.cc(786)] eglInitialize OpenGLES failed with error EGL_NOT_INITIALIZED
[7268:0927/173958.148893:ERROR:gl_display.cc(820)] Initialization of all EGL display types failed.
[7268:0927/173958.148980:ERROR:gl_ozone_egl.cc(26)] GLDisplayEGL::Initialize failed.
[7268:0927/173958.151315:ERROR:viz_main_impl.cc(196)] Exiting GPU process due to errors during initialization

Notify maintainers

@dan4ik605743

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

 - system: `"x86_64-linux"`
 - host os: `Linux 6.6.52, NixOS, 24.05 (Uakari), 24.05.5287.759537f06e69`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.7`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Add a :+1: reaction to issues you find important.

zzywysm commented 6 days ago

I am also seeing this on arm64 NixOS.

zzywysm commented 6 days ago

I am also seeing this on arm64 NixOS.

I managed to fix this on my plasma6 machine by adding the following to configuration.nix:

  xdg = {
    autostart.enable = true;
    portal = {
      enable = true;
      extraPortals = [
        pkgs.xdg-desktop-portal
        pkgs.xdg-desktop-portal-gtk
        pkgs.xdg-desktop-portal-kde
      ];
    };
  };

  environment.systemPackages = with pkgs; [
    ...
    xdg-utils
    xdg-desktop-portal
    xdg-desktop-portal-gtk
    xdg-desktop-portal-kde
    ...
  ];

  environment.sessionVariables = {
    XDG_SESSION_TYPE = "wayland";
    XDG_CURRENT_DESKTOP = "KDE";
    XDG_SESSION_DESKTOP = "KDE";
    GTK_USE_PORTAL = "1";
    NIXOS_XDG_OPEN_USE_PORTAL = "1";
  };