Frontend: Hass.io panel provides no feedback in interface when action causes an error

Created on 21 Sep 2018  ·  15Comments  ·  Source: home-assistant/frontend

@genestealer commented on Sep 9, 2018, 6:19 PM UTC:

Feature Request
Please consider reporting back error messages to the UI / log when starting HASSIO add-ons.

Background
Hass.io provides no error messages shown when starting add-ons, which fail when attempting to start.

My Home Assistant is in the form of Hass.IO in Docker on a virtualized Ubuntu Server 18.04, as per these instructions: https://bonani.tech/how-to-install-hass.io-on-ubuntu-server-18.04/ .

As an example, I already have an server running on the same port as the add-in wants to bind to, I'm my case APC UPS Daemon is running on the Ubuntu server, so when trying to start the Hass.io apcupsd add-on it fails and the only line in the logs is: “Error grabbing logs: EOF”.

The issue turned out to be I already had a APCUPSD server running on the same machine, so the new docker container could not start because port was in use (error message: 3551: bind: address already in use).

Only found by using Docker Portainer by manually starting the apcupsd Hass.io add-on which then presented me with the error.

This issue was moved by frenck from home-assistant/hassio#689.

stale supervisor

All 15 comments

@genestealer commented on Sep 9, 2018, 7:30 PM UTC:

In the meantime we can view the logs via: your_hass_instance/hassio/system

@pvizeli commented on Sep 9, 2018, 10:03 PM UTC:

What do you see inside supervisor logs?

@genestealer commented on Sep 9, 2018, 11:09 PM UTC:

The logs are there inside the supervisor logs, but my request is to have the error show up when attempting to manually start an add in. Currently when trying to start nothing appears, there is no obvious indication that any action has taken place. The only way to know why the little indicator hasn't switch to green is to check the logs.

@frenck commented on Sep 21, 2018, 9:33 AM UTC:

Changed the title a little to be more descriptive of the issue.
This is something that should be solved in the frontend and therefore I'll move this to the frontend repo.

The Hass.io panel is currently unmaintained.

ping @ludeeus

The supervisor only reports "Unknown Error, see logs", that's not super helpful to display to the user.
Until the response returns the actual error message I do not think this should be displayed on the add-on page.

/hassio/system -> Logs will have the error.

So the problem here is that we have <ha-call-api-button> and it's a hack that I used to quickly stamp out a whole hassio panel initially. And ofc the hack stayed alive 😅

I think that we could upgrade that button to show an alert to the user with the error message when things go wrong.

That button is part of the problem, but moving it to something else and using the same logic as do do with other API calls is a quick task.

But it will not help that much (I tried it), the initial post here was to catch the bind error.
So I tested with that and that is reported back over the API as a unknown error.

okay, so to be able to fix this, we should start fixing this in the hassio-supervisor I think.

@frenck you initially moved this issue to the frontend. Do you agree?

Do we know by any chance if HassioError in utils.py contains the actual error? In that case we could make it str(err) + " For more info, see the logs."

So checked with the masters, HassioError does not contain the issue because the code works now like this:

logger.error("some detailed msg")
raise HassioErrror

The supervisor needs to be updated by passing the msg to HassioError, probably with a helper like log_and_throw

I guess a good start will be to update https://github.com/home-assistant/supervisor/blob/dev/hassio/exceptions.py and start adding messages to these. So HassioError becomes "Uknown error" (default), then each subclass will need a default message added that can be overridden

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Depechie picture Depechie  ·  3Comments

TheZoker picture TheZoker  ·  3Comments

Fusseldieb picture Fusseldieb  ·  4Comments

wangyt123ng picture wangyt123ng  ·  3Comments

bmf7777 picture bmf7777  ·  3Comments