bennettpeter / android-MythTV-Leanfront

:tv: MythTV Android TV frontend
GNU General Public License v3.0
45 stars 9 forks source link

Strange leanfront behavior when backend is in an unknown state #69

Closed jfabernathy closed 9 months ago

jfabernathy commented 10 months ago

Normally if the backend if off or leanfront has the wrong IP address for it, you will get an error message.

Yesterday I started up Leanfront on a FireTV 4k Max and it looked normal. However, when I selected any program to watch the option buttons for "Play from last position", "Play from Start", and" Other action" we completely blank. So I started up Google Chrome and used the Web App to check the status. I got the header of the page but it didn't display any status.

So I tried ssh'ing into the backend and got nothing. So at this point I went to the closet with the backend and a coat had fallen off the hanger and was complete covering the backend PC and that must have cause thermal issues and who knows what happened.

I rebooted with no coat and I'm back to normal.

So it brings up a question. Why couldn't leanfront detect this and display some error, like fix the backend dumby.

Could some timeout be used so after a reasonable time you'd get such a message?

bennettpeter commented 10 months ago

There is a message 'Error No connection to MythTV Backend". This redisplays every few seconds until a connection is obtained. On a fire stick the message bubble is small and maybe you did not see it? If the backend is a valid address and is hung, the message may take longer to show up, because leanfront is waiting for a response, and the response is not coming. Screenshot_20231018_194459

jfabernathy commented 10 months ago

I've seen the error message you showed when I have a bad IP for the backend, but in this case I did not see it. The backend was clearly hung, but maybe the system was still pingable. This is not a big deal and about the only strange behavior I've seen in a long time. We use Leanfront daily and very few issues. Great program once you get used to the interface.

bennettpeter commented 10 months ago

The backend was likely hung and not responding to the connection. There is a connect timeout of 5 seconds and once connected there is a read timeout of 5 minutes. So it would be 5 minutes before you got the error if it connected but was not responding.

I was thinking that the read could take long when getting a long list of programs, but probably 5 minutes is excessive for a timeout. Perhaps 60 or 90 seconds would be better, but I don't want to cause a failure if there is a genuine long response on a very long list.