MeisApps / pcbu-desktop

Desktop app for PC Bio Unlock
https://meis-apps.com/pc-bio-unlock
GNU General Public License v3.0
3 stars 2 forks source link

Login service fails to connect if internet connection is not ready yet #4

Closed YannickMickler closed 2 days ago

YannickMickler commented 2 weeks ago

My windows pc sometimes needs up to 15 seconds to enable and connect to the router successfully on login screen. When the pc unlock service tries to connect in that time it fails sometimes because the lan connection needs more time. To fix this, I need to switch the login option to e.g. pin and switch again to pc unlock for trying again.

An option for the retry timeout or something similar would be pretty useful.

MeisApps commented 2 weeks ago

There is already a check in place for the LAN connection here. Do you have any WAN connections on your PC? This might explain why the check falls through on your system.

YannickMickler commented 1 week ago

@MeisApps So I've checked this again and disabled every network adapter but the ethernet and bluetooth adapter (I have seven adapters e.g. VPN and VMware). Seems like this doesn't fix the slow initialization at startup and the fail of the pc unlock either. Not sure if I can fix that as I saw other threads of people complaining about it. A solution on application level would be awesome.

Services log of not working attemp:

[2024-07-01 08:23:56.572] Logger init.
[2024-07-01 08:24:22.490] connect() failed.
[2024-07-01 08:24:22.539] Server state: 4
[2024-07-01 08:24:22.539] Final state: 4
[2024-07-01 08:24:29.202] Server state: 1
[2024-07-01 08:24:29.202] Final state: 1
[2024-07-01 08:24:29.331] Logger destroy.
MeisApps commented 1 week ago

Hmm, I'd really like to know what causes the check to report success too early. But anyway, I'll add a configurable timeout in the next update.

th3030 commented 4 days ago

A timeout and reconnection attempts would be a good idea to implement.

MeisApps commented 2 days ago

The latest update now has configurable timeouts and connect retries.