Home Assistant release with the issue: 0.83
Last working Home Assistant release (if known): 0.83.0b0
Operating environment (Hass.io/Docker/Windows/etc.): Ubuntu venv
Component/platform: May be Owntracks (that was the only change I made from 0.83.0b0 to 0.83
Description of problem:
With 0.83, my logs are flooded with continuous stream of the following errors:
Log Details (ERROR)
Thu Nov 29 2018 09:06:43 GMT-0500 (Eastern Standard Time)
Error handling request
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.6/site-packages/aiohttp/web_protocol.py", line 390, in start
resp = await self._request_handler(request)
File "/srv/homeassistant/lib/python3.6/site-packages/aiohttp/web_app.py", line 366, in _handle
resp = await handler(request)
File "/srv/homeassistant/lib/python3.6/site-packages/aiohttp/web_middlewares.py", line 106, in impl
return await handler(request)
File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/http/static.py", line 66, in staticresource_middleware
return await handler(request)
File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/http/real_ip.py", line 34, in real_ip_middleware
return await handler(request)
File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/http/ban.py", line 66, in ban_middleware
return await handler(request)
File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/http/auth.py", line 97, in auth_middleware
return await handler(request)
File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/http/real_ip.py", line 34, in real_ip_middleware
return await handler(request)
File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/http/ban.py", line 66, in ban_middleware
return await handler(request)
File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/http/auth.py", line 97, in auth_middleware
return await handler(request)
File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/http/view.py", line 112, in handle
result = handler(request, **request.match_info)
File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/api.py", line 191, in get
user = request['hass_user']
File "/srv/homeassistant/lib/python3.6/site-packages/aiohttp/web_request.py", line 201, in __getitem__
return self._state[key]
KeyError: 'hass_user'
Same problem, an hour ago my docker container updated, now I am flooded with this message.
Noticed that Node-red has no connection anymore to the home-assistant instance.
@maui1911 Are you using Owntracks?
@arsaboo no i'm using node-red, but I think any service using legacy authentication api fails
I think this commit broke it: https://github.com/home-assistant/home-assistant/commit/8b8629a5f416e6f04bd246f71f13250a75451033
This has to do with legacy auth and is already fixed in dev. I forgot to cherry pick the fix for 0.83: https://github.com/home-assistant/home-assistant/pull/18733
Tagged it for 0.83.1
When is 0.83.1 out?
I'm still seeing this error/traceback on my dev system (dev branch pulled about 4 hours ago)
Thu Nov 29 2018 13:37:08 GMT-0500 (Eastern Standard Time)
Error handling request
Traceback (most recent call last):
File "/srv/dev/home-assistant/lib/python3.6/site-packages/aiohttp/web_protocol.py", line 390, in start
resp = await self._request_handler(request)
File "/srv/dev/home-assistant/lib/python3.6/site-packages/aiohttp/web_app.py", line 366, in _handle
resp = await handler(request)
File "/srv/dev/home-assistant/lib/python3.6/site-packages/aiohttp/web_middlewares.py", line 106, in impl
return await handler(request)
File "/srv/dev/home-assistant/homeassistant/components/http/static.py", line 66, in staticresource_middleware
return await handler(request)
File "/srv/dev/home-assistant/homeassistant/components/http/real_ip.py", line 34, in real_ip_middleware
return await handler(request)
File "/srv/dev/home-assistant/homeassistant/components/http/ban.py", line 67, in ban_middleware
return await handler(request)
File "/srv/dev/home-assistant/homeassistant/components/http/auth.py", line 102, in auth_middleware
return await handler(request)
File "/srv/dev/home-assistant/homeassistant/components/http/view.py", line 116, in handle
result = await result
File "/srv/dev/home-assistant/homeassistant/components/api.py", line 220, in post
if not request['hass_user'].is_admin:
File "/srv/dev/home-assistant/lib/python3.6/site-packages/aiohttp/web_request.py", line 201, in __getitem__
return self._state[key]
KeyError: 'hass_user'
I am running Home Assistant in Docker. So I have tried the Dev also and still having no legacy API connectivity from Node-Red. I am hoping 83.1 is released today with fix as Node-Red is vital component to my configuration. Thanks for all the hard work!
I downgraded to 0.82.1 and now I get the same errors and I cannot access my frontend any more before when I was on 0.82.1 everything was fine.
In addition I get these errors too:
2018-11-29 18:21:12 WARNING (MainThread) [homeassistant.components.cover.mqtt] Payload is not True or False: 14
2018-11-29 18:21:12 WARNING (MainThread) [homeassistant.components.cover.mqtt] Payload is not True or False: 63
2018-11-29 18:21:30 WARNING (MainThread) [homeassistant.components.cover.mqtt] Payload is not True or False: 14
2018-11-29 18:21:31 WARNING (MainThread) [homeassistant.components.cover.mqtt] Payload is not True or False: 63
2018-11-29 18:22:03 WARNING (MainThread) [homeassistant.components.cover.mqtt] Payload is not True or False: 14
2018-11-29 18:22:03 WARNING (MainThread) [homeassistant.components.cover.mqtt] Payload is not True or False: 63
2018-11-29 18:22:36 WARNING (MainThread) [homeassistant.components.cover.mqtt] Payload is not True or False: 14
2018-11-29 18:22:36 WARNING (MainThread) [homeassistant.components.cover.mqtt] Payload is not True or False: 63
My Log is going mad over 150,000 lines, I worry my rpi will crash
I downgraded to 0.82.1 and now I get the same errors and I cannot access my frontend any more before when I was on 0.82.1 everything was fine.
In addition I get these errors too:
2018-11-29 18:21:12 WARNING (MainThread) [homeassistant.components.cover.mqtt] Payload is not True or False: 14 2018-11-29 18:21:12 WARNING (MainThread) [homeassistant.components.cover.mqtt] Payload is not True or False: 63 2018-11-29 18:21:30 WARNING (MainThread) [homeassistant.components.cover.mqtt] Payload is not True or False: 14 2018-11-29 18:21:31 WARNING (MainThread) [homeassistant.components.cover.mqtt] Payload is not True or False: 63 2018-11-29 18:22:03 WARNING (MainThread) [homeassistant.components.cover.mqtt] Payload is not True or False: 14 2018-11-29 18:22:03 WARNING (MainThread) [homeassistant.components.cover.mqtt] Payload is not True or False: 63 2018-11-29 18:22:36 WARNING (MainThread) [homeassistant.components.cover.mqtt] Payload is not True or False: 14 2018-11-29 18:22:36 WARNING (MainThread) [homeassistant.components.cover.mqtt] Payload is not True or False: 63
I tried downgrading also and got the same experience!
0.83.1 now gives login failed errors even though I am logged in. Every 5 seconds I get this.
Maybe it has something to do with IP bans? I tried disabling the IP ban option in the http component but that still doesn't fix it. I don't have an ip_bans.yaml in my HA directory either.
Still have this error in 0.83.1.
2018-11-30 08:26:30 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/aiohttp/web_protocol.py", line 390, in start
resp = await self._request_handler(request)
File "/usr/local/lib/python3.6/site-packages/aiohttp/web_app.py", line 366, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.6/site-packages/aiohttp/web_middlewares.py", line 106, in impl
return await handler(request)
File "/usr/src/app/homeassistant/components/http/static.py", line 66, in staticresource_middleware
return await handler(request)
File "/usr/src/app/homeassistant/components/http/real_ip.py", line 34, in real_ip_middleware
return await handler(request)
File "/usr/src/app/homeassistant/components/http/ban.py", line 67, in ban_middleware
return await handler(request)
File "/usr/src/app/homeassistant/components/http/auth.py", line 102, in auth_middleware
return await handler(request)
File "/usr/src/app/homeassistant/components/http/view.py", line 112, in handle
result = handler(request, **request.match_info)
File "/usr/src/app/homeassistant/components/api.py", line 191, in get
user = request['hass_user']
File "/usr/local/lib/python3.6/site-packages/aiohttp/web_request.py", line 201, in __getitem__
return self._state[key]
KeyError: 'hass_user'
This issue has been resolved. If you are still experiencing an issue that might look similar, open a new issue and make sure to include how the connection is made to Home Assistant including what type of auth is being used.
Most helpful comment
This has to do with legacy auth and is already fixed in dev. I forgot to cherry pick the fix for 0.83: https://github.com/home-assistant/home-assistant/pull/18733
Tagged it for 0.83.1