xbmc / Kore

Kore is a simple and easy-to-use Kodi remote.
Apache License 2.0
649 stars 243 forks source link

Report connection failures and their reasons #123

Closed mvglasow closed 8 years ago

mvglasow commented 9 years ago

When connection to the media center fails, the screen will just show "Connecting..." forever. I would like to see more precisely what is happening: is Kore just waiting for a response from the media center, or was the connection rejected due to bad credentials, or something else? The way it is, troubleshooting is hard, if not an outright matter of luck.

SyncedSynapse commented 9 years ago

I understand what you mean, but the thing is, there's no magic bullet for it. Consider:

mvglasow commented 8 years ago

I understand everything will be impossible to catch. Especially, when it's a network issue (no route, blocked by firewall etc.), I don't expect Kore to figure that out. What I would expect Kore to do is to display a message when an error occurs on connection. In the above cases, a message stating "The connection timed out" would be sufficient for me.

I didn't find any diagnostic options in the server setting for a server that is already configured. I guess I need to explain myself better here: I had my media center set up but the next update reset my configuration so that my user name and password were no longer valid. Here I would assume Kore gets an unambiguous error code back from the server – and in that case, it should just display an appropriate message to the user.

And there are probably a few more connection errors that may happen: for instance, when TCP is used, the server may simply reply with a RST when there is no listener on that port (possible reasons: wrong port, wrong server or Kodi not running).

All of these may happen when connecting to a server that has previously been set up successfully. Therefore it's important to have this functionality not only in the setup activity but on every connection attempt.