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

keepassxc: Auto-Type feature not available #94715

Open
mythsunwind opened this issue Aug 5, 2020 · 10 comments
Open

keepassxc: Auto-Type feature not available #94715

mythsunwind opened this issue Aug 5, 2020 · 10 comments
Labels
0.kind: bug Something is broken 6.topic: darwin Running or building packages on Darwin

Comments

@mythsunwind
Copy link

Describe the bug
The feature to auto-type in a password is not working on 2.6.0 version of keepassxc on macOS. I also saw the issue with the a former version 2.5.x.

To Reproduce
Steps to reproduce the behavior:

  1. Open or create a db
  2. Add new entry with user and password and enable Auto-Type for this entry
  3. Select new entry in list
  4. Check Auto-Type tab or right click and search for Auto-Type menu item

Auto-Type tab is greyed out and disabled. No menu item.

Expected behavior
There should be a menu item for auto-type on the entry and also an Auto-Type tab on the bottom of keepassxc. None of them exist, even though the extension is enabled according to the debug info (see below).

Screenshots
Screenshot 2020-08-05 at 17 26 00

More info
cmake contains flag to build auto-type feature with -DWITH_XC_AUTOTYPE=ON. I can attach full build log if needed.

Keepassxc debug info
KeePassXC - Version 2.6.0

Qt 5.12.7
Debugging mode is disabled.

Operating system: macOS 10.15
CPU architecture: x86_64
Kernel: darwin 19.5.0

Enabled extensions:

  • Auto-Type
  • Browser Integration
  • SSH Agent
  • KeeShare (signed and unsigned sharing)
  • YubiKey
  • TouchID

Cryptographic libraries:
libgcrypt 1.8.6

Notify maintainers
@jonafato @turion

Metadata
$ nix-shell -p nix-info --run "nix-info -m"

  • system: "x86_64-darwin"
  • host os: Darwin 19.5.0, macOS 10.15.5
  • multi-user?: yes
  • sandbox: no
  • version: nix-env (Nix) 2.3.6
  • channels(sven): "nixpkgs-20.09pre237079.d418434d127"
  • channels(root): "nixpkgs-20.09pre228165.00df2371122"
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixpkgs

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute:
# a list of nixos modules affected by the problem
module:
@mythsunwind mythsunwind added the 0.kind: bug Something is broken label Aug 5, 2020
@flokli
Copy link
Contributor

flokli commented Aug 5, 2020

cc @NixOS/darwin-maintainers

@turion
Copy link
Contributor

turion commented Aug 5, 2020

Can you somehow rule out an upstream bug?

@mythsunwind
Copy link
Author

mythsunwind commented Aug 5, 2020

Can you somehow rule out an upstream bug?

Yes, I would say it is not an upstream bug because it did not work in 2.5.4 for me and I found a bug ticket on upstream which shows that selecting auto-type from the right-click menu worked for 2.5.4 on macOS Catalina (the macOS version i use) for upstream users:

keepassxreboot/keepassxc#4586

@veprbl veprbl added the 6.topic: darwin Running or building packages on Darwin label Aug 6, 2020
@mythsunwind
Copy link
Author

I checked again and the issue still exists on 2.6.1 in the nix package but upstream version of 2.6.1 is fine.

Additionally the nix version of keepassxc 2.6.1 renders parts of the Qt UI with black icons on a black background now :(

@stale
Copy link

stale bot commented Mar 16, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Mar 16, 2021
@turion
Copy link
Contributor

turion commented Mar 16, 2021

@mythsunwind

I cannot reproduce this on my machine. Auto-type works for me. My system:

  • system: "x86_64-linux"
  • host os: Linux 5.4.77, NixOS, 21.03pre252083.2deeb58f494 (Okapi)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.3.8
  • channels(root): "musnix, nixos-21.03pre268206.536fe36e23a, nixos-hardware"
  • channels(turion): "home-manager"
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos

Possibly you could try to update your system and see whether bug persists? Also, what window manager do you use? Are you in KDE?

I believe that this is not a specific bug in keepassxc, but rather in the nixpkgs-Qt story in general. There have been bugs in the past with Qt introducing state in home directories and whatnot. Perhaps @ttuegel can share his wisdom what to look out for?

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Mar 16, 2021
@stale
Copy link

stale bot commented Sep 14, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Sep 14, 2021
@ljubitje
Copy link

ljubitje commented Nov 11, 2024

This bug is ongoing with KeePassXC 2.7.9 on KDE Plasma 6.2.2.
No Auto-Type settings tab is shown and autotype does not work.
I think it is because of some Wayland limitation.

I have found and tested 3 workarounds, as per KeePassXC docs.
They all force the app to relay on X11 instead of Wayland.

Solution 1: Start KeePassXC from terminal with -platform xcb flag.
Full command is simply: keepassxc -platform xcb

Solution 2: Install KeePassXC as a Flatpak. (How to enable Flatpaks is below the picture.)
Open (KDE Plasma) System Settings -> Application Permissions -> Flatpak Permissions -> KeePassXC -> Advanced Permissions -> Sockets
Disable (untick) Wayland windowing system.
Click Apply and restart KeePassXC.

Solution 3: Install KeePassXC as a Flatpak. (How to enable Flatpaks is below the picture.)
Open (KDE Plasma) System Settings -> Application Permissions -> Flatpak Permissions -> KeePassXC -> Advanced Permissions -> (on bottom) Environment -> Add New
Set Name exactly: QT_QPA_PLATFORM
Set Value exactly: xcb
Click Apply and restart KeePassXC.

Flatpak workarounds work on other distros also! I tested on Debian Bookworm.
If not on KDE Plasma, download and use Flatseal to set advanced Flatpak permissions on your system.

KeePassXCWaylandWorkaroundSolutionFixFlatpak

How to enable Flatpak on NixOS:
Simplest and reproducible way is to configure flake.nix as per https://github.com/gmodena/nix-flatpak:

{
  inputs = {
    # ...
    nix-flatpak.url = "github:gmodena/nix-flatpak"; # unstable branch. Use github:gmodena/nix-flatpak/?ref=<tag> to pin releases.
  };
  outputs = { nix-flatpak, ... }: {
    nixosConfigurations.<host> = nixpkgs.lib.nixosSystem {
      modules = [
        nix-flatpak.nixosModules.nix-flatpak
        ./configuration.nix
      ];
    };
  };
}

Then add this to your configuration.nix:

  # FLATPAK
  services.flatpak.enable = true;
  services.flatpak.update.onActivation = true; # updates flatpaks at nixos-rebuild
  services.flatpak.update.auto.enable = true;
  services.flatpak.update.auto.onCalendar = "7d";
  # PACKAGES
  services.flatpak.packages = [
    "org.keepassxc.KeePassXC"
    # here you can declare other flatpaks to install
  ];

Run nixos-rebuild switch, and you're done!

Extra: If you want a GUI package store, search for kde.Packages.discover and nix-software-center.

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Nov 11, 2024
@ljubitje
Copy link

ljubitje commented Nov 11, 2024

No matter which workaround the user picks, it does not make a reproducible system because it requires manual intervention after installation.
Furthermore, this is another app where I ended up using the Flatpak version instead of the native nixpkgs because of a broken feature and more integrated workaround.

Can you please attempt to enable auto-type feature by setting cmake build flag -DWITH_XC_AUTOTYPE=ON as @mythsunwind suggested, if that is still a valid flag of course?
Or consider finding a solution with QT_QPA_PLATFORM=xcb or platform -xcb.

I am also interested in any other easily-reproducible solutions!

I hope I was of help and a fix will be implemented.
Thanks and all best, Klemen

@KucharczykL
Copy link
Contributor

Apparently they are working on Wayland solution: keepassxreboot/keepassxc#2281

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken 6.topic: darwin Running or building packages on Darwin
Projects
None yet
Development

No branches or pull requests

6 participants