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

Whoops! something went wrong #79

Open
ward0 opened this issue Mar 12, 2019 · 20 comments
Open

Whoops! something went wrong #79

ward0 opened this issue Mar 12, 2019 · 20 comments

Comments

@ward0
Copy link

ward0 commented Mar 12, 2019

Describe the bug
default page not loading.

To Reproduce
Steps to reproduce the behavior:

  1. Copy all the files into the HA folder.
  2. reboot HA
  3. see this page (see screenshot)

Expected behavior
I should have gotten the full configuration page instead of this error.

Screenshots
If applicable, add screenshots to help explain your problem.
image

Browser (please complete the following information):

  • Browser : Chrome
  • Version v1.3.6
@RowdyDog12
Copy link

Have you tried deleting the alarm.json in your config folder?

@akasma74
Copy link

and I'd personally recommend include some kind of error message in the title when reporting such a problem as it will make easier for others to find it.
otherwise just imagine tens of identical "Whoops!" issues, not very helpful and useful.

@adipose
Copy link

adipose commented Mar 13, 2019

The "Whoops" message is what the alarm itself is reporting. If it reported a better bug, it would be easy to copy it to the title :)

@adipose
Copy link

adipose commented Mar 13, 2019

Incidentally, here's a bug I posted in the past where I got the whoops message:

#54

Maybe it will help here.

@akasma74
Copy link

akasma74 commented Mar 13, 2019

The "Whoops" message is what the alarm itself is reporting. If it reported a better bug, it would be easy to copy it to the title :)

I know, but to distinguish different issues here it's beneficial to avoid generic titles like "Whoops" or "Nothing is working".
The log contains a clear error message "Cannot read property xxx" - use that.

On the other hand, it's not that easy to extract and report the exact error from the code as the error(s) message(s) can be very long and chained (that's only my opinion). And having the whole log instead of "Whoops" might be not the best option.

Actually, looking at the code I can conclude that the Whoops functionality of the alarm receives an empty error message to display meaning something is broken on its way there. That explains lack of proper error message in the panel. Will have a look and update here.

@adipose
Copy link

adipose commented Mar 13, 2019

I agree. I just recall when I got that message I didn't have much to go on, either. I posted the behavior as best I could, but the "whoops" really was the main error. As for the browser console, it can often be misleading as the original error causes an html error.

@akasma74
Copy link

Indeed. Currently in the alarm code if detects error(s), it

  1. requests error log from HA
  2. iterates over them
    2a. if the error message contains "[alarm", it adds it to the message it then passes to the alarm.html to display.

Clearly in this particular case there was no such messages because "[alarm" != "(alarm", for example ;)

My question is do you know the easy way to make the alarm to Whoops as I need to get to that situation.

@adipose
Copy link

adipose commented Mar 13, 2019

I did not report this bug, but the similar bug that I linked was caused by mqtt service being shutdown (but enabled for hca).

@akasma74
Copy link

I know who reported this bug.
Do I get it right that simply enabling MQTT in control panel and stopping MQTT broker will break the alarm?

@ward0
Copy link
Author

ward0 commented Mar 13, 2019

@akasma74 @adipose I have to look in my configuration.yaml file and delete the MQTT section?

By reading 'deleting the MQTT section from the yaml' = i presume configuration.yaml.

@akasma74
Copy link

@akasma74 @adipose I have to look in my configuration.yaml file and delete the MQTT section?

nope. we just discussed that Whoops issue here, sorry about the mess.
have you tried what @adipose suggested yet?

@ward0
Copy link
Author

ward0 commented Mar 13, 2019

@akasma74 I don't need MQTT for the moment, i enabled it by accident while navigating in hass.io for first time...

@akasma74
Copy link

that's ok, just disable it in alarm.yaml manually if you have no access to alarm panel configuration screen.

What I want to know is are you still having this bug?
If yes, have you tried deleting the alarm.json in your config folder?

@ward0
Copy link
Author

ward0 commented Mar 13, 2019

@akasma74 I will test tonight and let you know.
So to make sure that i help you:

  1. delete alarm.json file in config folder and test if error is gone.
    if not:
    delete MQTT section in alarm.yaml section.

@akasma74
Copy link

I'd also recommend to clear ALL browsers' cache and restart them and then do testing.

@akasma74
Copy link

And it would be great to enable debug logging, too

@ward0
Copy link
Author

ward0 commented Mar 13, 2019

@akasma74 the requested log files:
2019-03-13 21:25:21 WARNING (MainThread) [homeassistant.config] Incomplete core configuration. Auto detected latitude: 51.1833, longitude: 2.8167, name: Westende, time_zone: Europe/Brussels, elevation: 0
2019-03-13 21:25:21 ERROR (MainThread) [homeassistant.loader] Unable to find component default
2019-03-13 21:25:22 ERROR (MainThread) [homeassistant.loader] Unable to find component logs
2019-03-13 21:25:22 ERROR (MainThread) [homeassistant.loader] Unable to find component homeassistanthomeassistant
2019-03-13 21:25:26 ERROR (MainThread) [homeassistant.config] Invalid config for [panel_iframe]: invalid slug node-red (try node_red) for dictionary value @ data['panel_iframe']. Got OrderedDict([('configurator', OrderedDict([('title', 'Configurator'), ('icon', 'mdi:wrench'), ('url', 'http://192.168.1.2:3218')])), ('pihole', OrderedDict([('title', 'Pi-hole'), ('icon', 'mdi:block-helper'), ('url', 'http://192.168.1.2:4865')])), ('node-red', OrderedDict([('title', 'Node-Red'), ('icon', 'mdi:wrench'), ('url', 'http://192.168.1.2:1880')]))]). (See /config/configuration.yaml, line 46). Please check the docs at https://home-assistant.io/components/panel_iframe/
2019-03-13 21:25:26 ERROR (MainThread) [homeassistant.setup] Setup failed for panel_iframe: Invalid config.
2019-03-13 21:25:26 ERROR (MainThread) [homeassistant.loader] Unable to find component default
2019-03-13 21:25:26 ERROR (MainThread) [homeassistant.setup] Setup failed for default: Component not found.
2019-03-13 21:25:26 ERROR (MainThread) [homeassistant.loader] Unable to find component logs
2019-03-13 21:25:26 ERROR (MainThread) [homeassistant.setup] Setup failed for logs: Component not found.
2019-03-13 21:25:26 ERROR (MainThread) [homeassistant.loader] Unable to find component homeassistanthomeassistant
2019-03-13 21:25:26 ERROR (MainThread) [homeassistant.setup] Setup failed for homeassistanthomeassistant: Component not found.
2019-03-13 21:25:27 ERROR (MainThread) [homeassistant.components.device_tracker] Unable to load /config/known_devices.yaml: Config file not found: /config/known_devices.yaml
2019-03-13 21:25:27 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/homeassistant/setup.py", line 56, in async_setup_component
return await task # type: ignore
File "/usr/local/lib/python3.7/site-packages/homeassistant/setup.py", line 124, in _async_setup_component
conf_util.async_process_component_config(hass, config, domain)
File "/usr/local/lib/python3.7/site-packages/homeassistant/config.py", line 743, in async_process_component_config
platform = get_platform(hass, domain, p_name)
File "/usr/local/lib/python3.7/site-packages/homeassistant/loader.py", line 105, in get_platform
base_paths)
File "/usr/local/lib/python3.7/site-packages/homeassistant/loader.py", line 166, in _load_file
module = importlib.import_module(path)
File "/usr/local/lib/python3.7/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 967, in _find_and_load_unlocked
File "", line 677, in _load_unlocked
File "", line 724, in exec_module
File "", line 860, in get_code
File "", line 791, in source_to_code
File "", line 219, in _call_with_frames_removed
File "/config/custom_components/alarm_control_panel/bwalarm.py", line 12
homeassistant"""
CUSTOM ALARM COMPONENT BWALARM
https://github.com/gazoscalvertos/Hass-Custom-Alarm

VERSION: 1.1.4
MODIFIED: 10/02/19
GazosCalvertos: Yet another take on a custom alarm for Home Assistant

CHANGE LOG:
-Fixed username issue in log

"""

^
SyntaxError: invalid syntax
2019-03-13 21:26:12 WARNING (MainThread) [homeassistant.setup] Setup of hassio is taking over 10 seconds.
2019-03-13 21:26:12 ERROR (MainThread) [homeassistant.components.hassio.handler] Timeout on /homeassistant/options request

in alarm.yaml i have only:
platform: bwalarm
name: House

no alarm.json file found in the config folder...

and i still have the error :(

@akasma74
Copy link

If you comment this alarm panel in your configuration.yaml, is your HA starts up ok without any errors?

@ward0
Copy link
Author

ward0 commented Mar 14, 2019

i did, here is the log:

2019-03-14 23:05:58 WARNING (MainThread) [homeassistant.config] Incomplete core configuration. Auto detected latitude: 51.1833, longitude: 2.8167, name: Westende, time_zone: Europe/Brussels, elevation: 0
2019-03-14 23:05:58 ERROR (MainThread) [homeassistant.loader] Unable to find component homeassistanthomeassistant
2019-03-14 23:06:03 ERROR (MainThread) [homeassistant.loader] Unable to find component homeassistanthomeassistant
2019-03-14 23:06:03 ERROR (MainThread) [homeassistant.setup] Setup failed for homeassistanthomeassistant: Component not found.
2019-03-14 23:06:03 ERROR (MainThread) [homeassistant.config] Invalid config for [panel_iframe]: invalid slug Pi-hole (try pi_hole) for dictionary value @ data['panel_iframe']. Got OrderedDict([('configurator', OrderedDict([('title', 'Configurator'), ('icon', 'mdi:wrench'), ('url', 'http://192.168.1.2:3218')])), ('Pi-hole', OrderedDict([('title', 'Pi-hole'), ('url', 'http://192.168.1.2:4865')])), ('Node-Red', OrderedDict([('title', 'Node-Red'), ('url', 'http://192.168.1.2:1880')]))]). (See /config/configuration.yaml, line 39). Please check the docs at https://home-assistant.io/components/panel_iframe/
2019-03-14 23:06:03 ERROR (MainThread) [homeassistant.setup] Setup failed for panel_iframe: Invalid config.
2019-03-14 23:06:04 ERROR (MainThread) [homeassistant.components.device_tracker] Unable to load /config/known_devices.yaml: Config file not found: /config/known_devices.yaml
2019-03-14 23:06:24 WARNING (MainThread) [homeassistant.setup] Setup of hassio is taking over 10 seconds.

@akasma74
Copy link

Well, my advice is simple - you need to fix your HA first as it's not loading properly.
And as soon as you get it done, please provide us with the log containing bwalarm-related errors.

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