keepassxreboot/keepassxc-browser

Key exchange was not successful.

Closed this issue · 4 comments

Both keepassxc and firefox are not snap apps, both native. Pressing reload results in: Key exchange was not successful.
image
Works fine in chrome. Tried my best following the troubleshooting steps, deleted the native messaging file, deleted the socket.

Debug info

KeePassXC-Browser: Connecting to native messaging host org.keepassxc.keepassxc_browser [client.js:367:13](moz-extension://8d4a1119-3f5d-4d0f-858f-f579e0267ab4/background/client.js)
[Error ] KeePassXC-Browser - Failed to connect: Unknown error [global.js:145:13](moz-extension://8d4a1119-3f5d-4d0f-858f-f579e0267ab4/common/global.js)
[Error client.js:386] KeePassXC-Browser - No content script available for this tab. [global.js:145:13](moz-extension://8d4a1119-3f5d-4d0f-858f-f579e0267ab4/common/global.js)
[Error keepass.js:811] KeePassXC-Browser - 9: Key exchange was not successful. [global.js:145:13](moz-extension://8d4a1119-3f5d-4d0f-858f-f579e0267ab4/common/global.js)
[Error keepass.js:421] KeePassXC-Browser - No content script available for this tab.

strace:

[pid  2982] openat(AT_FDCWD, "/home/harry/.mozilla/native-messaging-hosts/org.keepassxc.keepassxc_browser.json", O_RDONLY <unfinished ...>
[pid  2982] newfstatat(AT_FDCWD, "/usr/bin/keepassxc-proxy",  <unfinished ...>
[pid  2982] newfstatat(AT_FDCWD, "/usr/bin/keepassxc-proxy",  <unfinished ...>
[pid  2982] newfstatat(AT_FDCWD, "/usr/bin/keepassxc-proxy",  <unfinished ...>
[pid  2982] newfstatat(AT_FDCWD, "/usr/bin/keepassxc-proxy",  <unfinished ...>
[pid  2982] newfstatat(AT_FDCWD, "/usr/bin/keepassxc-proxy",  <unfinished ...>
[pid  5738] execve("/usr/bin/keepassxc-proxy", ["/usr/bin/keepassxc-proxy", "/home/harry/.mozilla/native-mess"..., "keepassxc-browser@keepassxc.org"], 0x7f48e09a5300 /* 80 vars */ <unfinished ...>

KeePassXC - 2.7.6
KeePassXC-Browser - 1.8.10
Operating system: Kubuntu
Browser: Firefox

Read the troubleshooting guide on the wiki please, you need to modify Firefox's firejail configuration

https://github.com/keepassxreboot/keepassxc-browser/wiki/Troubleshooting-guide#linux-firejail

I did not think to do this step as I did not know what firejail was and whether it was installed, so I skipped the step.
After doing the step, it is still giving me the same error.

Yes, fixed it.
Though in the documentation it says to run command: sudo aa-enforce /etc/apparmor.d/usr.bin/firefox but the changed config file is /etc/apparmor.d/usr.bin.firefox.