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

Unlock window gets stuck when invoked via AutoType hotkey #4164

Closed
quinncomendant opened this issue Jan 12, 2020 · 11 comments
Closed

Unlock window gets stuck when invoked via AutoType hotkey #4164

quinncomendant opened this issue Jan 12, 2020 · 11 comments

Comments

@quinncomendant
Copy link

quinncomendant commented Jan 12, 2020

Naughty Behavior

Intermittently, when I invoke AutoType while my database is locked, the unlock window gets stuck. The database unlocks successfully and AutoType completes, but the unlock window doesn't go away; it stays on top of all my other windows, and I am unable to close it, I have to force-quit KeePassXC to return to a normal state.

Here's a screenshot of the unlock window in this "stuck" state. You can see that the unlocked database has opened behind the unlock window. Notice the unlock window is in the foreground, but the window titlebar is dimmed as if it didn't have focus.

Screen Shot 2020-01-11 at 23 13 29

Possible Solution

I'm not familiar with the code behind the unlock process, but it seems like there is a function that never returns or a thread that never exits. We should check that when doing unlock after AutoType, that the unlock process will always complete and the unlock window will close when it's finished.

Steps to Reproduce

This problem is intermittent, but these are the steps that occur when it happens:

  1. Start with a locked database (for me, usually after waking from sleep)
  2. Open a web browser window with a login form
  3. Hit the AutoType hotkey
  4. Enter your KeePassXC master password
  5. After AutoType finishes, the unlock window stays open 😭

Context

This only occurs about 20% of the time. Update: Actually, this happens more frequently than I thought, because the symptom of the stuck unlock window sometimes does not appear until after sending KeePassXC to the background and returning to it later. It's happening about 90% of the time for me. I haven't identified the circumstances that cause it to occur. But it has happened enough times that I feel it's worth creating an issue ticket.

Occurred with versions 2.5.1 and 2.5.2. I never used 2.5.0, so not sure which version the problem started.

Debug Info

KeePassXC - Version 2.5.2
Revision: 62cda9d

Qt 5.14.0
Debugging mode is disabled.

Operating system: macOS Mojave (10.14)
CPU architecture: x86_64
Kernel: darwin 18.7.0

Enabled extensions:

  • Auto-Type
  • Browser Integration
  • SSH Agent
  • KeeShare (signed and unsigned sharing)
  • YubiKey
  • TouchID

Cryptographic libraries:
libgcrypt 1.8.5

@quinncomendant
Copy link
Author

Oh, this is cute: if I unplug my big monitor, so all the windows move to my macbook screen, the stuck unlock window looks like this – the unlock window container stays big, but the contents shrink. (Maybe this is a clue to how the window gets stuck?)

Screen Shot 2020-01-17 at 16 39 00

@droidmonkey
Copy link
Member

I haven't a clue on this one

@Silwing
Copy link

Silwing commented Feb 17, 2020

I have experienced this issue as well. With neither Yubikey, SSH Agent, Keeshare or Browser Integration enabled. Running version 2.5.3.

@xatage
Copy link

xatage commented Apr 10, 2020

Still no solution? I have the same issue happening here, which is very annoying.

@Silwing
Copy link

Silwing commented Apr 10, 2020

Still no solution? I have the same issue happening here, which is very annoying.

I ended up working around it by always closing the extra window whenever it comes up, and simply logging in at the main window. Then redo my auto-type afterwards.

But I seem to be able to rather consistently reproduce the error by typing the password in the extra window to finish my auto-type and then right after that clicking the KeePassXC icon in my dock.

@droidmonkey
Copy link
Member

Can you try using our snapshot build to see if the problem persists? Https://snapshot.keepassxc.org

@Silwing
Copy link

Silwing commented Apr 14, 2020

I tried to install the latest snapshot but it keeps complaining about that it needs "Accessibility and Screen Recording permissions". I run MacOS Mojave and only have the Accessibility option, which I have given permissions to. I have also restarted KeePassXC after giving the permissions.
I then tried to roll back to the stable version (2.5.4) but that doesn't work either. 2.5.3 works for me though. Will try it on MacOS Catalina tomorrow.

@droidmonkey
Copy link
Member

Restart your computer. Macos is completely screwing up permissions

@valters
Copy link

valters commented Apr 15, 2020

@droidmonkey I am seeing the same problem as @Silwing - I am running Mojave 10.14.6, the 2.5.4 keeps popping up the dialog asking for permissions though the permission is already granted.

I don't want to restart the computer, and I don't think this is appropriate request. It looks like the permission verification on KeePassXC side has regressed.

Rolling back to 2.5.3-2 restored the Auto-Type functionality without need for any restart, so it seems there is a clear and simple regression in 2.5.4 for the Accessibility permission check.

@droidmonkey
Copy link
Member

@valters you can disregard our advice or fix your problem by restarting: #4573 (comment)

@Silwing
Copy link

Silwing commented Jul 13, 2020

Just to let you know, this issue is still present on Catalina + KeePassXC version 2.6.0

It does not seem consistent. I experienced it right after upgrading to Catalina + restarting (to fix the Screen Recording permission). Trying to auto-type the first time I entered my password in the pop-over window and it auto-typed successfully but left the pop-over stuck with no means to close it (except for restarting KeePassXC).
Trying to reproduce the issue I have not been able to. Locking the database then typing my password in the pop-over window does nothing now. It does not auto-type and does not provoke the issue either.

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

5 participants