Keepassxc-browser does not connect at all with Firefox.
The plugin shows "Timeout or not connected to KeePassXC" and doesn't change when I hit "reload" button. I'd expect it to connect to the keepassxc database.
Doesn't connect at all
Not known, tested the same steps on chromium and it worked just fine.
Error: Promised response from onMessage listener at @moz-extension://202a47ac-4270-4cdc-b3cb-88c3d4333ee8/background/init.js:77:1 went out of scope keepassxc-browser.js:1244:17
KeePassXC - 2.3.1
keepassxc-browser - 1.0.1
Operating system: Mac/Win/Linux
Browser: Firefox
Proxy used: yes
Check out this guide for troubleshooting.
Ok, checked the file "/home/tmy/.mozilla/native-messaging-hosts/org.keepassxc.keepassxc_browser.json" exists and has correct path.
When should the keepassxc-proxy be running? When I hit reload?
I don't see that in process list, when running it manually it stays on but prints following:
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-tmy'
But even then the reload button does nothing.
Does that temporary path exist? Have you tried to set XDG_RUNTIME_DIR?
Yes, the directory exists:
tmy@phobos facebook $ ls -la /tmp/runtime-tmy/
total 8
drwx------ 2 tmy wheel 512 Apr 1 09:10 ./
drwxrwxrwt 30 root wheel 1024 Apr 1 12:17 ../
srwx------ 1 tmy wheel 0 Apr 1 09:10 kpxc_server=
I tried to set the dir to point under my home dir but that didn't help.
What does the browser debug console say when doing reload?
ErrorcolumnNumber: 1fileName: "undefined"lineNumber: 0message: "Promised response from onMessage listener at @moz-extension://202a47ac-4270-4cdc-b3cb-88c3d4333ee8/background/init.js:77:1 went out of scope"stack: ""__proto__: Object { … } keepassxc-browser.js:1244:17
Nothing else? That error is a non-issue.
Didn't see anything else regarding keepassxc. Nor does clicking and waiting connect... or it takes longer than minute to connect.
I wonder if there's some kind of mixup going on. Does /tmp/kpxc_server exist too? Both KeePassXC and the proxy should use the same socket.
tmy@phobos tmy $ ls -l /tmp/runtime-tmy/
total 0
srwx------ 1 tmy wheel 0 Apr 1 09:10 kpxc_server=
tmy@phobos tmy $ ls -l /tmp | grep keep*
-rw-r--r-- 1 tmy wheel 37 Apr 1 09:03 keepassxc-tmy.lock
srwx------ 1 tmy wheel 0 Apr 1 09:03 keepassxc-tmy.socket=
tmy@phobos tmy $
So the proxy uses /tmp/runtime-tmy and keepassxc uses /tmp?
I tried to set the proxy to /tmp but it warns:
tmy@phobos tmy $ XDG_RUNTIME_DIR=/tmp keepassxc-proxy
QStandardPaths: wrong ownership on runtime directory /tmp, 0 instead of 1000
Both KeePassXC and the proxy should use the same socket. Just making sure if there's something strange going on. Have you tried if connection works without the proxy? KeePassXC should be closed, then restart the browser and KeePassXC should open.
Same problem here, on Fedora 27.
I have a strange occurrence to report in this same vein. I have two computers, both with up-to-date Debian Sid + Firefox. On the first computer, the browser extension manages to connect to keepassxc out of the box, no problem. On the second computer, replicating the exact same steps, it does not work, giving the error message (Timeout or not connected to KeePassXC)
Also, in the extension menu, the KeePassXC version shows correctly as 2.3.1 on the first computer, but on computer 2 it shows as 'unknown', even though they have the exact same package from the Debian Sid repo.
I made sure that org.keepassxc.keepassxc_browser.json points to the correct path /usr/bin/keepassxc-proxy. and I observed that the extension wasn't launching the proxy as it should when opening Firefox.
So I went to the debug menu for the extension, and found messages such as this:
Error 5: Timeout or not connected to KeePassXC keepass.js:954:5
Connecting to native messaging host org.keepassxc.keepassxc_browser keepass.js:870:5
Failed to execute command "/usr/bin/keepassxc-proxy" NativeMessaging.jsm:101
this.NativeApp</this.startupPromise< resource://gre/modules/NativeMessaging.jsm:101:9
Failed to connect: Unknown error keepass.js:846:5
Error 5: Timeout or not connected to KeePassXC keepass.js:954:5
TypeError: keepass.nativePort is null[Learn More] keepass.js:92:13
uncaught exception: false (unknown)
[Exception... "Component returned failure code: 0xc1f30001 (NS_ERROR_NOT_INITIALIZED) [nsIMessageSender.sendAsyncMessage]" nsresult: "0xc1f30001 (NS_ERROR_NOT_INITIALIZED)" location: "JS frame :: resource://gre/modules/ExtensionUtils.jsm :: sendAsyncMessage :: line 524" data: no] (unknown)
I dug into the keepass.js file and it seems to me like keepass.nativePort is supposed to be null at the start and then gets assigned a value through the proxy, but for some reason on computer 2 it's not doing that, while on 1 it picked it up immediately and has a valid value. Any idea what could be causing this discrepancy? As far as I can tell, both computers have the same config options, and I didn't follow the procedure differently between them.
NS_ERROR_NOT_INITIALIZED means that the keepassxc-proxy cannot be launched. I suppose it still works if you try to start it manually?
This PR might help a little to the issue: https://github.com/keepassxreboot/keepassxc/pull/1818
I closed the keepassxc process and tried the firefox extension still reports the same timeout message. So it won't work without proxy either.
Well that's strange. Did the binary change from keepassxc-proxy to keepassxc in the json script?
What is that you need to make sure they are the same bug?
@mircsicz Did you check the troubleshooting guide?
Just checked on my Mac:
mircsicz@MacBook-Pro ~ $ ls -l ~/Library/Application\ Support/Google/Chrome/NativeMessagingHosts
total 16
-rw-r--r-- 1 mirco staff 378 3 Apr 13:01 org.keepassxc.keepassxc_browser.json
mircsicz@MacBook-Pro ~ $ cat ~/Library/Application\ Support/Google/Chrome/NativeMessagingHosts/org.keepassxc.keepassxc_browser.json
{
"allowed_origins": [
"chrome-extension://iopaggbpplllidnfmcghoonnokmjoicf/",
"chrome-extension://oboonakemofpalcgghocfoadofidjkkk/"
],
"description": "KeePassXC integration with native messaging support",
"name": "org.keepassxc.keepassxc_browser",
"path": "/Applications/KeePassXC.app/Contents/MacOS/keepassxc-proxy",
"type": "stdio"
}
mircsicz@MacBook-Pro ~ $ ls -l /Applications/KeePassXC.app/Contents/MacOS/keepassxc-proxy
-rwxr-xr-x 1 mirco staff 43648 6 Mär 23:16 /Applications/KeePassXC.app/Contents/MacOS/keepassxc-proxy
mircsicz@MacBook-Pro ~ $ ps ax|grep proxy
20942 ?? S 0:00.04 /Applications/KeePassXC.app/Contents/MacOS/keepassxc-proxy chrome-extension://oboonakemofpalcgghocfoadofidjkkk/
the only thing that suprise's me is that I've two allowed origins, rest should be fine...
@mircsicz That looks fine. Any help using the official migration guide?
Been there done that, it works after unlocking the DB and clicking Reload in the Browser extension.
So what else could be done to solve the issue?
Please try out 2.3.3 when we release it in the evening. I had some problems with the connection as well, but the new builds seem to solve them.
We fixed some length inconsistencies in the native messaging protocol.
@mircsicz I'm sorry if I don't understand but what's exactly the issue if using Reload in the browser extension works? Database needs to be open. In the next browser extension release reloading will be made automatically.
I expected it to ask me to unlock the DB as I’ve set that checkbox…
Besides that no big issue just a little inconvenient ;-)
Greetz
Mirco
Am 09.05.2018 um 13:13 schrieb Sami Vänttinen notifications@github.com:
@mircsicz https://github.com/mircsicz I'm sorry if I don't understand but what's exactly the issue if using Reload in the browser extension works? Database needs to be open. In the next browser extension release reloading will be made automatically.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/keepassxreboot/keepassxc-browser/issues/102#issuecomment-387705577, or mute the thread https://github.com/notifications/unsubscribe-auth/AHDjocfuzZk_3iqTQaF7u-ANgeIopE69ks5tws9ogaJpZM4TCu54.
@mircsicz It should. The next browser extension release fixes this also, and there's already a PR for KeePassXC 2.4.0 which uses the same unlock dialog with AutoType so it will work even better :)
Just tried again after updating to keepassxc-2.3.3 and keepassxc-browser-1.1.3 but same result, "Timeout or not connected to Keepassxc" persists.
I also tried killing the keepassxc from background and hitting reload from browser but it still didn't work.
Tested chrome and it continues to work just fine.
Console shows following:
Error: Promised response from onMessage listener at @moz-extension://202a47ac-4270-4cdc-b3cb-88c3d4333ee8/background/init.js:79:1 went out of scope
keepassxc-browser.js:1882:13
I really cannot find a reason why Firefox doesn't work and Chrome works. Maybe I need to install OpenBSD VM and try it myself.
I have exactly the same issue (Firefox / Linux). And I hqave found that "Firefox" checkbox is always unticked each time I close KeepassXC database (before, I have clicked on Apply and OK button).
By checking the troubleshooting guide, I have not found any file called _org.keepassxc.keepassxc_browser.json_ this is strange.
I am not a developper so it is a bit complex to me.
@prog-amateur Could you check if a location ~/.mozilla/native-messaging-hosts exists? And that .mozilla folder has permissions to write in it?
@zmyrgel I have problems debugging the extension from Firefox in OpenBSD. When clicking Debug from about:debugging nothing happens. Have you got the same problem? I even tried to set XDG_RUNTIME_DIR but that didn't help either.
@varjolintu thank you for your help, I confirm that location ~/.mozilla/native-messaging-hosts does NOT exist but .mozilla folder has permission to write in other folders
@prog-amateur Clicking the Firefox checkbox should create that directory and the JSON script. And it should also show warning if it didn't succeed. Of course you can try to create the file manually.
There is neither folder nor warning. I have made a folder called native-messaging-hosts and tried to reload without success. I use the flatpack version, do you think it has any consequence ?
@varjolintu yeah, same issue when hitting debug. I was wondering if thats how it was supposed to function but apparently it should give some feedback when the debug is enabled.
@zmyrgel It should open a separate window for debugging purposes. When that doesn't work the options are quite limited.. there's no other way to debug the background scripts.
Firefox Quantum 60.0.1 Clean install of the application (Archlinux -current) following the steps in the install guide exactly.
Same error.
@caseyjp11 Did troubleshooting guide help?
I have also been having problems with KeePassXC connecting to Firefox, intermittently, for a few weeks. For instance, it worked fine yesterday but today the browser extension will not connect to KeePassXC. Chromium connects fine. KeePassXC was started before either browser, after a fresh boot.
KeePassXC - 2.3.3 installed via deb package from the official PPA (not flatpack or snap)
keepassxc-browser - 1.1.7
Operating system: Ubuntu 18.04
Browser: Firefox 60.0.2 (64-bit)
Proxy used: yes
Firefox is checked / enabled in KeePassXC - Browser Integration (non-legacy)
Symptom:
After starting KeePassXC and then FireFox, the KeePassXC icon in the browser toolbar shows "KeePassXC-Browser has not been configured. Press the connect button to register and pair with KeePassXC. " with a "Connect" button. Clicking "Connect" has no effect.
The extension was working OK yesterday. In days previous, sometimes it would ask to form a new connection to the database (and I had to verify that I wanted to overwrite the existing one). Previously I had tried removing the connection & re-saving, but that only worked temporarily as you can see.
From the troubleshooting guide:
ag path ~/.mozilla/native-messaging-hosts/org.keepassxc.keepassxc_browser.json
"path": "/usr/bin/keepassxc-proxy",
❯ file /usr/bin/keepassxc-proxy
/usr/bin/keepassxc-proxy: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=5c93379511b3b596263c796df1400ce047a0e69b, stripped
❯ pgrep -la keepassxc
2847 keepassxc
4627 /usr/bin/keepassxc-proxy chrome-extension://oboonakemofpalcgghocfoadofidjkkk/
6341 /usr/bin/keepassxc-proxy /home/tracey/.mozilla/native-messaging-hosts/org.keepassxc.keepassxc_browser.json [email protected]
Debugging output after clicking the extension icon:
08:12:16.658 [Exception... "Component returned failure code: 0xc1f30001 (NS_ERROR_NOT_INITIALIZED) [nsIMessageSender.sendAsyncMessage]" nsresult: "0xc1f30001 (NS_ERROR_NOT_INITIALIZED)" location: "JS frame :: resource://gre/modules/ExtensionUtils.jsm :: sendAsyncMessage :: line 533" data: no] (unknown)
08:12:17.382 Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. background.js:12869
08:12:18.378 Error: Promised response from onMessage listener went out of scope background.js:8:1517636
08:12:18.383 Error: Promised response from onMessage listener went out of scope background.js:11378:1
08:12:18.383 Error: Promised response from onMessage listener went out of scope background.js:8:1517636
08:12:18.635 Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. background.js:12869
I'm happy to assist in troubleshooting further, time permitting.
@TraceyC77 If you open the /home/tracey/.mozilla/native-messaging-hosts/org.keepassxc.keepassxc_browser.json file where does the path point to? That JavaScript error means the native messaging host in the path does not exists.
Here are the contents of that file
{
"allowed_extensions": [
"[email protected]"
],
"description": "KeePassXC integration with native messaging support",
"name": "org.keepassxc.keepassxc_browser",
"path": "/usr/bin/keepassxc-proxy",
"type": "stdio"
}
The file exists
❯ ll /usr/bin/keepassxc-proxy [09:39:50]
-rwxr-xr-x 1 root root 23K May 9 12:57 /usr/bin/keepassxc-proxy*
I had the same error (kubuntu 18.04, FF dev edition 62) until I found that the proxy wasn't automatically launched.
Turning on the setting "Update native messaging manifest files at startup" solved the problem.
Hello,
I can't get the firefox addon to connect to my -otherwise working fine- KeePassXC installation. I get all the time the "Timeout or not connected to KeePassXC" message. I installed KeePassXC on my linux mint machine via the software manager. My debug info is as follows:
KeePassXC - Version 2.3.3
Revision: 0a155d8
Distribution: FlatpakLibraries:
- Qt 5.10.1
- libgcrypt 1.7.3
Operating system: Linux 4.15.0-29-generic
CPU architecture: x86_64
Kernel: linux 4.15.0-29-genericEnabled extensions:
- Auto-Type
- Browser Integration
- Legacy Browser Integration (KeePassHTTP)
- SSH Agent
- YubiKey
The contents of my /home/pc/.mozilla/native-messaging-hosts/org.keepassxc.keepassxc_browser.json file are:
{
"allowed_extensions": [
"[email protected]"
],
"description": "KeePassXC integration with native messaging support",
"name": "org.keepassxc.keepassxc_browser",
"path": "/var/lib/flatpak/exports/bin/org.keepassxc.KeePassXC",
"type": "stdio"
}
The path /var/lib/flatpak/exports/bin/org.keepassxc.KeePassXC does not exist, and this is what the ffox debugging console reports too:
File at path "/var/lib/flatpak/exports/bin/org.keepassxc.KeePassXC" does not exist, or is not executable
but I'm not sure where this path should point to. Files like /usr/bin/keepassxc-proxy mentioned above do not exist on my machine either.
I've tried checking the "Update native messaging manifest files at startup" setting too, to no avail.
Please advise what I can do to get my browser talking to KPXC.
Thanks
Further to @Christos11's comment, I found a work around. The addon expects the flatpak to be installed in /var/lib/flatpak/exports/bin/ which it will be in 90% of cases. in 10% or so cases, the user has opt'd to install with the --user flag and so the flatpak will be located in $HOME/.local/share/flatpak/exports/bin/
My work around until a fix can be found is to modify $HOME/.mozilla/native-messaging-hosts/org.keepassxc.keepassxc_browser.json with the following:
{
"allowed_extensions": [
"[email protected]"
],
"description": "KeePassXC integration with native messaging support",
"name": "org.keepassxc.keepassxc_browser",
"path": "/home/USERNAME/.local/share/flatpak/exports/bin/org.keepassxc.KeePassXC",
"type": "stdio"
}
FYI, for everyone following: I have found a working around involving some manual steps you need to do though for KeePassXC<->Firefox communication, if Firefox is flatpaked/sandboxed (works if KeePassXC is sandboxed or not). Read the full write-up/tutorial here.