keepassxc-browser icon indicating copy to clipboard operation
keepassxc-browser copied to clipboard

Loosing browser connection when multiple DBs are opened

Open Massimo-B opened this issue 2 years ago • 11 comments

Hello,

when another DB is opened in parallel in KeepassXC, then the browser connection is lost. I need to close the other DB and reconnect the keepassxc-browser. Is it possible to keep the browser connection to the specified DB eventhough other DBs are opened on tabs in parallel?

Debug info

KeePassXC - 2.7.1 KeePassXC-Browser - 1.8.0 Operating system: Linux x86_64 Browser: Mozilla Firefox 91.0

Massimo-B avatar Jun 29 '22 09:06 Massimo-B

You second DB is probably a copy of the first one? Go to Database Settings and generate a new Root Group UUID for one of those, and try connecting the browsers again.

varjolintu avatar Jun 29 '22 09:06 varjolintu

Hi, I've a similar behaviour : when have two databases opened (and connected to my browser of course), if try to access to a site where the credentials are on DB 2, the plugin don't try to search on this DB but stop on the first one. I need to open KeePassXC interface and click on DB 2 to permit to the browser to read those credentials. I don't need to open or close DBs, only to change focus on KeePassXC interface, then the extension works. I've two totally different password dbs, then don't have problems with root group uuid, but to be more safe, I've regenerated that and regenerated connection key for the plugin, but with no results.

Fabick75 avatar Jul 19 '22 10:07 Fabick75

Search from all databases setting needs to be enabled if you want to use multiple databases without switching between them.

varjolintu avatar Jul 19 '22 10:07 varjolintu

I have similar issue with auto-fill, when having multiple databases. In my case, DB1 not connected to the extension and focused in the app(corresponding tab selected). DB2 connected to the extension and not focused. Search in all opened databases option enabled. The app always remains opened and DBs not locked. I expect that the extension can get entries from DB2, but it's not working until I focus DB2

denvolok avatar Aug 25 '22 04:08 denvolok

You need to enable the setting in keepassxc browser integration to allow searching all open databases.

droidmonkey avatar Aug 25 '22 11:08 droidmonkey

As I said, the option is enabled in the app. In the extension settings there is no such option. Also, when I hover over Search in all opened databases for matching credentials it shows "All databases connected to the extension will return matching credentials". So it seems like works as expected by devs - only connected databases, and my issue can be considered as an improvement.

denvolok avatar Aug 26 '22 04:08 denvolok

@denvolok That's a known issue and we're trying to improve the handling of databases in those situations.

varjolintu avatar Aug 26 '22 05:08 varjolintu

@varjolintu got it. thanks for the explanation and for your work

denvolok avatar Aug 26 '22 06:08 denvolok

I have enabled [x] Search in all opened databases. But after another database is opened, the keepassxc-browser is not connected anymore and asks to add a connection to the currently focussed new database. Is there any progress or workaround when working with multiple databases?

Massimo-B avatar Nov 22 '23 06:11 Massimo-B

@Massimo-B Check that your databases are not sharing an identical Root Group UUID. You can generate a new ones in the Database Settings.

varjolintu avatar Nov 22 '23 12:11 varjolintu

I've had the same problem. My setup: Browser profile A goes to Keepass DB A & Browser profile B goes to Keepass DB B. Each profile's browser extension is connected to the correct database. Both databases are opened in separate tabs in the same KeepassXC instance.

But: When KeepassXC shows DB B in the main window, browser profile A cannot access the DB, the connection is severed. Even with renewed UUIDs & with the "search in all open databases". Switching the shown database in KeepassXC makes the profile reestablish the connection & see the passwords.

I could fix it by connecting both browser profiles to both databases. Browser profile A can access DB A & B. Browser profile B can access DB A & B. Then, no matter what database is shown in KeepassXC main window, the correct passwords are retrieved.

I think @denvolok figured out the same, but the solution was not obvious to me.

bcxpsebastian avatar Jan 24 '24 14:01 bcxpsebastian