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

After upgrade to 2.7.3 on Linux, cannot connect to browser #8634

Closed
jcernohorsky opened this issue Oct 24, 2022 · 61 comments · Fixed by #8656 or #8665
Closed

After upgrade to 2.7.3 on Linux, cannot connect to browser #8634

jcernohorsky opened this issue Oct 24, 2022 · 61 comments · Fixed by #8656 or #8665

Comments

@jcernohorsky
Copy link

jcernohorsky commented Oct 24, 2022

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.

@droidmonkey
Copy link
Member

Make sure you run through the browser troubleshooting guide

@jcernohorsky
Copy link
Author

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.

@Schnoop
Copy link

Schnoop commented Oct 24, 2022

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

@droidmonkey
Copy link
Member

Can you replicate this behavior with the appimage?

@git-noise
Copy link

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.

@Schnoop
Copy link

Schnoop commented Oct 24, 2022

@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

@phoerious
Copy link
Member

Is your Firefox installed as a Snap?

@Schnoop
Copy link

Schnoop commented Oct 24, 2022

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

@danielb42
Copy link

danielb42 commented Oct 24, 2022

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.

@jcernohorsky
Copy link
Author

Is your Firefox installed as a Snap?

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

@sajonCC
Copy link

sajonCC commented Oct 24, 2022

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"..., "keepassxc-browser@keepassxc.org"], 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.

@droidmonkey
Copy link
Member

droidmonkey commented Oct 24, 2022

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.

#8030

@Schnoop
Copy link

Schnoop commented Oct 24, 2022

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

@phoerious
Copy link
Member

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

@Schnoop
Copy link

Schnoop commented Oct 24, 2022

Done that. Nothing changed.

@dsoares
Copy link

dsoares commented Oct 24, 2022

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.

@pootriarch
Copy link

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.

@phoerious
Copy link
Member

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

@sajonCC
Copy link

sajonCC commented Oct 24, 2022

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

@jcernohorsky
Copy link
Author

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.

@sajonCC
Copy link

sajonCC commented Oct 24, 2022

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"..., "keepassxc-browser@keepassxc.org"], 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?

@phoerious
Copy link
Member

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

@sajonCC
Copy link

sajonCC commented Oct 24, 2022

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

@mdonz
Copy link

mdonz commented Oct 24, 2022

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.

@varjolintu
Copy link
Member

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

@linkp
Copy link

linkp commented Oct 24, 2022

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.

@mdonz
Copy link

mdonz commented Oct 24, 2022

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.

@Romich777
Copy link

FF Mint - same error

@gbe0
Copy link

gbe0 commented Oct 25, 2022

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.

Jammy doesn't show there anymore, how ever you can get the 2.7.1 package for it from the PPA archive:

https://launchpad.net/~phoerious/+archive/ubuntu/keepassxc/+files/keepassxc_2.7.1-1ppa1~jammy1_amd64.deb

@phoerious
Copy link
Member

See #8634 (comment)
No need to downgrade if you apply this fix.

@gbe0
Copy link

gbe0 commented Oct 25, 2022

See #8634 (comment) No need to downgrade if you apply this fix.

The fix does not work for me; I get the original behavior still.

Ubuntu Jammy
Firefox 107.0b4 (installed from the firefox-next PPA)
KeePassXC from PPA

Initially, the database shows as connected and it may work for some sites before giving the "Cannot connect to KeePassXC. Check that browser integration is enabled in KeePassXC settings." message. I can immediately reproduce the issue by accessing any website using basic HTTP authentication.

@linkp
Copy link

linkp commented Oct 25, 2022

