NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.39k stars 14.34k forks source link

insync first start GUI can't open web browser to setup account, no icon on panel #264124

Open jotapesse opened 1 year ago

jotapesse commented 1 year ago

Describe the bug

Trying to run first time insync I get a blank/empty icon on the panel but the app/widget runs on the panel. The insync window opens on the desktop but when clicking to setup any account it will try to open the web browser but fails without any error on screen.

OS: NixOS 23.11 (unstable) KDE Plasma Version: 5.27.8 KDE Frameworks Version: 5.110.0 Qt Version: 5.15.10 Windows system: Wayland NixOS Package: insync installed via nixos/configuration.nix Default Web browser: Google Chrome

Steps To Reproduce

Steps to reproduce the behavior:

  1. Logon to KDE/Plasma Wayland desktop;
  2. insync will start automatically, widget on panel and window open on desktop;
  3. Or, run "insync start" via Krunner or the terminal;
  4. First time configuration window for insync will open;
  5. insync systraywidget on panel works with a blank icon (known issue);
  6. Try to click any of "Add Google Drive", "Add OneDrive" or "Add Dropbox" accounts to configure:
  7. A warning from KIO Client window will appear with "This will start the program: Google Chrome", click "Continue" to proceed;
  8. Nothing happens;

Expected behavior

Progression on the configuration of new accounts on insync, authentication sign-in via web browser

Screenshots

image

Additional context

Trying to run on terminal we get the following errors:

Unsetting QT_STYLE_OVERRIDE=
Unsetting QT_QPA_PLATFORMTHEME=
XKB_CONFIG_ROOT=/nix/store/096yg7fc67py86w0bm6g7a32npgyh5ic-xkeyboard-config-2.39/share/X11/xkb/
Using Wayland-EGL
xkbcommon: ERROR: couldn't find a Compose file for locale "en_GB.UTF-8" (mapped to "en_GB.UTF-8")
QSystemTrayIcon::setVisible: No Icon set
INFO     2023-10-29 07:42:43,888 [mainlogs:_log_run:138] Core(app_version=3.8.6.50504, platform=Linux-x86_64-nixos/23.11) initialized
INFO     2023-10-29 07:42:43,906 [mainsettings:_load_settings:236] Loaded settings, machine fingerprint = KM9Z9KIhCeUEneLd-8lp-G2IUIg=
Using the 'xdg-shell' shell integration
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
INFO     2023-10-29 07:42:44,013 [app:start_core:65] core started
INFO     2023-10-29 07:42:44,015 [unix_socket_server:start:106] unix socket server thread start
js: Bad HTTP status: 0 
js: Enqueued failed request for retry in 6000
js: Bad HTTP status: 0 
js: Enqueued failed request for retry in 6000
js: Bad HTTP status: 0 
js: Enqueued failed request for retry in 6000
js: Bad HTTP status: 0 
js: Enqueued failed request for retry in 6000
js: Bad HTTP status: 0 
js: Enqueued failed request for retry in 12000
js: Bad HTTP status: 0 
js: Enqueued failed request for retry in 12000
js: Bad HTTP status: 0 
js: Enqueued failed request for retry in 12000
js: Bad HTTP status: 0 
js: Enqueued failed request for retry in 12000
js: Bad HTTP status: 0 
js: Enqueued failed request for retry in 24000
js: Bad HTTP status: 0 
js: Enqueued failed request for retry in 48000
js: Bad HTTP status: 0 
js: Enqueued failed request for retry in 6000
kf.service.sycoca: Service type not found: "application/vnd.insync.link.drive.slides"
kf.service.sycoca: Service type not found: "application/vnd.insync.link.dropbox.paper"
kf.service.sycoca: Service type not found: "application/vnd.insync.link.dropbox.papert"
kf.service.sycoca: Service type not found: "application/vnd.insync.link.dropbox.gsheet"
kf.service.sycoca: Service type not found: "application/vnd.insync.link.drive.map"
kf.service.sycoca: Service type not found: "application/vnd.insync.link.drive.form"
kf.service.sycoca: Service type not found: "application/vnd.insync.link.drive.doc"
kf.service.sycoca: Service type not found: "application/vnd.insync.link.drive.script"
kf.service.sycoca: Service type not found: "application/vnd.insync.link.drive.note"
kf.service.sycoca: Service type not found: "application/vnd.insync.link.dropbox.gslides"
kf.service.sycoca: Service type not found: "application/vnd.insync.link.dropbox.gdoc"
kf.service.sycoca: Service type not found: "application/vnd.insync.link.drive.draw"
kf.service.sycoca: Service type not found: "application/vnd.insync.link.dropbox.web"
kf.service.sycoca: Service type not found: "application/vnd.insync.link.drive.table"
kf.service.sycoca: Service type not found: "application/vnd.insync.link.drive.link"
kf.service.sycoca: Service type not found: "application/vnd.insync.link.drive.sheet"
kf.config.core: Access to ' "/run/current-system/sw/share/applications/google-chrome.desktop" ' denied, not owned by root and executable flag not set.
kf.kio.core: Unable to open replacement file for "/run/current-system/sw/share/applications/google-chrome.desktop" "Existing file /run/current-system/sw/share/applications/google-chrome.desktop is not writable"
js: Bad HTTP status: 0 
js: Enqueued failed request for retry in 12000
js: Bad HTTP status: 0 
js: Enqueued failed request for retry in 24000
js: Bad HTTP status: 0 
js: Enqueued failed request for retry in 96000
js: Bad HTTP status: 0 
js: Enqueued failed request for retry in 96000
INFO     2023-10-29 07:44:18,422 [app:quit:80] quitting
INFO     2023-10-29 07:44:18,423 [unix_socket_server:stop:126] unix socket server thread stop
ERROR    2023-10-29 07:44:18,433 [workbase:__run:257] While running ExternalLogin(cloud='gd')
Traceback (most recent call last):
  File "idesksync/workbase.py", line 246, in __run
  File "ideskcore/loginwork.py", line 77, in _do
  File "ideskcore/loginwork.py", line 152, in read_line
  File "idesknet/httpclient.py", line 608, in read
  File "idesknet/httpclient.py", line 589, in read1
