keepassxreboot / keepassxc-browser

KeePassXC Browser Extension
GNU General Public License v3.0
1.78k stars 188 forks source link

Cannot connect using Edge, Keepassxc opens when clicking the browser reload button (reload button on the keepass addon I mean) #2030

Open TxTechnician opened 1 year ago

TxTechnician commented 1 year ago

Expected Behavior

Current Behavior

I cannot connect to keepassxc from microsoft-edge-stable. When I click on the reload button in the extension. Keepassxc, if it is already open, opens. But there is no prompt or anything. It just opens to the screen I last selected in Keepassxc.

Error message shown in browser extenstion:
Cannot connect to KeePassXC. Check that browser integration is enabled in KeePassXC settings.

Browser Integration settings: image

Here is my system:

KeePassXC - Version 2.7.6
Revision: dd21def
Distribution: Flatpak

Qt 5.15.10
Debugging mode is disabled.

Operating system: KDE Flatpak runtime
CPU architecture: x86_64
Kernel: linux 6.5.0-10-generic

Enabled extensions:
- Auto-Type
- Browser Integration
- SSH Agent
- KeeShare
- YubiKey
- Secret Service Integration

Cryptographic libraries:
- Botan 3.2.0

KeepassxcProblem.txt

txtechnician@laptop-txtechnician:~$ sudo strace -f -p 20858 2>&1 | grep keepass
[pid 20882] readlink("/home/txtechnician/.config/microsoft-edge/Default/Extensions/pdffhmdngciaglkoonimfcmckehcpafo/1.8.9_0/icons/keepassxc_48x48.png",  <unfinished ...>
[pid 20882] access("/home/txtechnician/.config/microsoft-edge/Default/Extensions/pdffhmdngciaglkoonimfcmckehcpafo/1.8.9_0/icons/keepassxc_48x48.png", F_OK <unfinished ...>
[pid 20882] openat(AT_FDCWD, "/home/txtechnician/.config/microsoft-edge/Default/Extensions/pdffhmdngciaglkoonimfcmckehcpafo/1.8.9_0/icons/keepassxc_48x48.png", O_RDONLY|O_CLOEXEC <unfinished ...>
[pid 20882] access("/home/txtechnician/.config/microsoft-edge/NativeMessagingHosts/org.keepassxc.keepassxc_browser.json", F_OK <unfinished ...>
[pid 20882] openat(AT_FDCWD, "/home/txtechnician/.config/microsoft-edge/NativeMessagingHosts/org.keepassxc.keepassxc_browser.json", O_RDONLY|O_CLOEXEC <unfinished ...>
[pid 20882] access("/var/lib/flatpak/exports/bin/org.keepassxc.KeePassXC", F_OK) = 0
[pid 42983] execve("/var/lib/flatpak/exports/bin/org.keepassxc.KeePassXC", ["/var/lib/flatpak/exports/bin/org"..., "chrome-extension://pdffhmdngciag"...], 0x1b2000078780 /* 55 vars */) = 0
[pid 42983] openat(AT_FDCWD, "/var/lib/flatpak/exports/bin/org.keepassxc.KeePassXC", O_RDONLY) = 3
[pid 42983] execve("/usr/bin/flatpak", ["/usr/bin/flatpak", "run", "--branch=stable", "--arch=x86_64", "org.keepassxc.KeePassXC", "chrome-extension://pdffhmdngciag"...], 0x55ee5c553f98 /* 55 vars */) = 0
[pid 42983] statx(AT_FDCWD, "/home/txtechnician/.local/share/flatpak/app/org.keepassxc.KeePassXC/x86_64/stable/active", AT_STATX_SYNC_AS_STAT|AT_SYMLINK_NOFOLLOW|AT_NO_AUTOMOUNT, STATX_ALL, 0x7fff934e80a0) = -1 ENOENT (No such file or directory)
[pid 42983] statx(AT_FDCWD, "/var/lib/flatpak/app/org.keepassxc.KeePassXC/x86_64/stable/active", AT_STATX_SYNC_AS_STAT|AT_SYMLINK_NOFOLLOW|AT_NO_AUTOMOUNT, STATX_ALL, {stx_mask=STATX_ALL|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFLNK|0777, stx_size=64, ...}) = 0
[pid 42983] readlink("/var/lib/flatpak/app/org.keepassxc.KeePassXC/x86_64/stable/active", "bee71bce744c659455c504dfb535464d"..., 256) = 64
[pid 42983] statx(AT_FDCWD, "/var/lib/flatpak/app/org.keepassxc.KeePassXC/x86_64/stable/bee71bce744c659455c504dfb535464dec303fc9d33ff81197cdc9b3a7f4621b", AT_STATX_SYNC_AS_STAT|AT_SYMLINK_NOFOLLOW|AT_NO_AUTOMOUNT, STATX_ALL, {stx_mask=STATX_ALL|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFDIR|0755, stx_size=4096, ...}) = 0
[pid 42983] openat(AT_FDCWD, "/var/lib/flatpak/app/org.keepassxc.KeePassXC/x86_64/stable/bee71bce744c659455c504dfb535464dec303fc9d33ff81197cdc9b3a7f4621b/metadata", O_RDONLY|O_CLOEXEC) = 11
[pid 42983] read(11, "[Application]\nname=org.keepassxc"..., 8192) = 895
......

//2151c34eae6ab8b65f2db52eba5f75d1-le64.cache-8", O_RDONLY|O_CLOEXEC) = 6
[pid 43002] openat(AT_FDCWD, "/home/txtechnician/.var/app/org.keepassxc.KeePassXC/cache/fontconfig//2300eef321c393bfd76478a5c0e95b23-le64.cache-8", O_RDONLY|O_CLOEXEC) = 6
[pid 43002] openat(AT_FDCWD, "/home/txtechnician/.var/app/org.keepassxc.KeePassXC/cache/fontconfig//a4e60e8d1e10d2fdff3fe3037a1845fb-le64.cache-8", O_RDONLY|O_CLOEXEC) = 6
[pid 43002] openat(AT_FDCWD, "/home/txtechnician/.var/app/org.keepassxc.KeePassXC/cache/fontconfig//6333f38776742d18e214673cd2c24e34-le64.cache-8", O_RDONLY|O_CLOEXEC) = 6
^C

Possible Solution

Steps to Reproduce (for bugs)

  1. Install Edge via apt
  2. Install Keepass via flatpack
  3. Install Edge browser extension
  4. Try to connect

Debug info

varjolintu commented 1 year ago

It's a known problem that sometimes the Flatpak tries to start KeePassXC instance instead of keepassxc-proxy. I can try and search the relevant tickets later that could help solving the issue.

TxTechnician commented 1 year ago

That would be helpful. Any workaround I can find for the flatpak version. Because I would like to continue to use that version.

Do you know if the problem happens with the snap version?

varjolintu commented 1 year ago

Creating a shell script (part 2-A here) has worked sometimes. I must refresh my memory how the actual issue was solved, or is it already solved by modifying relevant scripts inside KeePassXC.

Snap is not recommended.

TxTechnician commented 1 year ago

"Snap is not recommended."

Seems to be a common phrase shared by many linux users.

droidmonkey commented 1 year ago

I think we have a regression need to look into the flatpak distribution