keepassxreboot / keepassxc

KeePassXC is a cross-platform community-driven port of the Windows application “Keepass Password Safe”.
https://keepassxc.org/
Other
20.07k stars 1.42k forks source link

KeepassXC crash after launch it from Firefox's KeepassXC-Browser extension #1621

Closed Spheerys closed 6 years ago

Spheerys commented 6 years ago

KeepassXC crash after launch it from Firefox's KeepassXC-Browser extension.

Expected Behavior

  1. I'm on Firefox.
  2. I'm launching KeepAssXC from the KeepassXC-Browser Reload icon
  3. KeepassXC is launched and I can insert my passkey to unlock the database and minimize it
  4. Back in Firefox, I could fullfilled connexion fields from KeepassXC-Browser/KeepassXC

Current Behavior

After clicking on the Reload button, KeeâssXC is launched but after 5 second, it's crashing. I don't have the time to insert my passkey phrase

Context

Firefox 58.0.2 64bits ArchLinux KeepassXC-Browser 1.0.0 KeepassXC 2.3.0

Debug Info

KeePassXC - Version 2.3.0 Révision: 4c0ed74

Bibliothèques :

Système d'exploitation : Anarchy Linux Architecture CPU : x86_64 Kernel : linux 4.15.6-1-ARCH

Extensions activées :

Libraries:

Operating system: OS CPU architecture: ARCH Kernel: KERNEL

Enabled extensions:

varjolintu commented 6 years ago

Any chance to provide any debug info? Can you compile the sources? I'll try this ASAP.

Spheerys commented 6 years ago

Which programm ? KeePassXC or KeePassXC-Browser ? Is there a documentation to do this ?

varjolintu commented 6 years ago

KeePassXC. Compile the sources using this guide, but use -DCMAKE_BUILD_TYPE=Debug. Then the only thing you can do (because KeePassXC is started from the browser) is to install (for example) QtCreator and attach its debugger to the running KeePassXC process.

I quickly tested the same situation with Arch Linux but didn't see any crashes. Does the same happen if you enable the proxy?

Spheerys commented 6 years ago

If by "activate the proxy" you mean "activate the KeePassHTTP server", so yes, it's crashing too. I'm on Arch too. I will try to compile it with debug mode enabled, but I'm not sure to understand the link with QtCreator...

varjolintu commented 6 years ago

No, I don't mean that. I mean the new Browser Integration settings. There's a proxy setting in the Advanced tab.

Spheerys commented 6 years ago

If by "activate the proxy" you mean "activate the KeePassHTTP server", so yes, it's crashing too. I'm on Arch too. I will try to compile it with debug mode enabled, but I'm not sure to understand the link with QtCreator...

Spheerys commented 6 years ago

Oh oh... funny thing : if I prepare my loooong passphrase on the clipboard, and if I paste the passphrase on KeePassXC during the 5 seconds, and if I validate quickly, then everything works !!!

varjolintu commented 6 years ago

Five seconds is the exact time for STDIN timeout. So this might be related to https://github.com/keepassxreboot/keepassxc/issues/1620.

varjolintu commented 6 years ago

Are you still having the issue with KeePassXC 2.3.1?

Spheerys commented 6 years ago

yes I still have the issue with KeepassXC :(

varjolintu commented 6 years ago

Did you try to compile the sources in debug and use gdb/QtCreator/some_other_debugger to attach to the process?

Spheerys commented 6 years ago

My first try wasn't a success and I didn't have enought time to try again for now....

Spheerys commented 6 years ago

After compiling keepassxc with debug option, I have this error after unlock my kbx file : ASSERT: "!m_customIcons.contains(uuid)" in file /tmp/yaourt-tmp-hedy/aur-keepassxc-git/src/keepassxc/src/core/Metadata.cpp, line 384 [1] 13768 abort (core dumped) keepassxc

droidmonkey commented 6 years ago

That means you have two or more custom icons that are identifying with the same uuid. This would indicate a corruption in your database. If possible, can you open XC manually, then your database, then delete all custom icons. You can "save as" as a test.

I don't understand why this would cause a crash only when loaded through Firefox though

Spheerys commented 6 years ago

I have a good news. Before your answer, I have installed keepassxc-git version without the debug mode (under ArchLinux), instead of keepassxc community version And the issue disappear !!

Here my debug info :

KeePassXC - Version 2.3.1-snapshot
Build Type: Snapshot
Révision : 5a84978

Bibliothèques :
- Qt 5.10.1
- libgcrypt 1.8.2

Système d’exploitation : Arch Linux
Architecture processeur : x86_64
Noyau : linux 4.15.15-1-ARCH

Extensions activées :
- Auto-Type
- Browser Integration
- SSH Agent
- YubiKey
droidmonkey commented 6 years ago

Ok great