syncthing-gtk icon indicating copy to clipboard operation
syncthing-gtk copied to clipboard

Crashing with KeyError in daemon.py _syncthing_cb_connections when starting daemon

Open osmeest opened this issue 2 years ago • 4 comments

Running syncthing-gtk 0.9.4.4+ds+git20201209+c46fbd8-1 on Ubuntu 21.10, syncthing-gtk crashes after starting the daemon from the app. There are two potential KeyError being thrown in line 499 and following as "paused" and "connected" might not yet be present in cons[id]. Their presence should be checked before testing their values.

Traceback (most recent call last): File "/usr/lib/python3/dist-packages/syncthing_gtk/daemon.py", line 1166, in _response self._callback(rdata, *self._callback_data) File "/usr/lib/python3/dist-packages/syncthing_gtk/daemon.py", line 499, in _syncthing_cb_connections if cons[id]["paused"]: KeyError: 'paused'

Traceback (most recent call last): File "/usr/lib/python3/dist-packages/syncthing_gtk/daemon.py", line 1166, in _response self._callback(rdata, *self._callback_data) File "/usr/lib/python3/dist-packages/syncthing_gtk/daemon.py", line 505, in _syncthing_cb_connections if cons[id]["connected"]: KeyError: 'connected'

line 499: if cons[id]["paused"]: ==> if "paused" in cons[id] and cons[id]["paused"]: line 505: if cons[id]["connected"]: ==> if "connected" in cons[id] and cons[id]["connected"]:

osmeest avatar Feb 23 '22 23:02 osmeest

Same on Ubuntu Mate 22.04.

eugenesan avatar Jun 04 '22 18:06 eugenesan

same on Xubuntu 22.04.

gtubolcev avatar Mar 19 '23 17:03 gtubolcev

Experiencing this bug. Any idea how to resolve/workaround?

fmjrey avatar Jul 13 '23 08:07 fmjrey

Project has moved to a more generic https://github.com/syncthing-gtk/syncthing-gtk/. A new tag (0.9.4.5) has been made but problem probably still exists (lines have moved to 534 but the test is still not protected against absence of "paused" or "connected" in cons[id].

osmeest avatar Jul 13 '23 10:07 osmeest