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
KeePassXC-Browser can't connect to database #439
Comments
Have you enabled the support for Chromium in KeePassXC's Browser Integration settings? If you still have problems after that, check: https://github.com/keepassxreboot/keepassxc-browser/wiki/Troubleshooting-guide |
Sometimes I'have a similar problem. Please test it and give me feedback. ;) If it helps, I will try to debug it on the next time. |
Hi, I'm facing the same issue.
I just can't connect to the database (The Connect button does nothing at all, not even logs errors). |
@diraol Check the guide linked above. |
on ubuntu (19.04) I had to manually start |
@mandarvaze Starting the proxy manually will not actually work. Native Messaging API in the browser should start it. If that doesn't happen, the path is wrong. If you are using KeePassXC as a Snap, please run https://raw.githubusercontent.com/keepassxreboot/keepassxc/master/utils/keepassxc-snap-helper.sh. |
@varjolintu At first I installed it from snap, but then realized it was "bad" version. The path changed from |
@mandarvaze Please check the path from |
Everything looks OK :
|
@mandarvaze Is your Firefox installed via Snap also? |
I don't know. It came pre-installed with Ubuntu 19.04 "out of the box" |
I had a similar problem. After I uninstalled the snap version and installed the distribution version of chromium everything worked. It seems that the snap version was not able to start and to connect to keepassxc-proxy. Starting it by hand didn't help. This should probably be mentioned the wiki, as in many distributions Firefox or Chromium will be installed as Snap / Flatpak versions and that might cause problems! |
BTW, after |
@HorstBaerbel There's a snap helper script availeble at https://keepassxc.org/download/#linux |
Nice. Thanks! Would be cool if this was linked in the Wiki, or did I miss that?. Where do I copy it? Do I have to check the "native bla" checkbox in KeepassXC? |
@HorstBaerbel I think it will be in the new documentation when it's finally released. It doesn't matter where you copy it, just run it. |
I just ran into this; I just upgraded to 19.10 Eoan and the browser extension could no longer even attempt to connect to the KeePassXC database. According to Ubuntu's upgrade script Chromium is now and from this point forward to be delivered as a snap. I just downloaded the helper script mentioned above, only to be informed by the script that browsers installed as snaps are not supported. Chrome (installed as deb from Google's repository) obviously still works. If there's a Chromium PPA or something I haven't yet looked for it, but any folks running non-LTS Ubuntu will be seeing this. KeePassXC - KeePassXC - Version 2.4.3 Revision: 5d6ef0c |
@twt2 Snap would need to accept Native Messaging API creating child processes. If that is something that cannot be configured, there's no way to fix it. EDIT: Found the following issues related to this: |
I have the same issue as @twt2. Updated to Ubuntu 19.10, and since then the extension does not work. I have double checked the guide, but the proxy is not running (starting it manually does not help). The json file is in I checked the bugreports that @varjolintu linked, and indeed it seems that the snap Chromium is unable to use the native host connector. Visiting https://extensions.gnome.org/ gives the same error: Do I understand correctly that there's nothing you can do to fix this? If that is true, I think this should be made very clear in the twiki and on keepassxc.org as well, as @HorstBaerbel said. |
Isn't this script for when KeePassXC is installed as snap? @HorstBaerbel was referring to Chromium being snap - the script won't work in this case. |
The script is only meant for snap version of KeePassXC. Browsers using snap probably won't work great with Native Messaging. Need to investigate how this situation could be solved. |
I'm by all means no expert in this, but as I understand it NativeMessaging is a crutch anyways. A new interface in snapd would be needed to support NativeMessaging. The problem is it would expose a lot of functionality which undermines encapsulation / security of snap packages (one of the key reasons for snap / flatpak). The maintainers of all snap-packaged apps or the maintainers of plugins for those apps can't do anything about this issue, so I think a general solution needs to be found. I commented on the Launchpad issue. |
Native messaging is not a crutch, it's a security feature |
Well, I might be wrong about that. Applications could always connect to a service on localhost. Not sure what can be made more secure. |
ArchLinux KDE Plasma Vivaldi same problem |
Ok, would it be something like this you're interested in?
Used |
@spi43984 Yes. If you can reproduce the situation where it doesn't have connection anymore, are you still seeing these messages? |
I got another error today. The KeePass icon to enter username/password on a website is green. But clicking it doesn't enter any credentials. Strace doesnt show any messages, the devtools console shows:
Restarting the Chromium app resolves the issue. Icon is (still) green and clicking it enters credentials. I am trying to reproduce the other error but fortunately or not I can't at the moment. |
@spi43984 This would need debugging the content script to see where it fails. Those stack errors you see are just because of the extension page you are viewing. |
Ok, how woould I do that? strace doesn't show anything. Is there a way to monitor keepassxc-proxy with |
Ok, I got the error again. Here's the strace from the hanging keepassxc-proxy.
Unfortunately I have to restart keepassxc-proxy in Chromium so it gets a new pid with which I have to run strace again. So I don't catch the initial messages... Here's the strace from the restarted keepassxc-proxy (after restarting I hit F5 twice):
|
@spi43984 Right mouse click on a page, select "Inspect". Switch to "Sources" tab. Using the double arrow at top left, make sure Content Scripts are selected. Put a breakpoint here: https://github.com/keepassxreboot/keepassxc-browser/blob/develop/keepassxc-browser/content/keepassxc-browser.js#L1381 |
Set breakpoint, checked code flow. When clicking on green icon on web page I see:
Can I somehow record (I don't mean a video ;-) the code debugging for sharing? Until then some more details:
Then jumps into In case I re-start the app in Chromium code returns from |
@spi43984 Use "Step over" with those browser.runtime functions. Debugging the polyfill doesn't help. You can set a breakpoint to line 1416 and see if the |
That's what I did - |
@spi43984 This would probably need debugging with the KeePassXC side also. It would be much easier if I could reproduce the issue. |
Definitely - I've learned a lot about debugging within the last few days... So thanks a lot for your support so far. I can dig into this issue even further but would need some advice how to do that properly. I don't know exactly what's different with my setup - but there is no such thing as two identical setups. The error I reported in the beginning seems to be the same I am having now with the difference that the icon looks different now (now it's permanently green). What I do know is:
|
@spi43984 Thanks for you patience. I appreciate the amount of testing and debugging you've made with this issue. I find it strange that 2.5.4 would still work normally. We made some major refactor changes to the Browser Integration in 2.6.0 but it should make things less problematic, not the other way around. The proxy seems to be running at all time because you don't see error messages related to a Native Messaging disconnect, and looking at the Have you tried if the same happens with another browser, for example Firefox? It could help narrowing down the issue. |
Thank you for your support!
From my previous debugging sessions I get the idea that (and as a rookie this might me complete nonsense)
Is there anything in the changed code that could explain the behaviour, that the script just exits with line 1410?
I've just setup Firefox and will check it too. |
While testing with the disabled extension "The Great Suspender" the issue hasn't turned up yet (and usually it did within minutes). I'll monitor further... |
The error occured again both in Chromium with disabled extension "The Great Suspender" and in Firefox. It happens after some time of inactivity with my notebook going into suspend mode. |
@spi43984 So the suspend is the main problem after all? |
Hard to tell. Might be, might be a timeout as well after some time of inactivity. In any case the issue effects both Chromium and Firefox, so it's not just a Chromium issue. |
@spi43984 There's the experimental Auto-Reconnect feature you can try to enable from extension settings. |
I saw that feature and if I remember right I've already tried it without success. Will check again. |
Ok, issue happened again in Chromium, this time with activated experimental feature Auto-Reconnect. Funny though - I got this error by visiting this very github page. Connection loss happened in Firefox as well - Auto-Reconnect has been enabled as well. |
system: arch linux (rolling) things that happens to me is : if i install the extension from google chrome webstore, it works normally; but if i install it from the *.zip downloaded from github release, |
@yichangshengwu If you try to load the extension manually the extension ID changes. You need to modify the Native Messaging script file to include the temporary ID. See https://github.com/keepassxreboot/keepassxc-browser/wiki/Loading-the-extension-manually If you do this, it's also good to disable the advanced Browser Integration setting Update native messaging manifest files at startup because it can override your custom setting on KeePassXC start. |
sorry, my bad, didn't read the wiki, thanks! |
@varjolintu, this helpful tip isn't in the wiki page and editing seems to be disabled. |
@anon324875693 Editing should be enabled with non-Snap versions. |
@varjolintu, I meant I can't edit the wiki page myself to include this information. |
Thanks. |
For Google Chrome Beta, check |
KeePassXC-Browser doesn't connect to the database "No connected databases found." error:
KeePassXC-Browser has encountered an error:
Timeout or not connected to KeePassXC.
No problem with chrome.
Debug info
KeePassXC - 2.3.4
KeePassXC-Browser - 1.3.2
Operating system: Ubuntu 18.10
Browser: Chromium 73.0.3683.75
The text was updated successfully, but these errors were encountered: