Home Assistant Companion: Response status code was unacceptable: 500 (and more)

Hi,

I have setup remote access via duckdns. I have opened the relevant port and I can access Home Assistant from both my iPad and my iPhone both when I am home and remotely. But I have some problems.

  1. On my iPad I get the following error message when I try to save the url and password:

Connection Error

There was an error connecting to Home Assistant. Please confirm the settings are correct and save to attempt to reconnect. The error was:

Response status code was unacceptable: 500

In the log I get the following:

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/local/lib/python3.6/site-packages/homeassistant/components/http/static.py”, line 66, in staticresource_middleware
return await handler(request)
File “/usr/local/lib/python3.6/site-packages/homeassistant/components/http/real_ip.py”, line 34, in real_ip_middleware
return await handler(request)
File “/usr/local/lib/python3.6/site-packages/homeassistant/components/http/ban.py”, line 66, in ban_middleware
return await handler(request)
File “/usr/local/lib/python3.6/site-packages/homeassistant/components/http/auth.py”, line 49, in auth_middleware
request.headers[HTTP_HEADER_HA_AUTH].encode(‘utf-8’))):
UnicodeEncodeError: ‘utf-8’ codec can’t encode character ‘\udce4’ in position 2: surrogates not allowed

The consequence is that the login connection is not saved and I repeatedly have to enter it again. I get the same error on my iPhone but the login connection is saved (previously).

The error is produced both when home and when accessing remotely.

  1. I get access to all areas of Home Assistant except
  • the configurator
  • node-red

I do not know why. No error is produced. The pages just turn up empty without any message.

  1. I repeatedly get SSL handshake error without any obvious negative consequence. However, it is very irritating that they appear.

There are two errors messages:

Error doing job: SSL handshake failed
Traceback (most recent call last):
File “uvloop/handles/stream.pyx”, line 609, in uvloop.loop.UVStream._on_eof
File “uvloop/sslproto.pyx”, line 171, in uvloop.loop._SSLPipe.feed_ssldata
File “/usr/local/lib/python3.6/ssl.py”, line 689, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: HTTP_REQUEST] http request (_ssl.c:841)

Error doing job: SSL error errno:1 reason: HTTP_REQUEST
Traceback (most recent call last):
File “uvloop/sslproto.pyx”, line 504, in uvloop.loop.SSLProtocol.data_received
File “uvloop/sslproto.pyx”, line 204, in uvloop.loop._SSLPipe.feed_ssldata
File “uvloop/sslproto.pyx”, line 171, in uvloop.loop._SSLPipe.feed_ssldata
File “/usr/local/lib/python3.6/ssl.py”, line 689, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: HTTP_REQUEST] http request (_ssl.c:841)

Maybe the 3 different issues are connected???

Any help with these problems is much appreciated.