core: /store return code 500 after update to 22.7.3 from 22.6.7

The problem

Error reported:

/store return code 500

Logger: homeassistant.components.hassio.handler
Source: components/hassio/handler.py:254
Integration: Home Assistant Supervisor (documentation, issues)
First occurred: July 11, 2022 at 9:53:13 PM (1 occurrences)
Last logged: July 11, 2022 at 9:53:13 PM

/store return code 500

THEN next log enbtry is:

Logger: homeassistant.components.hassio
Source: components/hassio/websocket_api.py:122
Integration: Home Assistant Supervisor (documentation, issues)
First occurred: July 11, 2022 at 9:53:13 PM (1 occurrences)
Last logged: July 11, 2022 at 9:53:13 PM

Failed to to call /store -

What version of Home Assistant Core has the issue?

core-2022.7.3

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

No response

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Error reported:

/store return code 500

Logger: homeassistant.components.hassio.handler
Source: components/hassio/handler.py:254
Integration: Home Assistant Supervisor (documentation, issues)
First occurred: July 11, 2022 at 9:53:13 PM (1 occurrences)
Last logged: July 11, 2022 at 9:53:13 PM

/store return code 500

THEN next log enbtry is:

Logger: homeassistant.components.hassio
Source: components/hassio/websocket_api.py:122
Integration: Home Assistant Supervisor (documentation, issues)
First occurred: July 11, 2022 at 9:53:13 PM (1 occurrences)
Last logged: July 11, 2022 at 9:53:13 PM

Failed to to call /store -

Additional information

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 8
  • Comments: 68 (5 by maintainers)

Most upvoted comments

Sitting in the same boat since update to 2023.2.5 on a HA blue!

Logger: homeassistant.components.hassio.handler
Source: components/hassio/handler.py:48
Integration: Home Assistant Supervisor (documentation, issues)
First occurred: 09:11:28 (2 occurrences)
Last logged: 15:11:32

/store return code 500

The error happens sporadic

I am joining the 500 club. It happens only sporadic, once per two-three weeks. In my case it started after migrating from Raspberry Pi4 B to an Intel NUC (11 atkc2).

I also see a /store 500 error when I start core:

Logger: homeassistant.components.hassio.handler
Source: components/hassio/handler.py:262
Integration: Home Assistant Supervisor (documentation, issues)
First occurred: 12:32:07 (1 occurrences)
Last logged: 12:32:07

/store return code 500

Followed by this error:

Logger: homeassistant.components.hassio
Source: components/hassio/websocket_api.py:124
Integration: Home Assistant Supervisor (documentation, issues)
First occurred: 12:32:07 (1 occurrences)
Last logged: 12:32:07

Failed to to call /store -

The only error in the supervisor log is this:

22-11-12 12:32:07 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 433, in _handle_request
    resp = await request_handler(request)
  File "/usr/local/lib/python3.10/site-packages/sentry_sdk/integrations/aiohttp.py", line 126, in sentry_app_handle
    reraise(*_capture_exception(hub))
  File "/usr/local/lib/python3.10/site-packages/sentry_sdk/_compat.py", line 56, in reraise
    raise value
  File "/usr/local/lib/python3.10/site-packages/sentry_sdk/integrations/aiohttp.py", line 116, in sentry_app_handle
    response = await old_handle(self, request)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_middlewares.py", line 117, in impl
    return await handler(request)
  File "/usr/src/supervisor/supervisor/api/middleware/security.py", line 138, in system_validation
    return await handler(request)
  File "/usr/src/supervisor/supervisor/api/middleware/security.py", line 204, in token_validation
    return await handler(request)
  File "/usr/src/supervisor/supervisor/api/utils.py", line 60, in wrap_api
    answer = await method(api, *args, **kwargs)
  File "/usr/src/supervisor/supervisor/api/store.py", line 177, in store_info
    ATTR_ADDONS: [
  File "/usr/src/supervisor/supervisor/api/store.py", line 178, in <listcomp>
    self._generate_addon_information(self.sys_addons.store[addon])
  File "/usr/src/supervisor/supervisor/api/store.py", line 113, in _generate_addon_information
    ATTR_ADVANCED: addon.advanced,
  File "/usr/src/supervisor/supervisor/addons/model.py", line 220, in advanced
    return self.data[ATTR_ADVANCED]
  File "/usr/src/supervisor/supervisor/store/addon.py", line 19, in data
    return self.sys_store.data.addons[self.slug]
KeyError: 'a0d7b954_zwavejs2mqtt'

I see this error in the supervisor logs:

22-10-04 19:44:20 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
    resp = await request_handler(request)
  File "/usr/local/lib/python3.10/site-packages/sentry_sdk/integrations/aiohttp.py", line 122, in sentry_app_handle
    reraise(*_capture_exception(hub))
  File "/usr/local/lib/python3.10/site-packages/sentry_sdk/_compat.py", line 54, in reraise
    raise value
  File "/usr/local/lib/python3.10/site-packages/sentry_sdk/integrations/aiohttp.py", line 112, in sentry_app_handle
    response = await old_handle(self, request)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_middlewares.py", line 117, in impl
    return await handler(request)
  File "/usr/src/supervisor/supervisor/api/middleware/security.py", line 138, in system_validation
    return await handler(request)
  File "/usr/src/supervisor/supervisor/api/middleware/security.py", line 204, in token_validation
    return await handler(request)
  File "/usr/src/supervisor/supervisor/api/utils.py", line 60, in wrap_api
    answer = await method(api, *args, **kwargs)
  File "/usr/src/supervisor/supervisor/api/store.py", line 177, in store_info
    ATTR_ADDONS: [
  File "/usr/src/supervisor/supervisor/api/store.py", line 178, in <listcomp>
    self._generate_addon_information(self.sys_addons.store[addon])
  File "/usr/src/supervisor/supervisor/api/store.py", line 113, in _generate_addon_information
    ATTR_ADVANCED: addon.advanced,
  File "/usr/src/supervisor/supervisor/addons/model.py", line 220, in advanced
    return self.data[ATTR_ADVANCED]
  File "/usr/src/supervisor/supervisor/store/addon.py", line 19, in data
    return self.sys_store.data.addons[self.slug]
KeyError: '75f2ff60_opentts-ja'

Right after

22-10-04 19:44:18 INFO (MainThread) [supervisor.updater] Fetching update data from https://version.home-assistant.io/stable.json

@jocamane see here:

For anyone still seeing this, next time you see it can you share your supervisor logs around that time? That Supervisor API shouldn’t be returning a 500 so I’d like to track down why. See if its actually a core bug or a supervisor bug.

And just to be clear, so far I have only seen core logs shared. None of the ones shared are supervisor logs. To get to supervisor logs you go to Settings -> System -> Logs and then change to supervisor at the top. There will definitely be an error in there if the API is returning a 500 status code

Home Assistant 2022.9.7 Supervisor 2022.09.1 Operating System 9.0 Frontend 20220907.2 - latest

Logger: homeassistant.components.hassio Source: components/hassio/websocket_api.py:123 Integration: Home Assistant Supervisor (documentation, issues) First occurred: 1:52:38 AM (1 occurrences) Last logged: 1:52:38 AM

Failed to to call /store -

If there’s other logs that would be more helpful, please let me know.

As per new instructions, here are my supervisor logs: 22-10-04 08:10:57 INFO (MainThread) [supervisor.host.manager] Host information reload completed 22-10-04 08:13:54 INFO (SyncWorker_0) [supervisor.docker.interface] Restarting ghcr.io/home-assistant/qemux86-64-homeassistant 22-10-04 08:14:10 INFO (MainThread) [supervisor.homeassistant.core] Wait until Home Assistant is ready 22-10-04 08:14:20 INFO (MainThread) [supervisor.resolution.evaluate] Starting system evaluation with state CoreState.RUNNING 22-10-04 08:14:20 INFO (MainThread) [supervisor.resolution.evaluate] System evaluation complete