idesknet.httpclient.HTTPClosedError
ERROR    2023-10-29 07:44:18,434 [workbase:_log_task_exception:449] While running ExternalLogin(cloud='gd')
Traceback (most recent call last):
  File "idesksync/workbase.py", line 246, in __run
  File "ideskcore/loginwork.py", line 77, in _do
  File "ideskcore/loginwork.py", line 152, in read_line
  File "idesknet/httpclient.py", line 608, in read
  File "idesknet/httpclient.py", line 589, in read1
idesknet.httpclient.HTTPClosedError
ERROR    2023-10-29 07:44:18,435 [uidata:__await_and_return_result:163] Unexpected error while calling 'add_account'
Traceback (most recent call last):
  File "ideskui/uidata.py", line 155, in __await_and_return_result
  File "ideskui/appui.py", line 125, in add_account
  File "ideskapi/apibase.py", line 73, in __call__
  File "ideskcore/mainsync.py", line 297, in setup_account
  File "ideskcore/mainsync.py", line 146, in external_login
  File "idesksync/workbase.py", line 246, in __run
  File "ideskcore/loginwork.py", line 77, in _do
  File "ideskcore/loginwork.py", line 152, in read_line
  File "idesknet/httpclient.py", line 608, in read
  File "idesknet/httpclient.py", line 589, in read1
idesknet.httpclient.HTTPClosedError
js: Uncaught (in promise) #<Object>
INFO     2023-10-29 07:44:18,439 [app:stop:75] core stopped
INFO     2023-10-29 07:44:18,440 [app:stop:77] clean exit

Notify maintainers

@hellwolf

Metadata

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

 - system: `"x86_64-linux"`
 - host os: `Linux 6.5.7, NixOS, 23.11 (Tapir), 23.11pre537656.7c9cc5a6e5d3`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.17.1`
 - channels(root): `"nixos"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
jotapesse commented 1 year ago

Updated recently to latest NixOS unstable updates. Same issue, no changes.

OS: NixOS 23.11 (unstable) KDE Plasma Version: 5.27.9 KDE Frameworks Version: 5.110.0 Qt Version: 5.15.10 Windows system: Wayland NixOS Package: insync installed via nixos/configuration.nix Default Web browser: Google Chrome

$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.5.9, NixOS, 23.11 (Tapir), 23.11pre541036.63678e9f3d3a`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.17.1`
 - channels(root): `"nixos"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
hellwolf commented 1 year ago

Hi @jotapesse, thanks for the reporting, I will be taking a deeper look as soon as I can!

jotapesse commented 1 year ago

Hi! Any update on this? I'm now on NixOS stable 23.11 "Tapir" but issue persists.

OS: NixOS 23.11 (stable) "Tapir" KDE Plasma Version: 5.27.9 KDE Frameworks Version: 5.112.0 Qt Version: 5.15.11 Windows system: Wayland Default Web browser: Google Chrome

$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.6.3, NixOS, 23.11 (Tapir), 23.11.928.50aa30a13c4a`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.1`
 - channels(root): `"nixos-23.11"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

After some research I believe this is not specific to the insync package, I get the exact same behaviour on caprine in example. Seems to be related to the XDG Portals integration? Is insync an Appimage wraper as well? Related discussion: Annoyances - Executing browser from URL links within). I did try to enable the XDG Portals integration as detailed for the slack package here but to no avail. Issue persists. Any hint on how this can be resolved?

xdg = {
  portal = {
    enable = true;
    extraPortals = with pkgs; [
      xdg-desktop-portal-wlr
      xdg-desktop-portal-gtk
    ];
    gtkUsePortal = true;
  };
};
hellwolf commented 11 months ago

Hi folks, sorry for the delays.

I am working on a fix and an upgrade to 3.8.7.50508, here is a work-in-progress draft: https://github.com/NixOS/nixpkgs/pull/277937/files

If you are able to test it during development, that'd be helpful!

Happy new year!

hellwolf commented 11 months ago

Instead, please give a upvote to this pull request instead: https://github.com/NixOS/nixpkgs/pull/279426

This one should have fixed many issues.

hellwolf commented 7 months ago

Is it still an issue?

FYI: Also, a new package for nautilus users: https://github.com/NixOS/nixpkgs/pull/302422 please give a :+1: for faster merging!

jotapesse commented 7 months ago

Hi Still an issue for me. No changes at all on my reported behaviour above. Is this not a XDG Portals integration issue as mentioned? I'm now on NixOS 24.05 (unstable):

$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.7.9, NixOS, 24.05 (Uakari), 24.05pre594677.3030f185ba6a`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.1`
 - channels(root): `"nixos"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

With KDE Plasma 6:

Operating System: NixOS 24.05
KDE Plasma Version: 6.0.1
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Kernel Version: 6.7.9 (64-bit)
Graphics Platform: Wayland

Insync version:

$ insync version
Unsetting QT_STYLE_OVERRIDE=
Unsetting QT_QPA_PLATFORMTHEME=
XKB_CONFIG_ROOT=/nix/store/qli5wqnl6p5kzisxya1qqqsh1y134wsq-xkeyboard-config-2.41/share/X11/xkb/
3.8.6.50504
jotapesse commented 7 months ago

Sorry, to clarify: not exactly the same behaviour - I no longer get errors on terminal, and trying to open Google Chrome by pressing the button on the KIO Client window results in a failure with the following error:

image

hellwolf commented 7 months ago

Hi, the latest version from nixpkgs-unstable should be:

$ insync version
3.8.7.50516
jotapesse commented 7 months ago

Ok, let me update to it and I'll report back. Thanks.

jotapesse commented 7 months ago

Ok, just updated everything and rebooted the system. I'm now on:

$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.8.4, NixOS, 24.05 (Uakari), 24.05pre608655.ff0dbd94265a`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.2`
 - channels(root): `"nixos"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

With KDE Plasma 6.0.3:

Operating System: NixOS 24.05
KDE Plasma Version: 6.0.3
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.3
Kernel Version: 6.8.4 (64-bit)
Graphics Platform: Wayland

And insync version:

$ insync version
3.8.7.50516

⚠️ But still the same KIO Client error as reported above. Are you not able to replicate this behaviour? Something missing on my system?

hellwolf commented 7 months ago

Okay, thanks for trying! I don't have KDE setup. I will keep this bug open and see anyone or me will be able to reproduce and find a fix.

jotapesse commented 7 months ago

Thank you for following this up. It would be great if you could try it on KDE Plasma and check this behaviour. I'm guessing something related with the XDG Portals integration and/or the KIO Client use. But my setup is pretty much default so it should work fine out of the box. It doesn't unfortunately and for many months now.

jotapesse commented 6 months ago

Hi! An update here: I have confirmed as I suspected that this was a XDG Portals integration issue. Eventually I resolved it by making sure the relevant configuration was added to the /etc/nixos/configuration.nix file. I wish this was better documented somewhere...

# XDG Portal
xdg.portal.enable = true;
xdg.portal.xdgOpenUsePortal = true; #  This will make `xdg-open` use the portal to open programs, which resolves bugs involving programs opening...

I am now updated to the following with the above XDG Portal configuration and Insync now opens fine the web browser to proceed with authentication of the Cloud accounts:

Operating System: NixOS 24.05 KDE Plasma Version: 6.0.4 KDE Frameworks Version: 6.1.0 Qt Version: 6.7.0 Kernel Version: 6.8.9 (64-bit) Graphics Platform: Wayland

$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.8.9, NixOS, 24.05 (Uakari), 24.05pre621993.25865a40d14b`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.2`
 - channels(root): `"nixos"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

$ insync version
3.8.7.50516

⚠️ Still missing is the insync systray icon. Insync works on the systray but the icon is empty/blank. Any help here?