keepassxc icon indicating copy to clipboard operation
keepassxc copied to clipboard

After upgrade to 2.7.3 on Linux, cannot connect to browser

Open jcernohorsky opened this issue 1 year ago • 61 comments

After upgrade from 2.7.1 1ppa1~jammy1 to 2.7.3-1ppa1~jammy1 from PPA, internet browsers cannot connect to database. From plugin debug I had "Unknown Error". Firefox extension plugin: 1.8.3 Firefox version: 102.4.0 esr After downgrade to 2.7.1 everything is working again.

jcernohorsky avatar Oct 24 '22 11:10 jcernohorsky

Make sure you run through the browser troubleshooting guide

droidmonkey avatar Oct 24 '22 11:10 droidmonkey

Yep, I do :). ~/.mozilla/native-messaging-hosts is OK Check the native messaging script file path and extension ID's is OK keepassxc-proxy is running And under "Debug the extension itself" I got "unknown error"

Thank you.

jcernohorsky avatar Oct 24 '22 11:10 jcernohorsky

I've the same problem. Updated yesterday from 2.7.1 1ppa1~jammy1 to 2.7.3-1ppa1~jammy1 via PPA. Chrome Extension: 1.8.3 Chrome Version: 106.0.5249.119

The icons in the input fields went from "Keepass file locked" to "Keepass file is open". But it is not showing any credentials.

The error messages from the browser plugin are varied:

Cannot send activated_tab message: Could not establish connection. Receiving end does not exist

Nonce compare failed

Regards

Schnoop avatar Oct 24 '22 12:10 Schnoop

Can you replicate this behavior with the appimage?

droidmonkey avatar Oct 24 '22 12:10 droidmonkey

Hello, I had the same issue, but while trying to debug using the recommended command: sudo strace -f -p $(pgrep firefox) 2>&1 | grep keepass, it suddenly worked. I am using the firefox snap and saw some apparmor logs DENY too, no clue if its related.

git-noise avatar Oct 24 '22 12:10 git-noise

@droidmonkey yes, i can replicate the problem with the latest appimage. Add just to make sure: The problem is not there if i use the appimage version 2.7.1

Schnoop avatar Oct 24 '22 12:10 Schnoop

Is your Firefox installed as a Snap?

phoerious avatar Oct 24 '22 13:10 phoerious

Don't know if you referring to me or not. In my case it is Google Chrome not Firefox. No Snap.

Schnoop avatar Oct 24 '22 13:10 Schnoop

My Firefox is not installed via Snap: 106.0.1+build1-0ubuntu0.22.04.1~mt1 from mozilla-ppa. I'm experiencing this issue only randomly: Since upgrading to 2.7.3-1ppa1~jammy1, I sometimes need to click "Reconnect" in the browser widget/popup when using new tabs.

danielb42 avatar Oct 24 '22 13:10 danielb42

Is your Firefox installed as a Snap?

Hi @phoerious , my Firefox is from Firefox PPA. No snap.

jcernohorsky avatar Oct 24 '22 13:10 jcernohorsky

I can confirm this bug. Firefox 106.0.1 installed from ppa KeepassXC 2.7.3 installed from ppa KeepassXC Firefox Add-on 1.8.3

result of sudo strace -f -p $(pgrep firefox) 2>&1 | grep keepass

[pid 38462] openat(AT_FDCWD, "/home/sajon/.mozilla/native-messaging-hosts/org.keepassxc.keepassxc_browser.json", O_RDONLY <unfinished ...> [pid 37720] newfstatat(AT_FDCWD, "/usr/bin/keepassxc-proxy", <unfinished ...> [pid 37720] newfstatat(AT_FDCWD, "/usr/bin/keepassxc-proxy", <unfinished ...> [pid 37720] newfstatat(AT_FDCWD, "/usr/bin/keepassxc-proxy", <unfinished ...> [pid 37720] newfstatat(AT_FDCWD, "/usr/bin/keepassxc-proxy", <unfinished ...> [pid 38509] execve("/usr/bin/keepassxc-proxy", ["/usr/bin/keepassxc-proxy", "/home/sajon/.mozilla/native-mess"..., "[email protected]"], 0x7f45cb92c900 /* 77 vars */ <unfinished ...>

keepassxc-proxy is runing.

I've followed troubleshooting guide but no luck to resolve the problem. I will try to downgrade to 2.7.1 and provide you with info.

sajonCC avatar Oct 24 '22 13:10 sajonCC

This might be related to moving the proxy socket to a subdirectory. Specifically if the proxy version isn't updated but keepassxc is then comms will fail. Restarting browser or computer should cause the new proxy to be loaded.

https://github.com/keepassxreboot/keepassxc/pull/8030

droidmonkey avatar Oct 24 '22 13:10 droidmonkey

@droidmonkey i'm sorry to tell you that a reboot does not fix the problem for me.

Schnoop avatar Oct 24 '22 13:10 Schnoop

Make sure you have "Update native messaging manifests at startup" enabled in the advanced browser integration settings in KeePassXC and then restart KeePassXC.

phoerious avatar Oct 24 '22 13:10 phoerious

Done that. Nothing changed.

Schnoop avatar Oct 24 '22 14:10 Schnoop

After upgrade from keepassxc 2.7.2 to 2.7.3, (snap package), the browser integration stopped working. I've already:

  • read the browser troubleshooting guide multiple times
  • checked the ~/.config/google-chrome/NativeMessagingHosts/org.keepassxc.keepassxc_browser.json file.
  • reinstalled with --devmode I use google-chrome from the Ubuntu 22.04 repository. I downgraded to snap package version 2.7.2 and it works again. Something is broken with 2.7.3.

dsoares avatar Oct 24 '22 15:10 dsoares

I can confirm this - using Brave on Linux, upgrading KeePassXC to 2.7.3 immediately broke browser integration. Downloading the 2.7.1 AppImage, then stopping 2.7.3 and running the AppImage, immediately fixed the problem without a reboot.

ghost avatar Oct 24 '22 15:10 ghost

I cannot reproduce this with Chrome and 2.7.3 from the PPA.

phoerious avatar Oct 24 '22 15:10 phoerious

I've try with official ppa for ubuntu (ver. 2.6.6), offical ppa for KeePassXC (ver. 2.7.3) and AppImage ver 2.7.3). Nothing is working :( Can some one provide me with the link to version 2.7.1 (AppImage, ppa..)

Thanks

sajonCC avatar Oct 24 '22 15:10 sajonCC

I've try with official ppa for ubuntu (ver. 2.6.6), offical ppa for KeePassXC (ver. 2.7.3) and AppImage ver 2.7.3). Nothing is working :( Can some one provide me with the link to version 2.7.1 (AppImage, ppa..)

Thanks

http://ppa.launchpad.net/phoerious/keepassxc/ubuntu/pool/main/k/keepassxc/ ... and choose 2.7.1 for your distrib.

jcernohorsky avatar Oct 24 '22 16:10 jcernohorsky

Thanks, I've try 2.7.1 and it's not working for me :( Strange think, when I start firefox and keepassxc I can not find keepassxc-proxy running. Why this is not started automatically?

When I start keepassxc-proxy manually, I can see this in the konsole: [pid 6174] <... sendmmsg resumed>[{msg_hdr={msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="q\311\1 \0\1\0\0\0\0\0\1\tkeepassxc\3org\0\0\1\0\1\0"..., iov_len=42}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, msg_len=42}, {msg_hdr={msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="X\317\1 \0\1\0\0\0\0\0\1\tkeepassxc\3org\0\0\34\0\1\0"..., iov_len=42}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, msg_len=42}], 2, MSG_NOSIGNAL) = 2 [pid 6174] recvfrom(87, "X\317\201\200\0\1\0\1\0\0\0\1\tkeepassxc\3org\0\0\34\0\1\300"..., 2048, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("127.0.0.53")}, [28 => 16]) = 70 [pid 6174] recvfrom(87, "q\311\201\200\0\1\0\1\0\0\0\1\tkeepassxc\3org\0\0\1\0\1\300"..., 65536, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("127.0.0.53")}, [28 => 16]) = 58 [pid 6114] openat(AT_FDCWD, "/home/sajon/.mozilla/native-messaging-hosts/org.keepassxc.keepassxc_browser.json", O_RDONLY <unfinished ...> [pid 5580] newfstatat(AT_FDCWD, "/usr/bin/keepassxc-proxy", <unfinished ...> [pid 5580] newfstatat(AT_FDCWD, "/usr/bin/keepassxc-proxy", <unfinished ...> [pid 5580] newfstatat(AT_FDCWD, "/usr/bin/keepassxc-proxy", <unfinished ...> [pid 5580] newfstatat(AT_FDCWD, "/usr/bin/keepassxc-proxy", <unfinished ...> [pid 6203] execve("/usr/bin/keepassxc-proxy", ["/usr/bin/keepassxc-proxy", "/home/sajon/.mozilla/native-mess"..., "[email protected]"], 0x7f1cc0eb3d00 /* 78 vars */ <unfinished ...> and still is not working.

Message in the browser pop-up is "Key exchange was not successful"

What am I doing wrong?

sajonCC avatar Oct 24 '22 17:10 sajonCC

You cannot start the proxy yourself, this is done by the browser when you click "Retry" or "Reconnect".

phoerious avatar Oct 24 '22 17:10 phoerious

Ok, clear. Do you see anything unusual in strace output?

sajonCC avatar Oct 24 '22 18:10 sajonCC

FWIW, I am using the latest PPA versions of Firefox and Chromium on Ubuntu 22.04 (no snaps in use) and the upgrade for Keepassxc from 2.7.1 to 2.7.3 yesterday broke functionality as described by various users. Computer restart did not help. Uninstall of 2.7.3 and download and install of 2.7.1 restored functionality here. Happy to try to help with testing but do not know where to look for that.

mdonz avatar Oct 24 '22 18:10 mdonz

Reboot shouldn't be needed if keepassxc-proxy is killed, or the browser is restarted (which terminates the proxy).

varjolintu avatar Oct 24 '22 19:10 varjolintu

On openSUSE Leap 15.4 with Brave Browser 1.44.112, KeepassXC-Browser extension 1.8.3 and a precipitating upgrade to KeepassXC 2.7.3, I resolved the problem by removing and reconnecting the database in the browser extension settings.

Update: I spoke too soon. It worked one time, but has returned to no longer retrieving credentials.

linkp avatar Oct 24 '22 20:10 linkp

Reboot shouldn't be needed if keepassxc-proxy is killed, or the browser is restarted (which terminates the proxy). I restarted the browser(s) first which did not solve the issue (not knowing how the keepass-proxy process works). As a next step in trying, I restarted completely. Still no joy at the time hence downgrade was the only option that I figured out would get me back to work yesterday.

mdonz avatar Oct 24 '22 22:10 mdonz

FF Mint - same error

Romich777 avatar Oct 25 '22 08:10 Romich777

Tested this briefly with a pretty fresh Xubuntu install which didn't have KeePassXC installed at all. Everything works normally.

Did these steps:

  1. Uninstalled the Snap Firefox and replaced it with ppa:mozillateam/ppa's Firefox.
  2. Downloaded an AppImage for 2.7.3 from keepassxc.org.
  3. Opened KeePassXC, enabled Browser Integration and made a new test database.
  4. Connected the extension do database, everything worked.

I also checked if XDG_RUNTIME_DIR was enabled. It was, pointing to /run/user/1000. The new socket location is now /run/user/1000/app/org.keepassxc.KeePassXC/org.keepassxc.KeePassXC.BrowserServer and the socket exists after KeePassXC start.

And I also saw there's a symbolic link from /run/user/1000/org.keepassxc.KeePassXC.BrowserServer -> /run/user/1000/app/org.keepassxc.KeePassXC//org.keepassxc.KeePassXC.BrowserServer.

varjolintu avatar Oct 25 '22 09:10 varjolintu

I'm on Windows and got redirected to this issue from #8648 I tried reinstalling version 2.7.1, but still the credentials are not entered in the username/password fields (Edge). The KeepassXC icon in the username text input remains grey and clicking it doesn't do anything. Error in the logs: KeePassXC-Browser - Error: Credential list is empty

kipusoep avatar Oct 25 '22 09:10 kipusoep