@phoerious The "fix" in the referenced comment does not fix it on my system. (See my previous comment #8634 (comment) for OS system and RPM package details.)

After the 2.7.3 upgrade, clicking the auto-fill icons no longer enters any credentials. I can manually trigger auto-fill by using the contextual menu Request Global Auto-Type option from the KeePassXC-Browser menu.

@danielb42
Copy link

The fix does not work for me; I get the original behavior still.

Ubuntu Jammy Firefox 107.0b4 (installed from the firefox-next PPA) KeePassXC from PPA

Initially, the database shows as connected and it may work for some sites before giving the "Cannot connect to KeePassXC. Check that browser integration is enabled in KeePassXC settings." message. I can immediately reproduce the issue by accessing any website using basic HTTP authentication.

Same here. keepassxc-proxy process is gone by then.

@varjolintu
Copy link
Member

@gbe0 Firefox-Next is the beta release? We don't officially support those. Is keepassxc-proxy vanishing for you too?

@danielb42 Is there any logs or indication that the proxy crashes? It should only disappear if the browser does something to it.

@danielb42
Copy link

danielb42 commented Oct 25, 2022

@varjolintu Nothing at all. No logs, no errors. I tried starting it manually to see stderr maybe, but firefox doesn't seem to use this one.

Debugging the browser addon just prints the usual messages of "Could not connect to.." to the dev console when the proxy has died.

@Mattchooness222
Copy link

I'm getting this exact issue with Firefox 106.0.1 on Windows 10 21H2. I went through the whole troubleshooting document and nothing was able to help. I rolled back to 2.7.1 and all is well again.

@mdonz
Copy link

mdonz commented Oct 25, 2022

Could it be that some of us here with reported issues are using the browser add-ons but also the Thunderbird add-on "keepassmail-xc" and this might be part of the mixed results? Meaning before the workaround (manually remove the contents of $XDG_RUNTIME_DIR or creating the symbolic link) they should also close Thunderbird? Just a thought.

@pootriarch
Copy link

Could it be that some of us here with reported issues are using the browser add-ons but also the Thunderbird add-on "keepassmail-xc" and this might be part of the mixed results? Meaning before the workaround (manually remove the contents of $XDG_RUNTIME_DIR or creating the symbolic link) they should also close Thunderbird?

I don't have Thunderbird at all - in fact I don't have Firefox either, only a fork, which is rarely running (and which I haven't used since attempting the 2.7.3 upgrade).

@danielb42
Copy link

Not using keepassmail-xc either. However I can also confirm that using the 2.7.1 AppImage, the issue of the dying proxy process disappears.

@deadly667
Copy link

After update to 2.7.3 (Chrome browser and KeePassXC was closed) it created symlinks like:

/run/user/1000/org.keepassxc.KeePassXC.BrowserServer -> /run/user/1000/app/org.keepassxc.KeePassXC//org.keepassxc.KeePassXC.BrowserServer=

After fixing symlinks for me everything works.

Ubuntu 20.04
KeePaasXC 2.7.3

@MarioMan632
Copy link

MarioMan632 commented Oct 26, 2022

Looks the issue is effecting multiple OSes and Browsers as it occurs for me on Edge (used for work) on Windows 10 Pro 21H2.
When I get home will see if this occurs on Edge (for Work from home) on my MacBook Pro.

Hopefully there is a fix for this soon on Windows..

@varjolintu
Copy link
Member

@MarioMan632 It's a different issue on Windows. It's already fixed, so downgrading to 2.7.1 in the meanwhile is the only workaround for now.

@droidmonkey droidmonkey changed the title After upgrade from 2.7.1 1ppa1~jammy1 to 2.7.3 jammy 2.7.3-1ppa1~jammy1, browsers cannot connect to database After upgrade to 2.7.3 on Linux, cannot connect to browser Oct 26, 2022
@Booteille
Copy link

Booteille commented Oct 26, 2022

After update to 2.7.3 (Chrome browser and KeePassXC was closed) it created symlinks like:

/run/user/1000/org.keepassxc.KeePassXC.BrowserServer -> /run/user/1000/app/org.keepassxc.KeePassXC//org.keepassxc.KeePassXC.BrowserServer=

After fixing symlinks for me everything works.

Ubuntu 20.04 KeePaasXC 2.7.3

I can confirm fixing the symlink fixed this issue on Pop_OS! 22.04 and KeePassXC 2.7.3.

@pootriarch
Copy link

I can confirm fixing the symlink fixed this issue on Pop_OS! 22.04 and KeePassXC 2.7.3.

Also on Pop_OS! 22.04, normal logins were fine after manually rebuilding the symlink but when I went to comment here, KeePassXC would only populate user/pass but would not populate TOTP. Going back to the 2.7.1 AppImage restored functionality, so while this feels like a red herring, it clearly didn't work and responded to revert, so it becomes a "later" problem.

@RainyCityCoder
Copy link

Had issues with the snap version 2.7.3, and got it working with 2.6.6. Steps (as best I can remember):

  1. uninstall KeePassXC
  2. restart
  3. install KeePassXC 2.6.6 (sudo snap install keepassxc --candidate)
  4. enable browser integration
  5. run "KeePassXC-Browser Helper Script" under the " Snap Package" heading on this page: https://keepassxc.org/download/#linux
  6. restart browser
  7. connect extension to database
  8. test

@varjolintu
Copy link
Member

@RainyCityCoder Why 2.6.6 if there's 2.7.1?

@RainyCityCoder
Copy link

@varjolintu On snapcraft.io there's 2.7.3 of course, 2.7.2, which is listed as beta, and 2.6.6 listed as candidate. As I found out; 2.6.6 is what's available for Debian. Since I couldn't quickly figure out how to revert to 2.7.1, I tried 2.6.6. Since it worked, I'm happy. A quick scan of the keepassxc blog tells me that for my use, I'm unlikely to miss anything introduced by later versions, but if I do at a later date, I can always try to find 2.7.1.

@ShosGithub
Copy link

Same issue on Windows 11 with Edge 106.0.1370.52 after upgrade to 2.7.3
Have Proxy Software installed.
Sometimes it shows credentials, sometimes not.

@styjdt
Copy link

styjdt commented Oct 27, 2022

Also here for Win10 Edge 106.0.1370.52 after upgrade to 2.7.3.
No flaky behaviour, consistently the credentials are not shown/inserted. Same for TOTP.
The KeePassXC "button" is green, showing that connection is good and there and password is available, but clicking it does not change anything...

@keepassxreboot keepassxreboot locked and limited conversation to collaborators Oct 27, 2022
@droidmonkey
Copy link
Member

We don't need any more "me toos", thank you for all the reports!

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