keepassxreboot / keepassxc

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

Fails to open (enormous delay?) if DNS is not functioning [macOS] #6434

Closed newyork10023 closed 2 years ago

newyork10023 commented 3 years ago

Apologies if this has already been reported (though as yet unfixed). I tried to search for it, but found nothing.

Overview

If DNS lookup is not functioning on macOS (Mojave), the KeepassXC application either fails to open or takes forever. I usually remove all DNS entries in my System Preferences in order to get KeepassXC to open (which then happens immediately). As I need KeepassXC to fix the DNS on the firewall, this is annoying (albeit there is a work around).

Steps to Reproduce

  1. Break Unbound on your firewall (or similar). Note: DNS must be configured, the problem is not present if there is no configured DNS.
  2. Launch KeepassXC on macOS (Mojave)
  3. Wait, cursing (because you can't fix the issue causing the problem)

Expected Behavior

KeepassXC should attempt to do whatever it is trying to do through DNS (checking for updates?), and then fail gracefully after 5 seconds. Waiting indefinitely is not acceptable. I need KeepassXC in order to fix the issue.

Actual Behavior

It fails to "open" until I remove all DNS entries from System Preferences (or fix DNS otherrwise, which I usually can't because I need the passwords in KeepassXC). With no configured DNS, it opens as expected (usually immediately because it has been stalled).

Context

No working DNS. No DNS and KeepassXC loads.

KeePassXC - been going on for several versions Revision: and many, more revisions

But, here is your information from " KeepassXC -> About KeepassXC " (not " Help --> About "): KeePassXC - Version 2.6.4 Revision: 34a78f0

Qt 5.15.2 Debugging mode is disabled.

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

Enabled extensions:

Cryptographic libraries:

Operating System: macOS Desktop Env: macOS (Mojave) Windowing System: macOS

droidmonkey commented 3 years ago

If you disable update checking does it persist?

droidmonkey commented 3 years ago

I could not replicate this on Windows (disabled networking and app started without issue). This could be a macOS "feature" trying to check the signature or approval of our application before launching it.

newyork10023 commented 3 years ago

I am having difficulty reproducing the issue. I tried changing the DNS to a non-existent IP address, no luck. It happens when the Unbound service on my (pfSense) firewall is borked. (Typically, this happens after an update which mangles some advanced settings for Views, and it fails to properly load due to pfBlockerNG conflicts.) Removing all DNS entries will immediately open KeepassXC if it has already been launched and stalls.

I don't know if disabling networking (on Windows) is similar enough to my scenario with a borked DNS server-- given that with either no DNS or misconfigured DNS settings it works fine.

I will try to reproduce the borked Unbound settings to test with "Check for Updates" disabled. Soon (tm).

droidmonkey commented 3 years ago

I also changed my dns to an invalid entry and it worked

newyork10023 commented 3 years ago

The error re-occurred with Check for Updates disabled. (The switch leading to the firewall didn't have a VLAN configured to reach it although I could ping it, odd.) I will see if I can figure out how to configure a borked setup to test it further (without relying on my borkishness.

droidmonkey commented 3 years ago

This isn't our bug in that case. The absolute only thing in our app that could possibly use networking on startup is the update check. And even then it doesn't start the check until AFTER the gui is shown.