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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

New browser - Firefox plugin forgets connection, reconnects and then errors. #49

Closed
mannp opened this issue Mar 6, 2018 · 38 comments
Closed

Comments

@mannp
Copy link

mannp commented Mar 6, 2018

Firstly, great job with the plugin 馃憤

Error message from keepassxc on pressing the plugin icon.

Cannot encrypt message or public key not found. Is native messaging or support for your browser enabled in KeePassXC?

Pressing the 'Reload' button gives me the following error;

KeePassXC-Browser has been disconnected from KeePassXC.
KeePassXC association failed, try again

Press the reconnect button to establish a new connection.

Expected Behavior

Connection is made and never forgotten until the connection is deleted by the user.

After being asked if I want to replace the connection with the same name, I should still only have one active connection showing in the connections section of the plugin.

I have two showing as active with the same name?

Current Behavior

I have successfully made a connection between keepassxc and the new plugin but after a while the plugin asks again to connect to keepassxc, even though the current one still exists.

I create another connection using the same connection name and it correct asks me if I want to overwite the previous one, to which I say yes.

I start using again, all is well until again it appears to lose connection and give me the above error.

Debug

Firefox Plugin:
KeePassXC-Browser Version: 1.0.1
KeePassXC Version: unknown

KeePassXC - Version 2.3.0-snapshot
Build Type: Snapshot
Revision: a06e85f

Libraries:

  • Qt 5.10.1
  • libgcrypt 1.8.2

Operating system: Arch Linux
CPU architecture: x86_64
Kernel: linux 4.15.6-1-ARCH

Enabled extensions:

  • Auto-Type
  • Browser Integration
  • Legacy Browser Integration (KeePassHTTP)
  • SSH Agent
  • YubiKey
@varjolintu
Copy link
Member

Does the extension settings show a paired key in the Connected Databases tab when this situation is seen?

@mannp
Copy link
Author

mannp commented Mar 6, 2018

Yes it does.

There is always one key connected and working when it forgets.

When you reconnect using the same name is suggests replacing the old one, but I end up with 2 valid keys with the same name in the list.

@varjolintu
Copy link
Member

Can you confirm that the entry KeepassXC-Browser Settings in your database has the same keys?

@mannp
Copy link
Author

mannp commented Mar 6, 2018

There is only one key in the database against that identifier and it is the old key that should have been replaced already.

The newer key (with the same identifier) in the list of keys in the plugin is not listed against KeepassXC-Browser Settings in the database at all.

@varjolintu
Copy link
Member

So am I correct that the following situation happens:

  1. You connect the database
  2. An KeePassXC-Browser Settings entry is created which holds the same key with the Connected Databases list
  3. Something strange happens
  4. Extension says it's not connected but the step 2 is still valid?

Can you confirm this is the exact sequence?

@mannp
Copy link
Author

mannp commented Mar 6, 2018

Yes thank you for articulating better than I did.

When 4. occurs it says it needs to be configured and I configure it again with the same identifier and it appears not to replace the old key in the db with the new one, but leaves the old one in place and works again.

@varjolintu
Copy link
Member

That's really strange. But I remember I've seen the same situation too many months ago, with an Ubuntu LTS release. I need to do some testing on my Arch box and try to reproduce this.

@mannp
Copy link
Author

mannp commented Mar 7, 2018

Ok thanks.

It also doesn't sound right that when the plugin suggests replacing the old key with the same id, that it just adds the new key to the list, with the old key, so there are two valid keys?

@varjolintu varjolintu added the bug label Mar 7, 2018
@mannp mannp changed the title Nre browser intergration - Firefox plugin forgets connection, reconnects and then errors. New browser - Firefox plugin forgets connection, reconnects and then errors. Mar 8, 2018
@dnlsrl
Copy link

dnlsrl commented Mar 8, 2018

This is not exclusive to Firefox, it happens in Chrome as well, both in Windows and Linux. From my post in #55:

I'm not sure if this should have its own separate issue, but even the updated extension doesn't recognize the database and one needs to revoke the database to get it working again.

To be quite specific, it says that there is a database connected but the dropdown of credentials won't appear with the login forms, and the "Redetect credential fields" doesn't help either. When inputting the credentials manually though, the extension does give a notification (can't remember what it says exactly, can't seem to be able to make it appear now). What solves the problems is, just as I said, to revoke the database and connect to it again.

It happened to me first using Linux (Fedora 28 on FF 58/AppImage build) and I dismissed it as a Linux only issue, but it happened to me with Windows 10 Chrome 64 as well.

EDIT: Even though I found the solution (or actually, was helped out to find it), this isn't supposed to be expected behavior, is it?

Now, it's a new day and it appeared to have forgotten the renewed connection I made yesterday. I'll update this post with logs, but it'll have to be later. <- Nevermind

OS: Windows 10 Home 1709
Browser: Google Chrome Version 65.0.3325.146 (Official Build) (64-bit)
KeePassXC-Browser Version: 1.0.1
KeePassXC Version: 2.3.1

EDIT: Sigh, upgrading Chrome seemed to have solved the issue somehow.

EDIT 1: Update: #59 has the same issue.

On Linux (Fedora 27, Firefox 58.0.2 64-bit, KeepassXC 2.3.1 AppImage, KeepassXC-Browser 1.0.1) I see the error KeePassXC-Browser has encountered an error: Timeout or not connected to KeePassXC. And in the settings page, it doesn't recognize the version of KeepassXC installed, it throws an "Unknown". Same thing happens with Chrome version 64.0.3282.186 (64-bit)

Both browser's database keys match with the one in the database. But they don't seem to be able to communicate with the application.

@varjolintu
Copy link
Member

@dnlsrl Can you check if keepassxc-proxy.exe quits when this error happens?

@mook-as
Copy link

mook-as commented Apr 17, 2018

