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

Error! Not connected to KeepassXC #2385

Open
SurebrecUK opened this issue Nov 19, 2024 · 27 comments
Open

Error! Not connected to KeepassXC #2385

SurebrecUK opened this issue Nov 19, 2024 · 27 comments

Comments

@SurebrecUK
Copy link

Overview

Steps to Reproduce

  1. Log Into KeepassXC
  2. Click on KeypassXC icon in account name field

Expected Behavior

I expect the app to fill out username and passwords field.

Actual Behavior

I am getting the following message:
"Error! Not connected to KeepassXC"

Context

I am using Firefox Ver. 132.0.2 (64-bit) with the latest browser plugin.
Windows 10 Pro 64bit, 22H2 OS Build 19045.5131

KeePassXC - VERSION 2.7.9
Revision: REVISION 8f6dd13

Operating System: Windows/Linux/macOS
Desktop Env: Gnome/KDE/XFCE/Mate/Cinnamon
Windowing System: X11/Wayland

@SurebrecUK SurebrecUK added the bug label Nov 19, 2024
@SurebrecUK
Copy link
Author

@SurebrecUK
Copy link
Author

I have the same problem if there are multiple tabs/DBs opened: firefox plugin has to reconnect and it keeps asking for the hostname to connect as, and every time I give it the same hostname and it asks to rewrite it. I tried with fresh DBs and it's all the same (I suspected there's something weird save in the DB).

I only have one DB, and I've just tested it now with only one browser window and a single tab, and it still does it.

@droidmonkey droidmonkey transferred this issue from keepassxreboot/keepassxc Nov 19, 2024
@varjolintu
Copy link
Member

I have the same problem if there are multiple tabs/DBs opened: firefox plugin has to reconnect and it keeps asking for the hostname to connect as, and every time I give it the same hostname and it asks to rewrite it. I tried with fresh DBs and it's all the same (I suspected there's something weird save in the DB).

Remove all connection from both databases (from the extension side as well), go to Database Settings -> Browser integration, and create a new Root Group UUID for both databases. Then make connections to the extension again.

Please note that the extension does not ask for a hostname, but an identification for the connection. This can be for example "Chrome home".

@varjolintu
Copy link
Member

I have requested help in the following places with this matter, and neither has produced a fix:

https://www.reddit.com/r/KeePass/comments/1gqcg3u/error_not_connected_to_keepassxc/

https://sourceforge.net/p/keepass/discussion/329221/thread/f63544b5d5/?limit=25#119a/1b62

These are not official support channels. This one is.

Please refer to these guides and report your findings:
https://keepassxc.org/docs/KeePassXC_GettingStarted#_setup_browser_integration
https://github.com/keepassxreboot/keepassxc-browser/wiki/Troubleshooting-guide

"It does not work" is not helpful enough for us.

@varjolintu
Copy link
Member

varjolintu commented Nov 19, 2024

Remove all connection from both databases (from the extension side as well), go to Database Settings -> Browser integration, and create a new Root Group UUID for both databases. Then make connections to the extension again.

I removed all connections from extension side, but I have no idea how to create new Root Group UUID. This is what I have in the Browser integration. I have a 2.7.6 installed, so maybe upgrading to the latest version gives me the option to add new Root Group UUID? browser advanced

Please note that the extension does not ask for a hostname, but an identification for the connection. This can be for example "Chrome home".

Yes, bad wording on my behalf, sorry. I usually give it the same name as the hostname and I got used to it being the hostname, too.

The option is in Database Settings in KeePassXC. Please make a new issue if the problem still persists. You are messaging to thread where the issue is totally different, and I'm deleting the messages as offtopic.

@keepassxreboot keepassxreboot deleted a comment from mekanix Nov 19, 2024
@keepassxreboot keepassxreboot deleted a comment from mekanix Nov 19, 2024
@SurebrecUK
Copy link
Author

I have requested help in the following places with this matter, and neither has produced a fix:
https://www.reddit.com/r/KeePass/comments/1gqcg3u/error_not_connected_to_keepassxc/
https://sourceforge.net/p/keepass/discussion/329221/thread/f63544b5d5/?limit=25#119a/1b62

These are not official support channels. This one is.

Please refer to these guides and report your findings: https://keepassxc.org/docs/KeePassXC_GettingStarted#_setup_browser_integration https://github.com/keepassxreboot/keepassxc-browser/wiki/Troubleshooting-guide

"It does not work" is not helpful enough for us.

I'm finding this a bit confusing to be honest.

Is this something that can be fixed by completely unintsalling everything to do with KPXC and reinstalling it, and if so, how?

@varjolintu
Copy link
Member

@SurebrecUK That depends what kind of problem you are having. Basic steps:

  1. Make sure you have enabled the Browser Integration in KeePassXC.
  2. Check the registry entries and file paths according to the Throubleshooting Guide.
  3. Report your findings.

@SurebrecUK
Copy link
Author

Ok, so I've been able to figure out how to get to debugging and it's returning this:

KeePassXC-Browser: Connecting to native messaging host org.keepassxc.keepassxc_browser client.js:383:13
[Error keepass.js:256] KeePassXC-Browser - 7: Message encryption failed. Is KeePassXC running? global.js:147:13
[Error ] KeePassXC-Browser - Cannot send activated_tab message: Could not establish connection. Receiving end does not exist. 11 global.js:147:13
KeePassXC-Browser: Connecting to native messaging host org.keepassxc.keepassxc_browser client.js:383:13
[Error keepass.js:810] KeePassXC-Browser - 9: Key exchange was not successful. global.js:147:13

@varjolintu
Copy link
Member

More info is needed. Please see step 2.

@SurebrecUK
Copy link
Author

I am now down to this point:

