samclane / LIFX-Control-Panel

As LIFX no longer supports their Windows 10 app, I created an open-source alternative for controlling LIFX-brand smart lights.
https://github.com/samclane/LIFX-Control-Panel
MIT License
161 stars 19 forks source link

Unhandled runtime exception: ConnectionResetError #146

Open Quinten0508 opened 1 year ago

Quinten0508 commented 1 year ago

Describe the bug The application does not launch successfully, instead showing the following error message:

Unhandled runtime exception: Traceback (most recent call last):
File "lifx_control_panel\__main__.pyw", line 335, in main
File "lifx_control_panel\__main__.pyw", line 101, in __init__
File "lifx_control_panel\__main__.pyw", line 167, in scan_for_lights
File "lifxlan\lifxlan.py", line 38, in get_devices
File "lifxlan\lifxlan.py", line 50, in discover_devices
File "lifxlan\lifxlan.py", line 259, in broadcast_with_resp
ConnectionResetError: [WinError 100541] An existing connection was forcibly closed by the remote host

Please report this at:
https://github.com/samclane/lifx_control_panel/issues

To Reproduce Steps to reproduce the behavior:

  1. Download v2.3.1 (latest) lifx_control_panel.exe from release
  2. Open executable
  3. See error

Expected behavior I'd expect the application to simply launch/open, but it errors out. When ok is pressed, both the error window and the purple splashscreen close. Running the executable with administrator rights does not do anything.

Screenshots error window: image error window and purple splashscreen(?) side-by-side. The error dialog can be dragged, the splashscreen cannot be moved. image

Desktop (please complete the following information):

Please attach your logfile (lifx-control-panel.log) No logfile is generated, nor is there any console output when ran through a terminal (powershell/command prompt). Running the debug build outputs the following (behaviour stays exactly the same):

2023-07-09 14:03:46,117 - root - INFO - Logger initialized.
2023-07-09 14:03:46,221 - root.LifxFrame - INFO - Root logger initialized: root.LifxFrame
2023-07-09 14:03:46,222 - root.LifxFrame - INFO - Binary Version: 2.3.0
2023-07-09 14:03:46,222 - root.LifxFrame - INFO - Build time: 2022-12-12T06:22:59.747968
2023-07-09 14:03:46,259 - root - ERROR - [WinError 10054] An existing connection was forcibly closed by the remote host
Traceback (most recent call last):
  File "lifx_control_panel\__main__.pyw", line 335, in main
  File "lifx_control_panel\__main__.pyw", line 101, in __init__
  File "lifx_control_panel\__main__.pyw", line 167, in scan_for_lights
  File "lifxlan\lifxlan.py", line 38, in get_devices
  File "lifxlan\lifxlan.py", line 50, in discover_devices
  File "lifxlan\lifxlan.py", line 259, in broadcast_with_resp
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host

Additional context Running the same executable in Windows Sandbox (essentially a virtual machine) does not give this error. The application seems to work fine, albeit that it can't find any lights, but that is most likely related to how the VM is set up (no local network discovery).

acortesg1300 commented 1 year ago

Hey @Quinten0508 I hope you are having a good day! I was able to reproduce your issue by using the app with my Google One VPN;

Bug reproduction

The issue no longer happens when turning off Google One VPN;

Bug fix

If you are using a VPN, try turning it off before launching LIFX Control Panel.

Hope this helps shine some light on what might be the cause for anyone who knows how to fix this VPN incompatibility issue.

Quinten0508 commented 1 year ago

Sorry for the late reply! Just got back home and confirmed that my VPN is turned off and the issue persists. I've also tried adding firewall rules (both in- and outbound) but without success.

Quinten0508 commented 1 year ago

Nevermind, I had Tailscale enabled in the background. Disabling that fixed the connection issue :D

Japh commented 1 year ago

I'm also getting this error, with no VPN running.

Japh commented 1 year ago

Actually, I take that back. The symptoms appear the same, but the specific error I see is different. I will open a separate issue.