keepassxreboot/keepassxc-browser

browser extension connection problem after updating firefox to version 122.0

Closed this issue ยท 17 comments

Current Behavior

After updating firefox to version 122.0, the keepassxc browser extension is unable to connect.

Steps to Reproduce (for bugs)

  1. update firefox (snap) to version 122.0
  2. attempt to connect the browser extension

As a test, I reverted to firefox version 121.0.1. Then, the extension works fine.
Other things I tried:

  • uninstall and re-install the browser extension
  • re-run the script to setup the browser extension (keepassxc-snap-helper.sh)

Debug info

KeePassXC - 2.7.6
KeePassXC-Browser - 1.8.11
Operating system: Ubuntu 22.04.3
Browser: Firefox Snap for Ubuntu, version 122.0

Some output from sudo strace -f -p $(pgrep firefox) 2>&1 | grep keepass is here: strace_output.txt
Picture of the weblog console:
Screenshot from 2024-01-24 12-20-40

This is a known issue. Sometimes after Firefox update the Native Messaging gets broken. The only solution for now is to restart both KeePassXC and Firefox. Try that first. If the problem is in the Snap package itself, I'd recommend using a normal .deb package instead.

Thank you @varjolintu. Sorry for my ignorance, but if you say "restart", you simply mean quitting both KeePassXC and Firefox and opening again, right? That doesn't help, the extension can still not connect. Or do I need to type specific commands in the terminal to restart?

Agreed, I have restarted both several times and rebooted the machine twice. Nothing works.

A normal restart should work. However, if this is something that Snap itself has broken in their Firefox package, there's nothing we can do about it. I haven't investigated the issue yet.

FYI:
https://www.mozilla.org/en-US/firefox/122.0/releasenotes/

Firefox now supports creating and using passkeys stored in the iCloud Keychain on macOS.

Following solves the issue temporary:

sudo snap revert firefox
firefox --allow-downgrade &

I am having the same problem after update yesterday to Firefox 122.0 using https://ppa.launchpadcontent.net/mozillateam/ppa/ubuntu/

Restarted both applications...no luck. Apparently, Mozilla broke something. All the other browsers I have using keepassxc-browser continue to work.

I am having the same problem after update yesterday to Firefox 122.0 using https://ppa.launchpadcontent.net/mozillateam/ppa/ubuntu/

Restarted both applications...no luck. Apparently, Mozilla broke something. All the other browsers I have using keepassxc-browser continue to work.

I installed the .deb from varjolintu's provided link and everything is working again. Thank you!

So on closer investigation, apparently I did have Firefox snap. The ppa wasn't installing the deb package. Apt says I have the latest Firefox snap. I specifically used the ppa to install the deb because of keepassxc connection issues with snap. I'd been thwarted!

Having the same issue, I have created a bug-report in Bugzilla: https://bugzilla.mozilla.org/show_bug.cgi?id=1876495

Having the same issue, I have created a bug-report in Bugzilla: https://bugzilla.mozilla.org/show_bug.cgi?id=1876495

I doubt this bug has anything to do with Mozilla. This is probably because of Ubuntu's Snap and their Native Messaging implementation.

Hmm then why did it work without issues before the update to 122.0? I have always used the Snap version, and it still works for me in Chromium which is also installed using Snap.

I am getting the same problem.

The Snap of Firefox was updated to 122.0 and KeePassXC no longer connected. I read that Mozilla were now doing a .deb package that was no longer contained in a sandbox and easier to integrate with, so by chance, went to the same link as varjolinu shows above and downloaded and installed Firefox 122.0 .deb package. KeePassXC Browser will still not connect to and open database:
Key exchange was not successful.
Cannot connect to KeePassXC. Check that browser integration is enabled in KeePassXC settings.
_

I have removed and reinstalled the Browser Extension and while trying to sort things out, found that in Advance Settings of KeePassXC there is a 'custom browser configuration location'. I found that the .mozilla config file is now in ~/.mozilla/native-messaging-hosts and not in ~/.config/mozilla/native-messaging-hosts, so edited that. Unfortunately, that has made no difference.

EDIT: OS is Ubuntu 22.04

With Ubuntu, please also check if any AppArmor settings has been changed:
https://github.com/keepassxreboot/keepassxc-browser/wiki/Troubleshooting-guide#6-apparmor-with-ubuntu

@varjolintu Seems you were partly right. The bug-report I created has been closed as a duplicate, while referring to another bug-report that does have something to do with the Native Messaging:

https://bugzilla.mozilla.org/show_bug.cgi?id=1876447

They are working on resolving it:

Thanks for the bug report. The messaging portal patch is indeed part of the snap and not upstream at this point. The patch was refreshed to apply cleaning to 122 and rebased at the same time on the current phabricator version which made it use a new dbus method. We didn't notice that this method hadn't been backported to the Ubuntu 22.04 portal package. We are working now on reverting the patch to not depends on the new method.

So glad snaps are robust and healthy ecosystem not filled with app specific workarounds and silly fake sandboxing. /s

I edited AppArmor.d with the modifications in your link, however, restarted computer (aa-enforce was missing). Then Firefox refused to load any tabs. (I will sort that later)

Does it matter where in the usr.bin.firefox file the modifications are made?

Not so 'worried' now after getting @antiftw response.

Thank you all! (I can be very dangerous at the Keyboard, so these messages help with my confidence!! :lol)

Just updated Firefox Snap to the newest version, and it works again!