Hi! I'm seeing similar issues:

  • Firefox 52.7.2 (64-bit) Linux (openSUSE, but that's probably not as relevant)
  • KeePassXC 2.3.0
  • KeePassXC-Browser 1.0.1

Symptoms:

  • KeePassXC-Browser shows as not as connected
  • Reloading the page gets it to show up as connected, but no credentials detected (and the redetect credentials button doesn't help)
  • Firefox browser console shows Error 8: KeePassXC association failed, try again (after looking like it connected)
  • KeePassXC and KeePassXC-Browser both have one single key (the same one) listed
  • keepassxc-proxy is still running when this occurs
  • Killing the keepassxc-proxy process actually fixes the problem: reloading the page finds credentials.

Hopefully this helps with the issue.

@varjolintu
Copy link
Member

@mook-as Does the same happen with the latest Firefox release? I suppose you are using ESR.

@gasinvein
Copy link

@varjolintu I'm using Firefox 59 and see the same behaviour.

@varjolintu
Copy link
Member

Please check the troubleshooting guide.

@gasinvein
Copy link

@varjolintu Already did. What exactly should I do?

@varjolintu
Copy link
Member

Does it help if you remove the keys from the extension and from KeePassXC both and then try reconnect?

@gasinvein
Copy link

No, nothing changed.

@z3ntu
Copy link

z3ntu commented Apr 18, 2018

Can confirm that killing keepassxc-proxy and reconnecting fixes the issue. Am on Firefox 59.0.2 on Arch Linux

@varjolintu
Copy link
Member

Please test if this still happens with KeePassXC 2.3.3 and KeePassXC-Browser 1.1.3.

@z3ntu
Copy link

z3ntu commented May 11, 2018

Seems to be better today as I didn't have to kill the proxy application. Had to do that a lot before the latest release(s).

@z3ntu
Copy link

z3ntu commented May 19, 2018

@varjolintu this can be closed now I think?

@z3ntu
Copy link

z3ntu commented May 20, 2018

Speaking of the devil, it seems it just broke for me again and the browser extension doesn't fill in my passwords...
image

image

@varjolintu
Copy link
Member

@z3ntu You have something really strange going on there.. Could you try to delete all databases from the browser extension's settings and also delete KeePassXC-Browser Settings entry from your database so there's a clean slate. Then try to connect and associate your browser again.

@z3ntu
Copy link

z3ntu commented May 21, 2018

Did that and it works now again (without manually killing keepassxc-proxy). I'll tell you when it's broken again ;)

@mannp
Copy link
Author

mannp commented May 21, 2018

I am also still getting disconnections, but am trying to isolate where the problem is for the moment....

@varjolintu
Copy link
Member

@mannp Have you upgraded to KeePassXC 2.3.3 and KeePassXC-Browser 1.1.3?

@mannp
Copy link
Author

mannp commented May 23, 2018

@varjolintu Yes I have, I am on the latest git from arch AUS and 1.1.3.

I have resorted to leaving the 'plugins' tab open on firefox, so I can disable and reenable the plugin when it happens.

That seems to resolve the issue for me, but its a pain, until the team have time to look further.

@varjolintu
Copy link
Member

@mannp Is keepassxc-proxy running when this situation happens?

@mannp
Copy link
Author

mannp commented May 23, 2018

@varjolintu good question, not exactly sure, except I do have the option enabled to use a proxy application in the advanced settings.

I assume that would be keepassxc-proxy as I have not setup any other.

@varjolintu
Copy link
Member

@mannp Yes, that means keepassxc-proxy will be used to transfer data between KeePassXC and the browser extension. If that binary doesn't start or it quits by itself, then we have a problem.

@varjolintu varjolintu reopened this May 24, 2018
@mannp
Copy link
Author

mannp commented May 24, 2018

@varjolintu would disabling and reenabling the browser extension restart the proxy, as restarting the extension always seem to get me going again.

@varjolintu
Copy link
Member

@mannp It should do a restart, yes. But if the keepassxc-proxy quits for some reason, that behaviour is not good and we should solve why it happens.

@Humphreybas
Copy link

I have the same/a similar issue. I hope this is appropriate to add here:

  • Ubuntu 18.04
  • KeePassXC 2.3.1
  • Keepassbrowser 1.3.0
  • Firefox 63.0.3
  • Google Chrome 70.0.3538.102
  • (dropbox is syncing the databasefile)

Steps to reproduce:

  • Everything is setup and works
  • Whenever I lock my system (super+L) and login again Keepassbrowser is not connected anymore
  • Unlock Open database in KeePassXC
  • Try again Keepassbrowser, now it shows KeePassXC-Browser has not been configured. Press the connect button to pair with KeePassXC.
  • /usr/bin/keepassxc-proxy is not interrupted in the meantime
  • Disable and enable extension does restart the keepassxc-proxy but does not fix the issue
  • Last made connection is still visible in 'connected databases' in keepassbrowser settings screen
  • Connect: You have received an association request fro the above key need to fill in a name
    Tested for firefox only not chrome:
  • If you fill in a previously used name which is not the current name in the list of currently connected databases, it will still notify you that you will overwrite it (so somehow the previous connection is somewhere..)

Extra remark: on my work laptop I do not have this issue. (also Ubuntu 18.04, I expect all other versions also the same but I should double check tomorrow)

@varjolintu
Copy link
Member

@Humphreybas Try the same with 2.3.4.

@pstorch
Copy link
Contributor

pstorch commented Dec 3, 2018

I also had problems with forgotten connections under Ubuntu 18.04 with Firefox.
After changing to KeePassXC 2.3.4 via PPA (Ubuntu default was 2.3.1), the problem is fixed for me.
Thanks.

@Humphreybas
Copy link

yeah that fixed it, I followed these steps: https://keepassxc.org/blog/2017-10-25-ubuntu-ppa/ after the ppa comment of pstorch
(for some reason it doesn't match websites without the http(s):// part anymore in 2.3.4 but that is outside the scope of this issue)

@varjolintu
Copy link
Member

@Humphreybas That is fixed in 2.4.0. The checkbox for disabling scheme match is broken in 2.3.4. You can use a newer snapshot build if you like.

@droidmonkey
Copy link
Member

I believe this issue can be closed.

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

No branches or pull requests

9 participants