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

nextcloud-client: login not saved #115383

Closed
benneti opened this issue Mar 8, 2021 · 7 comments · Fixed by #116408
Closed

nextcloud-client: login not saved #115383

benneti opened this issue Mar 8, 2021 · 7 comments · Fixed by #116408

Comments

@benneti
Copy link
Contributor

benneti commented Mar 8, 2021

Describe the bug
Since #113731 nextcloud-client (installed via home-manager) fails to save my login.

To Reproduce
Steps to reproduce the behavior:

  1. enable nextcloud service from home-manager
  2. login
  3. reboot
  4. now you have to login again

Expected behavior
libsecret should save my credentials.

Additional context
adding an override that adds the qtwrapperargs back, fixes the problem for me

final: prev: {
  nextcloud-client = (prev.nextcloud-client.overrideAttrs (o: rec {
    # does not find password
    # https://github.com/NixOS/nixpkgs/pull/113731
    # In case nextcloud will not remember passwords...
    qtWrapperArgs = [
      "--prefix LD_LIBRARY_PATH : ${prev.lib.makeLibraryPath [ prev.libsecret ]}"
    ];
  }));
}

Notify maintainers
@bryanasdev000 @caugner

Metadata

  • system: "x86_64-linux"
  • host os: Linux 5.11.2, NixOS, 21.05.20210306.102eb68 (Okapi)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.4pre20201205_a5d85d0
  • nixpkgs: /nix/store/9h81bjrghwldw5xl5yzdsigcj835c7qz-source

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute: nextcloud-client
# a list of nixos modules affected by the problem
module:
@bryanasdev000
Copy link
Member

Interestingly, I thought my session would have just expired.

I will test here and depending on the result, I do a PR to add this wrapper again.

Thanks for the report!

@bryanasdev000
Copy link
Member

Well, in my case nothing has changed, every time I close the nextcloud I have to log in again the next time I open it.

I added this snippet to default.nix (similar to yours):

  qtWrapperArgs = [
    "--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libsecret ]}"
  ];

Could anyone else validate?

@claudiiii
Copy link
Contributor

It crashes after a few seconds if I don't add the qtWrapperArgs. But I also had to move the cache to prevent if from segfaulting as described in #114468.

@benneti
Copy link
Contributor Author

benneti commented Mar 11, 2021

Yes, I also had to remove the cache, but I do not think this is related to the wrapper args.

notarock added a commit to notarock/dotfiles that referenced this issue Mar 12, 2021
bryanasdev000 added a commit to bryanasdev000/nixpkgs that referenced this issue Mar 15, 2021
This should fix NixOS#115383

Signed-off-by: Bryan A. S <bryanasdev000@gmail.com>
jonringer pushed a commit that referenced this issue Mar 19, 2021
This should fix #115383

Signed-off-by: Bryan A. S <bryanasdev000@gmail.com>
@starcraft66
Copy link
Member

This doesn't seem to have fixed it for me. I'm on the latest unstable version of nixpkgs and I need to sign back in every time I start up my computer.

@bryanasdev000
Copy link
Member

This doesn't seem to have fixed it for me. I'm on the latest unstable version of nixpkgs and I need to sign back in every time I start up my computer.

Sorry for the delay, did you have tried to move cache and/or the config?

Also, make sure your keyring is configured correctly, I was with this problem too, turns out I was configuring gnome-keyring wrong.

The path for cache is ~/.cache/Nextcloud/ and for config ~/.config/Nextcloud/.

I am using services.gnome3.gnome-keyring.enable to enable keyring and seahorse to check its config.

@jficz
Copy link
Contributor

jficz commented Aug 25, 2021

@jonringer this doesn't seem to be fixed as per previous comments. I have similar issue with version 3.3.1 currently present in nixos-unstable. Funnily enough Nextcloud client actually creates the proper entry in the keychain when going through the login flow.

The flow currently fails because of some probably unrelated issues (I see "Error transferring https://my.nextcloud.server/login/v2/poll - server replied: Not Found" if it is of any consequence here) but during the flow the entry is created in the keychain. When I update the password manually to an existing token, Nextcloud apparently completely igores it and goes directly to the login flow again.

I see this in the log:

[ info nextcloud.sync.credentials.webflow ]:	Fetch from keychain!
[ debug default ]	[ unknown ]:	static bool LibSecretKeyring::findPassword(const QString&, const QString&, QKeychain::JobPrivate*)
[ warning nextcloud.sync.credentials.keychainchunk ]:	Unable to read "user@nextcloud.server_clientCertificatePEM:https://my.nextcloud.server/:0" chunk "0" "Entry not found"
[ debug default ]	[ unknown ]:	static bool LibSecretKeyring::findPassword(const QString&, const QString&, QKeychain::JobPrivate*)
[ warning nextcloud.sync.credentials.keychainchunk ]:	Unable to read "user@nextcloud.server_clientKeyPEM:https://my.nextcloud.server/:0" chunk "0" "Entry not found"
[ debug default ]	[ unknown ]:	static bool LibSecretKeyring::findPassword(const QString&, const QString&, QKeychain::JobPrivate*)
[ warning nextcloud.sync.credentials.keychainchunk ]:	Unable to read "user@nextcloud.server_clientCaCertificatePEM0:https://my.nextcloud.server/:0" chunk "0" "Entry not found"
[ debug default ]	[ unknown ]:	static bool LibSecretKeyring::findPassword(const QString&, const QString&, QKeychain::JobPrivate*)
[ debug default ]	[ unknown ]:	static bool LibSecretKeyring::findPassword(const QString&, const QString&, QKeychain::JobPrivate*)
[ warning nextcloud.sync.credentials.keychainchunk ]:	Unable to read "user@nextcloud.server_clientCertificatePEM:https://my.nextcloud.server/" chunk "0" "Entry not found"
[ debug default ]	[ unknown ]:	static bool LibSecretKeyring::findPassword(const QString&, const QString&, QKeychain::JobPrivate*)
[ warning nextcloud.sync.credentials.keychainchunk ]:	Unable to read "user@nextcloud.server_clientKeyPEM:https://my.nextcloud.server/" chunk "0" "Entry not found"
[ debug default ]	[ unknown ]:	static bool LibSecretKeyring::findPassword(const QString&, const QString&, QKeychain::JobPrivate*)
[ warning nextcloud.sync.credentials.keychainchunk ]:	Unable to read "user@nextcloud.server_clientCaCertificatePEM0:https://my.nextcloud.server/" chunk "0" "Entry not found"
[ debug default ]	[ unknown ]:	static bool LibSecretKeyring::findPassword(const QString&, const QString&, QKeychain::JobPrivate*)

Note that it looks for the key user@nextcloud.server_clientCaCertificatePEM* but the actual entry in the keychain is called user@nextcloud.server_app-password. Not sure if this is NixOS-related issue or upstream, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants