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

panic: interface conversion: interface {} is map[string]string, not map[string]interface {} #5270

Closed
Martchus opened this Issue Oct 14, 2018 · 1 comment

Comments

Projects
None yet
3 participants
@Martchus
Copy link

commented Oct 14, 2018

I've noticed that Syncthing 0.14.51 crashes on my Arch Linux system with the following error:

panic: interface conversion: interface {} is map[string]string, not map[string]interface {}

Full error log: http://paste.opensuse.org/96753389

Here's how I could reproduce the issue:

  1. Copy https://github.com/Martchus/syncthingtray/blob/master/connector/testfiles/testconfig/config.xml to an empty directory
  2. Start syncthing -gui-address=http://localhost:4001 -gui-apikey=syncthingtestinstance -home=/dir/with/config -no-browser -verbose

Further notes:

  • The problem only occurs if device MMGUI6U-WUEZQCP-XZZ6VYB-LCT4TVC-ER2HAVX-QYT6X7D-S6ZSG2B-323KLQ7 is actually reachable in my local network.
  • This device in my local network has actually a different device ID than stated in the configuration file. That 'misconfiguration' comes from the fact that https://github.com/Martchus/syncthingtray/blob/master/connector/testfiles/testconfig/config.xml is really just intended for testing Syncthing Tray's code and no actual connection is supposed to happen.
  • I have another Syncthing instance running at the same time which is configured correctly and it can connect to the mentioned device in my local network.

Comments from @imsodin via IRC:

[23:50] <imsodin> Martchus: The log is pretty clear, looks like a straight forward bug. what's not straight forward is, that it is present since an eternity and you seem to be the first to observe it!?
[23:50] <imsodin> could you file it on github please
[00:06] <Martchus> to me 'panic: interface conversion: interface {} is map[string]string, not map[string]interface {}' mean litterally nothing - likely some (de)serialization code - but it doesn't point to a file or line of code
[00:13] <imsodin> the next block contains the info about which line in the code this originates.
[00:13] <imsodin> then I grep for "DeviceRejected" and see that the type in which it is logged is different from the type in the assertion -> boom
[00:14] <imsodin> i can reliably reproduce by starting a fresh instance with -verbose and by adding this device on a remote device. as soon as the "invitation" reaches here, it panics
[00:15] <imsodin> i suspect this did not surface due to suture handling the panics before

@imsodin

This comment has been minimized.

Copy link
Member

commented Oct 14, 2018

verboseservice.go

case events.DeviceRejected:
		data := ev.Data.(map[string]interface{})

model.go

		events.Default.Log(events.DeviceRejected, map[string]string{

Looking at the log this seems to be the case since always, potential just "screened" by suture.

@imsodin imsodin self-assigned this Oct 14, 2018

imsodin added a commit to imsodin/syncthing that referenced this issue Oct 14, 2018

@imsodin imsodin added the bug label Oct 14, 2018

imsodin added a commit to imsodin/syncthing that referenced this issue Oct 14, 2018

imsodin added a commit to imsodin/syncthing that referenced this issue Oct 14, 2018

imsodin added a commit to imsodin/syncthing that referenced this issue Oct 14, 2018

imsodin added a commit to imsodin/syncthing that referenced this issue Oct 15, 2018

imsodin added a commit to imsodin/syncthing that referenced this issue Oct 15, 2018

@calmh calmh closed this in 6325ae0 Oct 15, 2018

@calmh calmh added this to the v0.14.53 milestone Oct 31, 2018

@calmh calmh changed the title Syncthing panics with 'interface conversion: interface ...' panic: interface conversion: interface {} is map[string]string, not map[string]interface {} Oct 31, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.