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

Linux: Crash when two databases use hardware key and one is closed without key present #11450

Closed
florealcab opened this issue Nov 8, 2024 · 17 comments · Fixed by #11513
Closed

Comments

@florealcab
Copy link

Overview

Close a database (if 2 databases opened) cause bugs:

  • everytime the link between keepassxc and the browser extension (in chrome or firefox) is lost for the still opened databases: icon show an error, saying unable to connect to keepassxc, if we click to reload it's restored
  • sometimes, keepassxc completely crash (close, segment fault or something else?) and we have to restart it

Steps to Reproduce

  1. Open a database
  2. Open another database
  3. Close the last opened database

Expected Behavior

KeepassXC is still alive, the still opened database is still connected in keepassxc browser

Actual Behavior

Sometimes, KeepassXC crashes. If not, the link with keepassxc browser is always lost.

Context

KeePassXC - 2.7.9
Revision: 8f6dd13

Operating System: Linux (debian 12)
Desktop Env: KDE
Windowing System: X11

@florealcab florealcab added the bug label Nov 8, 2024
@droidmonkey
Copy link
Member

I have never seen the application crash when closing a database tab. You'll have to provide a stack trace to validate that finding. If your other database is not connected to the browser extension, then it will not shift the connection to it. I have also not experienced this issue. When closing a database or changing tabs, the browser extension updates immediately.

@droidmonkey
Copy link
Member

Please provide a screen recording showing what you are seeing.

@varjolintu
Copy link
Member

If you are using two databases at the same time, make sure the second one is not a clone. Goto Database Settings -> Browser Integration and generate new Root Group UUID's to them just in case.

@florealcab
Copy link
Author

I can't give you a video of the crash yet as it's random.

But for the keepassxc browser link broken after closing one of the 2 databases, here is the video:

simplescreenrecorder-2024-11-28_19.55.12.mp4

Note that databases are NOT a clone, they have been created the two from scratch (one of them created from a passman CSV export, the other as a new empty db)

@droidmonkey droidmonkey changed the title Close a database Browser extension doesn't connect to remaining database after closing current Nov 28, 2024
@varjolintu
Copy link
Member

What does the extension log says? You can access it from about:debugging.

@florealcab
Copy link
Author

The message says (it's in french sorry): [Error keepass.js:256] KeePassXC-Browser - 5: Impossible de se connecter à KeePassXC. Vérifiez que l’intégration au navigateur est activée dans les paramètres de KeePassXC.

The browser integration is activated. If I click to reload button ("Recharger" in french, I think it should be reload in english, or refresh) the connection work again on the remaining database.

@varjolintu
Copy link
Member

This is something I could try to reproduce, but I'm more interested about the KeePassXC crash.

@florealcab
Copy link
Author

I will try to reproduce it at my work office soon. It happen more often here than at home for some reason I don't know... and I will try to have some logs about that

@florealcab
Copy link
Author

I have the bug now in video of keepassxc crash while closing one of the 2 databases:

simplescreenrecorder-2024-11-29_15.10.20.mp4

I launch keepass from terminal so I can have log. App logs are:

...
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
Failed to read proxy message:  "données invalides à la fin du document"
fish: Job 1, 'keepassxc' terminated by signal SIGSEGV (Erreur de frontière d'adresse)

First lines appears before crash, not important. The important lines are the 2 last: maybe the crash is due to the french locale so? Maybe the accent in that message?

@varjolintu
Copy link
Member

Can you provide any crash logs?

@florealcab
Copy link
Author

I don't know where I find it... KDE don't detect crash of keepass so it does not give me a bug report so... I send you what I have in the terminal from where I launch keepass, I don't have more thant that. Except if you can help me for where I can find it

@droidmonkey
Copy link
Member

Run a snapshot version to get crash reports: https://snapshot.keepassxc.org

@florealcab
Copy link
Author

I try the AppImage for the link you give me, but I don't view any crash log too. Dolphin just says me "the process crash" but without more details...

But I better understand how to reproduce the crash error. In my case the work database is protected only by a yubikey. The home database is protected by a yubikey + a password.

Several scenarios:

  1. If I close home or work database with yubikey still plugged: no crash
  2. If I close work database without yubikey plugged: no crash
  3. If I close home database without yubikey plugged: crash always

At home, the yubikey is generally always plugged, but not at work, that seems to explain why I experience this crash bug mainly at work.

Please keep in mind that the bug with keepassxc browser is not related to that, it occurres in all cases listed above.

@droidmonkey
Copy link
Member

I cannot replicate this crash at all on Windows

@varjolintu
Copy link
Member

And I cannot replicate the error in the extension when opening two databases and removing the second database tab.

@droidmonkey
Copy link
Member

I replicated the crash on Linux. I am going to re-title this issue to focus on the crash. If the browser issue persists and we can replicate we can open another issue.

@github-project-automation github-project-automation bot moved this to To triage in WIP Tracker Nov 30, 2024
@droidmonkey droidmonkey changed the title Browser extension doesn't connect to remaining database after closing current Crash when two databases use hardware key and one is closed without key present Nov 30, 2024
@droidmonkey droidmonkey changed the title Crash when two databases use hardware key and one is closed without key present Linux: Crash when two databases use hardware key and one is closed without key present Nov 30, 2024
@droidmonkey droidmonkey moved this from To triage to In progress in WIP Tracker Nov 30, 2024
@droidmonkey
Copy link
Member

I added the fix to #11513

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

Successfully merging a pull request may close this issue.

3 participants