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

Error during setup of component panel_custom, since HA 0.111.x #36841

Closed
sparkydave1981 opened this issue Jun 16, 2020 · 7 comments · Fixed by #36926
Closed

Error during setup of component panel_custom, since HA 0.111.x #36841

sparkydave1981 opened this issue Jun 16, 2020 · 7 comments · Fixed by #36926

Comments

@sparkydave1981
Copy link

sparkydave1981 commented Jun 16, 2020

The problem

Error during setup of component panel_custom. Side panel item therefore not loaded. This happens on most restarts however has worked at least once

Environment

Home Assistant 0.111.2

arch x86_64
chassis desktop
dev false
docker true
docker_version 19.03.8
hassio true
host_os Ubuntu 18.04.4 LTS
installation_type Home Assistant Supervised
os_name Linux
os_version 5.3.0-59-generic
python_version 3.7.7
supervisor 227
timezone Australia/Perth
version 0.111.2
virtualenv false
  • Home Assistant Core release with the issue: 0.111.x
  • Last working Home Assistant Core release (if known): 0.110.7
  • Operating environment (Home Assistant/Supervised/Docker/venv): Ubuntu/HA Supervised general Linux
  • Integration causing this issue: panel_custom
  • Link to integration documentation on our website: https://www.home-assistant.io/integrations/panel_custom/

Problem-relevant configuration.yaml

N/A

Traceback/Error logs

Log Details (ERROR)
Logger: homeassistant.setup
Source: components/http/init.py:376
First occurred: 7:50:09 (1 occurrences)
Last logged: 7:50:09

Error during setup of component panel_custom
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 190, in _async_setup_component
    result = await asyncio.wait_for(task, SLOW_SETUP_MAX_WAIT)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
    return fut.result()
  File "/usr/src/homeassistant/homeassistant/components/panel_custom/__init__.py", line 180, in async_setup
    hass.http.register_static_path(url, panel_path)
  File "/usr/src/homeassistant/homeassistant/components/http/__init__.py", line 376, in register_static_path
    self.app.router.add_route("GET", url_path, serve_file)
  File "/usr/local/lib/python3.7/site-packages/aiohttp/web_urldispatcher.py", line 1036, in add_route
    expect_handler=expect_handler)
  File "/usr/local/lib/python3.7/site-packages/aiohttp/web_urldispatcher.py", line 308, in add_route
    "registered".format(route=route_obj))
RuntimeError: Added route will never be executed, method GET is already registered

Additional information

@probot-home-assistant
Copy link

panel_custom documentation
panel_custom source
(message by IssueLinks)

@sparkydave1981
Copy link
Author

This error seems to have stopped since upgrading from 0.111.2 to 0.111.3. I'll report back to close the issue if it stays happy for a few more days.

@sparkydave1981
Copy link
Author

Still a problem in 0.111.4

@balloob
Copy link
Member

balloob commented Jun 18, 2020

This happens if you register a path that already exists.

@sparkydave1981
Copy link
Author

sparkydave1981 commented Jun 19, 2020

I only have 2 entries for panel_custom.yaml

  - name: alarm
    sidebar_title: Alarm
    sidebar_icon: mdi:shield-home
    config:
      alarmid: alarm_control_panel.house 

  - name: zwavegraph2
    sidebar_title: ZWave Graph2
    sidebar_icon: mdi:access-point-network
    url_path: zwave

which have been working for over a year or more. The 'alarm' side panel is still working but the 'zwave' one does not load

@balloob
Copy link
Member

balloob commented Jun 19, 2020

I am only able to reproduce this when I add another config with the same name:

  - name: zwavegraph2
    sidebar_title: ZWave Graph2
    sidebar_icon: mdi:access-point-network
    url_path: zwave

  - name: zwavegraph2

Please check your configuration that you don't include this file twice or something.

@balloob balloob linked a pull request Jun 19, 2020 that will close this issue
20 tasks
@sparkydave1981
Copy link
Author

It's certainly not in there twice, the entire yaml file is posted above and it's not anywhere else in my config

@frenck frenck modified the milestone: 0.111.5 Jun 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants