home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.11k stars 29.79k forks source link

Error opening Add-on store #23389

Closed mbagona closed 5 years ago

mbagona commented 5 years ago

Home Assistant release with the issue:

0.92.0 **Last working Home Assistant release (if known):** **Operating environment (Hass.io/Docker/Windows/etc.):** Hass.io on ESXi VM **Description of problem:** After opening Hass.io -> Add-on Store, error message from browser is showed: `Failed to fetch add-on info` Page will be blank. In System log Error is generated every time. My steps: ``` Removed ESPhomeyaml repository Uninstalled ESPhomeyaml Add-on Added ESPHome repository https://github.com/esphome/hassio Refreshed page Error ``` **Traceback (if applicable):** ``` 19-04-25 15:38:16 ERROR (MainThread) [aiohttp.server] Error handling request Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/aiohttp/web_protocol.py", line 418, in start resp = await task File "/usr/local/lib/python3.7/site-packages/aiohttp/web_app.py", line 458, in _handle resp = await handler(request) File "/usr/local/lib/python3.7/site-packages/aiohttp/web_middlewares.py", line 119, in impl return await handler(request) File "/usr/local/lib/python3.7/site-packages/hassio/api/security.py", line 144, in token_validation return await handler(request) File "/usr/local/lib/python3.7/site-packages/hassio/api/utils.py", line 32, in wrap_api answer = await method(api, *args, **kwargs) File "/usr/local/lib/python3.7/site-packages/hassio/api/addons.py", line 139, in list ATTR_NAME: addon.name, File "/usr/local/lib/python3.7/site-packages/hassio/addons/addon.py", line 271, in name return self._mesh[ATTR_NAME] TypeError: 'NoneType' object is not subscriptable ``` **Additional information:** Manually removing added repository from the configuration file might help reproducing the issue, but I'm not sure where to look for it.
ghost commented 5 years ago

Hey there @home-assistant/hass-io, mind taking a look at this issue as its been labeled with a integration (hassio) you are listed as a codeowner for? Thanks!

This is a automatic comment generated by codeowners-mention to help ensure issues and pull requests are seen by the right people.

thorleifjacobsen commented 5 years ago

Have the same error after the latest upgrade. :/ any tip on how to fix?

JamieP83 commented 5 years ago

same issue

i did get some error in my logs about #introduction: being empty and commented it out

pvizeli commented 5 years ago

reboot device fixes it. Will add a fix for that bug. Look like they exist since a year now.

JamieP83 commented 5 years ago

ive done multi reboots and still no luck im afraid.

Rpi

arch armv7l
dev false
docker true
hassio true
os_name Linux
python_version 3.7.3
timezone Europe/London
version 0.92.0
virtualenv false
thorleifjacobsen commented 5 years ago

Reboot did fix mine! Seems like the error was due to me adding a faulty repo url!

What I did was:

  1. Tried to add this url to merge to lovelace: https://github.com/hassio-addons/addon-lovelace-migration
  2. Tried to remove it
  3. It did not work, created an error. Chose to upgrade hassio to newst version.
  4. Bom, error! could not load repo list anymore.

Then to fix it i just restarted the whole PC and it worked magically.

(Figured out that I dont needed migrator as I am way up in the versions! :P )

pvizeli commented 5 years ago

Fix with next Hass.io release

det-peralta commented 5 years ago
19-05-16 17:59:43 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/aiohttp/web_protocol.py", line 418, in start
    resp = await task
  File "/usr/local/lib/python3.7/site-packages/aiohttp/web_app.py", line 458, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.7/site-packages/aiohttp/web_middlewares.py", line 119, in impl
    return await handler(request)
  File "/usr/src/hassio/hassio/api/security.py", line 144, in token_validation
    return await handler(request)
  File "/usr/src/hassio/hassio/api/utils.py", line 32, in wrap_api
    answer = await method(api, *args, **kwargs)
  File "/usr/src/hassio/hassio/api/addons.py", line 158, in list
    ATTR_NAME: repository.name,
  File "/usr/src/hassio/hassio/store/repository.py", line 41, in name
    return self.data.get(ATTR_NAME, UNKNOWN)
  File "/usr/src/hassio/hassio/store/repository.py", line 36, in data
    return self.sys_store.data.repositories[self.slug]
KeyError: 'a21c4976'

Im still experiencing the same error

"Failed to fetch add-on info"

0.93.0

cknieriem commented 5 years ago

I am still having the same issue too.

jerrit commented 5 years ago

Looks to be the same:

19-05-17 00:57:24 INFO (MainThread) [hassio.core] Hass.io is up and running
19-05-17 01:07:27 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/aiohttp/web_protocol.py", line 418, in start
    resp = await task
  File "/usr/local/lib/python3.7/site-packages/aiohttp/web_app.py", line 458, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.7/site-packages/aiohttp/web_middlewares.py", line 119, in impl
    return await handler(request)
  File "/usr/src/hassio/hassio/api/security.py", line 144, in token_validation
    return await handler(request)
  File "/usr/src/hassio/hassio/api/utils.py", line 32, in wrap_api
    answer = await method(api, *args, **kwargs)
  File "/usr/src/hassio/hassio/api/addons.py", line 158, in list
    ATTR_NAME: repository.name,
  File "/usr/src/hassio/hassio/store/repository.py", line 41, in name
    return self.data.get(ATTR_NAME, UNKNOWN)
  File "/usr/src/hassio/hassio/store/repository.py", line 36, in data
    return self.sys_store.data.repositories[self.slug]
KeyError: '9e7b8c66'

0.93.0 HA on Pi 3 b+

cknieriem commented 5 years ago

I am getting the same issue:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/aiohttp/web_protocol.py", line 418, in start
    resp = await task
  File "/usr/local/lib/python3.7/site-packages/aiohttp/web_app.py", line 458, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.7/site-packages/aiohttp/web_middlewares.py", line 119, in impl
    return await handler(request)
  File "/usr/src/hassio/hassio/api/security.py", line 144, in token_validation
    return await handler(request)
  File "/usr/src/hassio/hassio/api/utils.py", line 32, in wrap_api
    answer = await method(api, *args, **kwargs)
  File "/usr/src/hassio/hassio/api/addons.py", line 158, in list
    ATTR_NAME: repository.name,
  File "/usr/src/hassio/hassio/store/repository.py", line 41, in name
    return self.data.get(ATTR_NAME, UNKNOWN)
  File "/usr/src/hassio/hassio/store/repository.py", line 36, in data
    return self.sys_store.data.repositories[self.slug]
KeyError: '7bce6681'

0.93.0 Running HA on VMWare

jerrit commented 5 years ago

I was able to fix my issue by following the directions on this post, the last replay by palito helped me the most. https://community.home-assistant.io/t/add-on-store-is-broken-failed-to-fetch-add-on-info/116372/69

rccoleman commented 5 years ago

Seems like this issue that I just filed may be related:

https://github.com/home-assistant/hassio/issues/1087

pvizeli commented 5 years ago

I can't reproduce the error. Can someone give me a step by step explain how I can reproduce it?

pvizeli commented 5 years ago

Is that only happens with removed add-on repository they have no repository.json inside?