nextcloud / desktop

💻 Desktop sync client for Nextcloud
https://nextcloud.com/install/#install-clients
GNU General Public License v2.0
3.03k stars 795 forks source link

[Bug]: Desktop client will not stay logged in after system reboot #5856

Open jahway603 opened 1 year ago

jahway603 commented 1 year ago

⚠️ Before submitting, please verify the following: ⚠️

Bug description

Desktop client will not stay logged in after system reboot

Steps to reproduce

  1. Start system & login to Linux desktop.
  2. Immediately get prompted that "You have been logged out of your account ACCOUNTNAME at https://SERVERNAME. Please login again."
  3. Enter login and password in the popped out web browser.
  4. Click on "Grant Access", which then connects the Nextcloud Desktop Client to the Nextcloud Server.
  5. Shut down system.
  6. Upon starting the system again, I have to start all over again at Step 1 above.

Expected behavior

After logging into the Nextcloud Server using the Nextcloud Desktop Client, it should save that information and not ask to do this every time the system is rebooted.

Which files are affected by this bug

ALL

Operating system

Linux

Which version of the operating system you are running.

EndeavourOS

Package

Distro package manager

Nextcloud Server version

25.0.8

Nextcloud Desktop Client version

3.9.0

Is this bug present after an update or on a fresh install?

Fresh desktop client install

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

Are you using an external user-backend?

Nextcloud Server logs

This is not happening on my other desktop running Arch where I have been using this same application for years now.

Additional info

This same reported issue has also been happening on an Artix Linux install.

mu-zzi commented 1 year ago

Same here on MacOS 12.6.7

Emporea commented 1 year ago

Same here. fresh installed endevour os gnome.

When i launched nextcloud for thr first time.i get the message that it failed to import legacy configs. Well there shouldnt be any configs yet since its a frrsh install.

After this it logs out again.

neoKushan commented 1 year ago

I have the same issue on Windows 11. It's not just a system reboot, just closing and opening the app causes it to get logged out.

Looking through the logs I can see this line, which seems telling:

2023-07-31 14:38:28:883 [ warning nextcloud.sync.credentials.keychainchunk C:\Users\sysadmin\AppData\Local\Temp\2\windows-16700\client-building\desktop\src\libsync\creds\keychainchunk.cpp:360 ]:  Unable to read "Nextcloud_proxy-password" chunk "0" "Password entry not found"
jahway603 commented 1 year ago

Any Nextcloud developers have any idea of any workarounds for this issue or how we can all provide more information to you to help resolve this?

mur1chan commented 1 year ago

same problem here

mur1chan commented 1 year ago

for everyone who is still facing the problem. just install the gnome keyring and you good

mikeperalta1 commented 11 months ago

Just started happening to me, too, once I upgraded to Ubuntu 23.10. Client was totally working just before, and continues to work on Ubuntu 23.04 and 22.04. I already have gnome-keyring installed to no avail. Using the snap package nextcloud-desktop-client version 3.10.1.

EDIT: Uninstalling the snap version (3.10.1) and installing the apt version (3.9.0-1) seems to fix the issue for me.

ctorgalson commented 9 months ago

This has been an issue for me for at least a couple of years:

Re: @mur1chan's comment:

for everyone who is still facing the problem. just install the gnome keyring and you good

Gnome keyring makes this problem worse, because it overlays its own unhelpful behaviour overtop of the original problem (details hidden, as most of that problem is Gnome's, not Nextcloud's).

The basic problem that the desktop app can't maintain a login while the web and phone apps maintain logins for weeks or months is real and ongoing though.


With Gnome keyring installed, as far as I can tell this is what happens... - Nextcloud saves a token or something in the "Default" keyring with no user interaction, _even if you've never used Keyring before_, - on subsequent logins, Gnome's Keyring app login dialog appears _before any app can be launched_, but if you've never used the keyring before, there's no way to know the password (it isn't the login/sudo password), - if you re-authenticate with Nextcloud without using Gnome Keyring, Keyring will _still_ prompt you another couple of times. The solution there is to delete the default keyring, create a new one with a known password, and use it in future (but note that Gnome Keyring's login dialogue blocks access to any other app while it's active _and_ launches before anything else can be accessed, so you need to know the password or have it available via password manager on a phone or other device).
kirbylink commented 8 months ago

I upgraded / reinstalled from Ubuntu 20.04 (Gnome) to Ubuntu 22.04 with KDE (Tuxedo OS version) and now i am facing also with the problem that i have to login after each reboot.

Willdrick commented 8 months ago

After reading on similar issue threads, I stumbled upon installing libgnome-keyring, but now I get the keyring dialog triggered twice every time I log in to my desktop, even though I checked the option to automatically unlock the keyring on login imagen