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

Unable to connect ("Key exchange was not successful.") using browser installed via Snap #689

Closed
rwanwork opened this issue Nov 21, 2019 · 10 comments
Labels

Comments

@rwanwork
Copy link

rwanwork commented Nov 21, 2019

Expected Behavior

I am unable to connect to the KeePassXC database.

Current Behavior

After opening KeePassXC and entering my password, I start Chromium. I click on the icon and then "Reload" and I get the error "Key exchange was not successful."

Previously, it worked. This problem started happening after I upgraded my Ubuntu OS from 19.04 to 19.10 . During this period, I was using the Ubuntu package for keepassxc. I am now using the official PPA -- version 2.5.1 . And it still doesn't work yet.

I have gone through the troubleshooting guide. I can confirm:

  • Browser integration for Chromium is checked
  • "Use a proxy application" has been checked.
  • ~/.config/chromium/NativeMessagingHosts is present
  • the path variable points to an executable which does exist

I do not see a keepassxc-proxy running when I type "ps -aef". I tried running it, but the program exits. Unfortunately, I do not know how to debug the extension; where is the check box for "Developer mode"?

Possible Solution

New to Ubuntu 19.10 seems to be Chromium via snap instead of apt. I'm not sure if that's the problem. But if so, it should affect others, too?

I can confirm that it works under Firefox. But that's because before, I never used Firefox (i.e., I just started now to test it). So, I guess it isn't a problem with keepassxc or the connection, but something left over between my upgrade of Ubuntu. Perhaps an additional setting that needs to change?

Steps to Reproduce (for bugs)

As mentioned above,

  1. Start up Keepassxc and enter password.
  2. In the browser, click on the keepassxc-browser icon. It currently shows "Cannot connect to KeePassXC. Check that browser integration is enabled in KeePassXC settings."
  3. Click "Reload".
  4. The error "Key exchange was not successful." appears.

Debug info

KeePassXC - unknown
KeePassXC-Browser - 1.5.3
Operating system: Linux x86_64
Browser: Chrome/Chromium 78.0.3904.97

@varjolintu
Copy link
Member

The Chromium installed via snap is the problem. It doesn't allow the Native Messaging API to launch another program outside the sandbox, meaning keepassxc-proxy.

@varjolintu
Copy link
Member

Many have reported this issue, so I'm gonna take a look if there's something we can configure to get Chromium to access the proxy.

@rwanwork
Copy link
Author

I see. Sorry, I did not realise that others have reported this issue before.

Indeed, it seems they are moving to snap for good and we can't opt out.

Thanks for the prompt reply as I've been trying several things, thinking it's my fault.

@Q3p6v9j7PX7XBjSj9xgC5LJViFxuKqg5cpfg93x

No choice but to use outdated KeepassXC

@varjolintu
Copy link
Member

@Q3p6v9j7PX7XBjSj9xgC5LJViFxuKqg5cpfg93x Not so fast. You can always install your browser without snap or flatpak using the package manager and then everything works.

@rwanwork
Copy link
Author

@Q3p6v9j7PX7XBjSj9xgC5LJViFxuKqg5cpfg93x @varjolintu Another "option" is to give up on Chromium. I've switched over to Google Chrome, which is installed by apt still. It's not a solution to the problem, but at least I am fine with this solution. Hopefully that doesn't move to snap (I'm not sure if they are phasing out apt in favour of snap?).

Thank you both for your thoughts!

@varjolintu varjolintu changed the title Unable to connect ("Key exchange was not successful.") Unable to connect ("Key exchange was not successful.") using browser installed via Snap May 12, 2020
@onichandame
Copy link

onichandame commented Feb 20, 2021

Just for anyone who wants to install Chromium from Snap and wishes to use keepass in Chromium, there is an alternative solution.

sudo apt install keepass2 keepass2-plugin-keepasshttp -y

Then open the keepass database and install KeePassHttp-Connector from chrome web store. This solution is not as convenient as keepassxc + keepassxc-browser, but it offers keepass autofill functionalities without too many hacks.

@dzeroc
Copy link

dzeroc commented May 17, 2022

Ubuntu 22.04 includes Firefox as a Snap app by default so there is this issue...

Installing Firefox as a .deb keepassxc-browser works correctly.

Info:

  • Ubuntu 22.04 LTS x86_64
  • Mozilla Firefox 100.0.1
  • KeePassXC 2.6.6
  • KeePassXC-Browser 1.7.12

@varjolintu
Copy link
Member

varjolintu commented Aug 4, 2022

Related comment:
#1426 (comment)

EDIT: Actually, let's use that thread to follow the issue.

@varjolintu varjolintu closed this as not planned Won't fix, can't repro, duplicate, stale Aug 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants