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

Extension fails to connect to database after first successful connection #277

Closed
0ecd3e opened this issue Aug 26, 2018 · 7 comments
Closed

Comments

@0ecd3e
Copy link

0ecd3e commented Aug 26, 2018

Expected Behavior

The extension connects to an unlocked database, and continues to do so even after the browser restarts or the computer restarts.

Current Behavior

The extension behaves as expected immediately following successful installation from the Mozilla add-ons page, but then breaks once the browser is closed. Upon a restart of the browser, the extension will be stuck saying that it has not been configured, even though it has been successfully configured already. The connect button has no effect.

Possible Solution

Since the extension works perfectly if the browser is not closed, perhaps it has something to do with how read and write or connection permissions are being handled.
The extension's settings page shows my database as connected, but the extension isn't recognizing that.
Perhaps it may also have something to do with the proxy application not establishing a connection or not starting properly?

Steps to Reproduce (for bugs)

  1. Extension successfully installed from Mozilla add-ons
  2. Extension makes pop-up window requesting access to the database
  3. Unique identifier given and access granted to extension
  4. Tried logging into a website, extension works.
  5. Closed Firefox.
  6. Restarted Firefox.
  7. Opened extension menu.
  8. Menu is stuck with error message saying that it is not configured, and connect button no longer works.

Debug info

Console output:

Each time I open the extension's menu, I get:

Error 4: Cannot decrypt message keepass.js:976:5
Error 11: No saved databases found. keepass.js:976:5

If I click on "Connect", I get:

Error 4: Cannot decrypt message keepass.js:976:5
Error 8: KeePassXC association failed, try again keepass.js:976:5

These error messages are repeated if I continue to click on the button or open the extension menu.

Toggling options inside KeepassXC such as browser integration on or off, or use a proxy on or off has no effect. I have also tried running the keepassxc-proxy.exe manually, but it opens a blank command prompt window and does nothing.

KeePassXC - 2.3.3
keepassxc-browser - 1.2.0
Operating system: Windows 10 1803
Browser: Firefox 62.0b20
No internet connection proxy is being used, but "use a proxy application" in KeepassXC is enabled.

@varjolintu
Copy link
Member

And all this time KeePassXC is open in the background? Could you check what happens to the keepassxc-proxy.exe when you close Firefox? Use a proxy application is the default setting and you should use it.

Also, does upgrading to KeePassXC 2.3.4 help?

@0ecd3e
Copy link
Author

0ecd3e commented Aug 27, 2018

Yes, KeePassXC is open in the background. It's also unlocked.
keepassxc-proxy.exe launches once Firefox is launched, and closes once the browser closes. I think that should be normal.
Yeah, I read up about using a proxy application and it's intended use case is exactly the behaviour I was expecting, so nothing new there.

Interesting thing is, I upgraded to KeePassXC 2.3.4 and it immediately worked. Connection was established, and the extension worked even after restarting Firefox multiple times. However, upon reboot of my computer, the extension ceased to work again.

I checked the console, and the same 4 error messages from above keep appearing.

@varjolintu
Copy link
Member

varjolintu commented Aug 27, 2018

This would need further debugging. Of course you can try to delete KeePassXC-Browser entry totally from the database, and remove all databases from the browser extension side too. Then try again.

(I'm unable to test anything under Windows at this point, but I'll do it when I can)

@0ecd3e
Copy link
Author

0ecd3e commented Aug 27, 2018

So I've found another weird behaviour accidentally.
The extension only works in this specific sequence of events:

  • Make sure everything KeePassXC related is killed in Task Manager
  • Open Firefox
  • Then open KeePassXC
  • After that, I can either hit "unlock database" through the extension, or open the KeePassXC window and unlock my database there, and the extension properly recognizes the connection.

If KeePassXC is running in the background before Firefox is opened, then the extension's connect button fails and unlocking the database in KeePassXC does nothing. "Cannot decrypt message" pops up in the extension if I try this.

@pcoombe
Copy link

pcoombe commented Oct 15, 2018

i find the same thing in windows 10 on chrome 69.
as soon as you close the browser, the extension loses all knowledge that it has anything configured from the extension icon point of view (options still list the connected database).
if i press connect again, i get the dialog to enter the name of the new browser connection, i press cancel, and everything works as normal.
i am however using keepass 2.40 with natmsg 2.0.1.0 so unsure if its related to that or the browser plugin.

@droidmonkey
Copy link
Member

droidmonkey commented Oct 15, 2018

@pcoombe
Edit: just looked up what natmsg was. You need to report your issue over to them.

@0ecd3e
Copy link
Author

0ecd3e commented Jan 24, 2019

This seems to have been fixed, and behaviour has been normal for the past few months.

@0ecd3e 0ecd3e closed this as completed Jan 24, 2019
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

4 participants