"The registry entry should have an org.keepassxc.keepassxc_browser subfolder which has a (Default) variable pointing to the actual JSON script path."

There wasn't a subfolder with that name, so I manually added one, which leads me to have to having to link to the JSON script path. (~/.mozilla/native-messaging-hosts)

Where is this located?

@varjolintu
Copy link
Member

There is no such path if you are using Windows. Are you sure you have enabled Browser Integration in KeePassXC settings and Firefox for it?

There should be a JSON script file at the path where the registry points. Usually it's under AppData\Local\keepassxc under your account folder. The content should point to the keepassxc-proxy.exe that is in your KeePassXC folder.

@SurebrecUK
Copy link
Author

Yes. They both seem to be enabled.

20241119_173343
Screenshot 2024-11-19 173753

The JSON script contains

"{
"allowed_extensions": [
"[email protected]"
],
"description": "KeePassXC integration with native messaging support",
"name": "org.keepassxc.keepassxc_browser",
"path": "C:\Program Files\KeePassXC\keepassxc-proxy.exe",
"type": "stdio"
}"

It seems to be pointing to the correct location, though the keepassxc-proxy.exe file isn't running.

@varjolintu
Copy link
Member

varjolintu commented Nov 19, 2024

What happens if you start the keepassxc-proxy.exe manually? Does the process manager show the executable? Are you having some anti-virus or anti-malware software preventing it from running?

@SurebrecUK
Copy link
Author

What happens if you start the keepassxc-proxy.exe manually? Does the process manager show the executable? Are you having some anti-virus or anti-malware software preventing it from running?

When I start it manually, it just opens what appears to be an empty command prompt window. Even when doing that, it shows it as running in task manager, but it still doesn't work.

I can't understand why my antivirus should stop it running, as nothing has changes since this started happening.

@varjolintu
Copy link
Member

varjolintu commented Nov 19, 2024

Starting it manually does not work with the browser. It's just a step to ensure the executable actually starts without any issues. Btw, does any other browser work? Does downgrading Firefox work?

Have you checked the last steps in the guide?
https://github.com/keepassxreboot/keepassxc-browser/wiki/Troubleshooting-guide#7-windows-specific-with-chromium-based-browsers-chrome-edge-vivaldi-brave-etc

If anything else doesn't work, you'll have to use https://learn.microsoft.com/en-us/sysinternals/downloads/procmon to check why the keepassxc-proxy.exe does not start.

@SurebrecUK
Copy link
Author

Starting it manually does not work with the browser. It's just a step to ensure the executable actually starts without any issues. Btw, does any other browser work? Does downgrading Firefox work?

Have you checked the last steps in the guide? https://github.com/keepassxreboot/keepassxc-browser/wiki/Troubleshooting-guide#7-windows-specific-with-chromium-based-browsers-chrome-edge-vivaldi-brave-etc

If anything else doesn't work, you'll have to use https://learn.microsoft.com/en-us/sysinternals/downloads/procmon to check why the keepassxc-proxy.exe does not start.

Yeah, finally tried that, still no luck.

I tested it on Chrome and it doesn't work there either.

@varjolintu
Copy link
Member

If it doesn't work with any browser, there must be something wrong in your Windows system. Test the Process Monitor and see if it reports anything related to keepassxc-proxy.exe.

@loekf
Copy link

loekf commented Nov 20, 2024

I see the same issue in Chrome.

@varjolintu varjolintu removed the bug label Nov 22, 2024
@SurebrecUK
Copy link
Author

If it doesn't work with any browser, there must be something wrong in your Windows system. Test the Process Monitor and see if it reports anything related to keepassxc-proxy.exe.

Sorry for the late response, but life has kind of got in the way over the last week, as it often tends to do, so I haven't had time to chase after my issue since.

I have tried to use Processor Monitor, but I'm stuck on the filters I need to set for it to just show info for my issue.

I have searched on Youtube for help, but it just seems to give a general overview, and nothing specific to KeepassXC or keepassxc-proxy.exe.

What should I be setting in the filter?

@varjolintu
Copy link
Member

Just look for keepassxc-proxy.exe.

@SurebrecUK
Copy link
Author

Just look for keepassxc-proxy.exe.

Ok, done that, but it says there are 729 results.

Do I need to be more specific than just the name?

@varjolintu
Copy link
Member

Probably there are a lot of results, but some of those should show a reason why the process cannot be found or started.

@SurebrecUK
Copy link
Author

This is like trying to find a particular needle in a big box full of needles.

Is there no way to categorise them by result and then copy and paste them?

@varjolintu
Copy link
Member

There's always another alternative: If you can save the recording and send it to me by email, I can take a look. It must contain events from a time when you press the Reload button in the extension popup so I could see that the connection is at least tried.

@SurebrecUK
Copy link
Author

There's always another alternative: If you can save the recording and send it to me by email, I can take a look. It must contain events from a time when you press the Reload button in the extension popup so I could see that the connection is at least tried.

That's very kind of you. I'll see if I can get that for you.

To the email on your profile?

@varjolintu
Copy link
Member

There's always another alternative: If you can save the recording and send it to me by email, I can take a look. It must contain events from a time when you press the Reload button in the extension popup so I could see that the connection is at least tried.

That's very kind of you. I'll see if I can get that for you.

To the email on your profile?

Yes. That's the one. I cannot say when I have the time to look at it, but I will eventually.

@SurebrecUK
Copy link
Author

There's always another alternative: If you can save the recording and send it to me by email, I can take a look. It must contain events from a time when you press the Reload button in the extension popup so I could see that the connection is at least tried.

That's very kind of you. I'll see if I can get that for you.
To the email on your profile?

Yes. That's the one. I cannot say when I have the time to look at it, but I will eventually.

Ok, I think I managed to do what you requested and sent.

Thanks, whatever the outcome is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants