Using Kee in multiple browsers (Chrome and Firefox), only one works at any given time

Using Kee in multiple browsers (Chrome and Firefox), only one works at any given time.

When opening and logging into KeePass, one browser will work, and the other browser will change to an orange “Off” logo with the message “You are not logged in to your password manager. Unlock your password manager to enable Kee” even though KeePass is logged in.

Which browser it works on and which one fails seems to be random.

Not confirmed !
I run Firefox, Chrome and the new Chrome based Edge at the same time
and all have a working connection to my KeePass Database.

Yeah it works fine for me too.

Maybe check that your system is configured correctly? Things like KeePass config file permission problems might cause symptoms similar to this (though I’m not sure anyone has had this exact problem before, assuming there are no details missing).

Try to work backwards to what might have been changed to cause the problem to start occurring.

As far as I am aware I am using the default configuration for Kee. Security setting is set to “Medium” in KeePassRPC options.

Settings in the browser plugins are the defaults they came with.

Chrome and Firefox are the most recent updated versions.

I’m unsure what there is for me to look into?

To replicate:
Open Firefox.
Open Chrome.
Open KeePass and log in to the database.
One of the two browsers automatically detects that Keepass is open and logged in (the “Off” flag goes away from the icon) and the other browser automatically changes the red “Off” flag to an orange “Off” flag, and says “You are not logged in to your password manager. Unlock your password manager to enable Kee”

Note that it appears that the browser which thinks that KeePass is locked can actually communicate with KeePass, because if I use “Generate new password” in that browser, my KeePass database is updated with the new password (stored in Recycle Bin / Kee / Kee Generated Passwords) however I’m not able to actually use Kee in this browser to log in to websites as the browser thinks that KeePass is locked.

This is a screenshot of Firefox’s browser console while unlocking KeePass. I’m not sure how to do the equivalent thing in Chrome.

Also, disabling and re-enabling the Kee extension in whichever browser is broken at the time, while KeePass is already open and unlocked, makes that browser work - that is, once the extension is re-enabled, it correctly detects that KeePass is open and unlocked.

“object is currently in use elsewhere” indicates something inside KeePass is trying to run more than once at exactly the same time. I don’t know what that would be but a quick Google search suggests a chance it is related to graphics drawing - doesn’t narrow it down a huge amount though even if that’s correct. My initial guess would be there is a bug in KeePassRPC, KeePass or some other KeePass plugin, possibly relating to icon rendering.

Disabling and re-enabling the extension will cause a new connection to be created and since there is now no race between the two browsers, it can work just fine. You should be able to also workaround by restarting the browser that is broken?

Does the same problem occur if you lock KeePass (but do not close it) and then unlock your KeePass database while both browsers are running?

Please provide the usual troubleshooting basic info like your operating system, .NET/Mono version number, versions of KeePass, KeePassRPC, any other KeePass plugins.

I think we can rule out this being anything to do with the Kee extension or the web browsers so lets focus on the KeePass side of things.

Locking and unlocking seems to work

  1. Both Chrome and Firefox are running
  2. Open KeePass and unlock it
  3. One browser goes orange, other browser works properly and Kee is working there
  4. Lock KeePass but don’t exit
  5. Both browsers go orange
  6. Unlock Keepass
  7. Both browsers now have working Kee

As you mentioned, closing and reopening the browser that’s broken also fixes this issue, as does enabling and re-enabling the plugin. So these are workarounds, but it’s quite annoying. Normally my KeePass is set to close instead of lock, so I also can’t normally use that as a workaround.

Windows 10 / 1809 and Windows 10 / 1803 (both 64 bit)

KeePass 2.41
KeePass Plugins:

  • KeePassRPC 1.8
  • (I have removed all other plugins now, problem still exists)

.net version:
No idea. I’m running Windows 10 1809 with all updates installed, so most likely the most recent version/s.

These two are from the same one opening of KeePass. In this case, Firefox broke, Chrome worked. But both consoles show errors.

Firefox (currently broken, showing orange “OFF”)

Chrome (currently not broken. Kee working)

And here is Chrome broken (after closing and re-opening KeePass, Chrome was broken but Firefox was working):

Thanks for the info. Another few questions that might help us narrow down the issue:

What is the DPI of your screen? Is it configured to display at a non-native DPI (e.g. by configuring Windows to display at higher zoom level than 100%)?

Can you reproduce the problem when opening and logging into just one brand new KeePass database (.kdbx file)?

Can you recall ever using a KeePass plugin that might have created or edited the icons associated with each KeePass entry?

DPI main screen: 150%
DPI secondary screens: 100%

I tried changing the display to 100% (no scaling) and the problem still exists.

The problem does not exist when using a brand new, blank KeePass database.

I have used Favicon Downloader to download favicons as icons for entries in the past.

Interesting. I wonder if there is a dodgy favicon somewhere in your database. Quite how it got in there is one question - it would be good if we can work it out and stop it happening again. Might be tough to work that out though, at least with the current version of KeePassRPC and Kee.

I’ll take a look at the KeePassRPC plugin in the next couple of days in case there is a way that we can ignore faulty icons rather than crash in the way that happens for you. Perhaps I’ll also be able to add some way of logging which entry triggers the crash.

You might be able to narrow down which entry(s) cause the problem by changing the Kee Home group in your database. First, take a backup copy of your kdbx file to make undoing this experiment easier and give us a test database that you can later use to test against the hypothetical future version of KeePassRPC I mention above. Then create a new empty group and one new entry inside it with just the default standard icon. Right click on the group and click the option to make that the Kee home group.

Now when you open that database and KeePassRPC sends the list of entries to Kee it will have just that one entry in it.

If that works, you could change the home group to different database groups and/or move entries around until you find which ones cause the problem.

If the problem still occurs with a single new entry, that doesn’t necessarily disprove the icon theory but it’ll make it tough to find out what’s happening using the current version of KeePassRPC.

Please let me know either way what you discover.

I’m wondering if this is more to do with the number of entries in your database than a specific problematic entry.

It seems that Windows has a limitation that can cause this when manipulating images - something I should be able to work around with a change to KeePassRPC - but it’s just weird that it happens so consistently for you but no-one else has ever even mentioned it as an intermittent issue despite that same code being untouched for the best part of a decade.

I posted a similar problem a couple of years ago, [see Frequent KeePassRPC Authorization on browser start-up (when using multiple browsers or profiles)] whereas opening Pale Moon & Firefox would cause a similar problem, in that when opening the 2nd browser, I would receive a message that one had to enter a new authorization number. If you did that, then the next time it was the other browser that got the same message. There was information about a solution posted by a user, but it did not work.

At the time luckyrat said it was a Firefox issue, and marked the problem as [Solved]. But it was not solved, and I still have the problem.

Harry

Changing to different “Kee home groups”:

  • New group with only standard icons and no entries = working
  • Existing folder with coincidentally only one kind of (downloaded, non-standard) icon in it (but also less than 20 entries) = working
  • Existing folder with a few downloaded icons in it but only 22 entries = working
  • Existing folder with a few downloaded icons in it but only 44 entries = working
  • Existing folder with a few downloaded icons in it but only 25 entries = not working
  • Existing folder with many downloaded icons in it and many entries = not working
  • Test folder with 8 entries, total 3 custom icons = not working
  • Same folder with 6 entries, total 3 custom icons = working
  • Same folder, put the 2 back so it’s 8 again = still working
  • Gave up at this point.

So I’m not sure if that’s very conclusive or perhaps just coincidental.

Also noticed that saving the database fixes the problem (just temporarily, until KeePass is closed and opened again), even when no changes have been made

I’ve released KeePassRPC 1.9 now:

Please can you test with this version to see if it resolves the problem. If it doesn’t, some extra debug logging from KeePass may provide us some further clues.

@Lex, your problem is not related to this topic. Please make sure you update to Kee 3.1 and KeePassRPC 1.9 and follow the latest advice in the troubleshooting guide and other documentation / topics on this forum. If none of that helps you, please start a new topic with all the details of your current problem.

This is now working.

Thanks!

1 Like