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

Crashing with KeyError in daemon.py _syncthing_cb_connections when starting daemon #582

Open
osmeest opened this issue Feb 23, 2022 · 4 comments

Comments

@osmeest
Copy link

osmeest commented Feb 23, 2022

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"]:

@eugenesan
Copy link

eugenesan commented Jun 4, 2022

Same on Ubuntu Mate 22.04.

@gtubolcev
Copy link

same on Xubuntu 22.04.

@fmjrey
Copy link

fmjrey commented Jul 13, 2023

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

@osmeest
Copy link
Author

osmeest commented Jul 13, 2023

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].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants