Core: Error in logs every time I refresh HA in Chrome browser

Created on 19 Jul 2017  路  39Comments  路  Source: home-assistant/core

Make sure you are running the latest version of Home Assistant before reporting an issue.

You should only file an issue if you found a bug. Feature and enhancement requests should go in the Feature Requests section of our community forum:

Home Assistant release (hass --version): 0.49

Python release (python3 --version): 3.5.2

Component/platform: NA

Description of problem: I was seeing these in my logs for some time, but was not able to identify the source. After lot of debugging, I finally figured out that they appear every time I refresh the browser. Further, this only happens on Chrome. I tried the same on Firefox and the errors do not appear there.

2017-07-19 09:52:05 ERROR (MainThread) [aiohttp.access] Error in logging
Traceback (most recent call last):
  File "/home/homeassistant/.homeassistant/deps/aiohttp/helpers.py", line 490, in log
    for key, value in fmt_info:
  File "/home/homeassistant/.homeassistant/deps/aiohttp/helpers.py", line 473, in <genexpr>
    return ((key, method(args)) for key, method in self._methods)
  File "/home/homeassistant/.homeassistant/deps/aiohttp/helpers.py", line 426, in _format_a
    peername = args[3].get_extra_info('peername')
  File "/usr/lib/python3.5/asyncio/sslproto.py", line 306, in get_extra_info
    return self._ssl_protocol._get_extra_info(name, default)
  File "/usr/lib/python3.5/asyncio/sslproto.py", line 537, in _get_extra_info
    return self._transport.get_extra_info(name, default)
AttributeError: 'NoneType' object has no attribute 'get_extra_info'

The only place, I could fine get_extra_info is in the HTTP component, but not sure how to fix it.
Expected: These errors should not be present.

waiting-for-reply

Most helpful comment

If you don't add any new information by posting, please instead use the subscription button to get updates, and react to the first post with :+1:, to show that you're affected.

All 39 comments

I'm having this same error. Running on an Ubuntu 16.04 box.

FWIW, I am also on a Ubuntu 16.04 box and only get it on Chrome.

Im also having this , ubuntu 16.04 and chrome.

I can confirm this is occurring on Ubuntu 17.04, haven't tested with other browsers but only started occurring after setting up SSL. Hass v 0.53.0

The issue persists. I have HASS 0.55.0 with ssl without duckdns

I can confirm. Issue persists.

Confirming I am having the same issue using letsencrypt SSL on HASS 0.55.1 on Raspbian Stretch

Now at HASSio 0.55.2 running on PI-3.
I get these errors using the Chrome browser in advance security bypass mode with URL:
//IP_ADDRESS:8123
As others note, it occurs everytime I refresh or open the URL in Chrome on Windows 10.

Strangely, no errors are reported using Safari or Chrome on my iPhone to URL:
https://ME.duckdns.org:8123/states

I use the hassio plugin dnsmasq to get the above URL woking on my local network.

It would be nice to get this fixed as it clutters my log file.

Coming here to confirm that I am also experiencing this issue. Tons of log spam with this aiohttp.access error, running Hassio 0.57.2 on a RPi 3

I get something similar, running hassio 0.58.1

2017-11-25 18:14:16 ERROR (MainThread) [aiohttp.access] Error in logging
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/aiohttp/helpers.py", line 554, in __get__
    return inst._cache[self.name]
KeyError: 'remote'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/aiohttp/helpers.py", line 521, in log
    for key, value in fmt_info:
  File "/usr/lib/python3.6/site-packages/aiohttp/helpers.py", line 513, in <genexpr>
    for key, method in self._methods)
  File "/usr/lib/python3.6/site-packages/aiohttp/helpers.py", line 473, in _format_a
    ip = request.remote
  File "/usr/lib/python3.6/site-packages/aiohttp/helpers.py", line 556, in __get__
    val = self.wrapped(inst)
  File "/usr/lib/python3.6/site-packages/aiohttp/web_request.py", line 319, in remote
    peername = transport.get_extra_info('peername')
  File "/usr/lib/python3.6/asyncio/sslproto.py", line 306, in get_extra_info
    return self._ssl_protocol._get_extra_info(name, default)
  File "/usr/lib/python3.6/asyncio/sslproto.py", line 547, in _get_extra_info
    return self._transport.get_extra_info(name, default)
AttributeError: 'NoneType' object has no attribute 'get_extra_info'

I have the same issue. Running Hass in virtual environment on a RPi3 with raspian stretch
Hass version: 0.58.0. python3 version: 3.5.3
SSL-certificate from Letsencrypt.

I get this with both Chrome (62.0.3202.94) and Safari (11.0.1) on OS X.

I have the same issue.

+1 for this issue.
Running Hass 0.57.2 on a RPi3 with Hassbian. Using Chrome 62.0.3202.94.

I also have this issue. Running Hassio 0.58.1 on RPi3 using Using Chrome 62.0.3202.94.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/aiohttp/helpers.py", line 521, in log
    for key, value in fmt_info:
  File "/usr/lib/python3.6/site-packages/aiohttp/helpers.py", line 513, in <genexpr>
    for key, method in self._methods)
  File "/usr/lib/python3.6/site-packages/aiohttp/helpers.py", line 473, in _format_a
    ip = request.remote
  File "/usr/lib/python3.6/site-packages/aiohttp/helpers.py", line 556, in __get__
    val = self.wrapped(inst)
  File "/usr/lib/python3.6/site-packages/aiohttp/web_request.py", line 319, in remote
    peername = transport.get_extra_info('peername')
  File "/usr/lib/python3.6/asyncio/sslproto.py", line 306, in get_extra_info
    return self._ssl_protocol._get_extra_info(name, default)
  File "/usr/lib/python3.6/asyncio/sslproto.py", line 547, in _get_extra_info
    return self._transport.get_extra_info(name, default)
AttributeError: 'NoneType' object has no attribute 'get_extra_info'
2017-11-30 05:30:56 ERROR (MainThread) [aiohttp.access] Error in logging
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/aiohttp/helpers.py", line 554, in __get__
    return inst._cache[self.name]
KeyError: 'remote'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/aiohttp/helpers.py", line 521, in log
    for key, value in fmt_info:
  File "/usr/lib/python3.6/site-packages/aiohttp/helpers.py", line 513, in <genexpr>
    for key, method in self._methods)
  File "/usr/lib/python3.6/site-packages/aiohttp/helpers.py", line 473, in _format_a
    ip = request.remote
  File "/usr/lib/python3.6/site-packages/aiohttp/helpers.py", line 556, in __get__
    val = self.wrapped(inst)
  File "/usr/lib/python3.6/site-packages/aiohttp/web_request.py", line 319, in remote
    peername = transport.get_extra_info('peername')
  File "/usr/lib/python3.6/asyncio/sslproto.py", line 306, in get_extra_info
    return self._ssl_protocol._get_extra_info(name, default)
  File "/usr/lib/python3.6/asyncio/sslproto.py", line 547, in _get_extra_info
    return self._transport.get_extra_info(name, default)
AttributeError: 'NoneType' object has no attribute 'get_extra_info'

+1 Have this issue also. Using SSL. hass 58.1, python 3.5.3

+1 Also having this issue. Hass 0.58.1 using SSL.

While this is annoying, I got around the issue by using nginx and doing the ssl offload in that container.

If you plan to run a grafana and do context switch based on domain to avoid using different ports, you should be able to use the nginx from https://github.com/bestlibre/hassio-addons

Same by me, running on RPi3, Hassio 0.58.1, browser is chrome

Error in logging

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/aiohttp/helpers.py", line 554, in __get__
    return inst._cache[self.name]
KeyError: 'remote'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/aiohttp/helpers.py", line 521, in log
    for key, value in fmt_info:
  File "/usr/lib/python3.6/site-packages/aiohttp/helpers.py", line 513, in <genexpr>
    for key, method in self._methods)
  File "/usr/lib/python3.6/site-packages/aiohttp/helpers.py", line 473, in _format_a
    ip = request.remote
  File "/usr/lib/python3.6/site-packages/aiohttp/helpers.py", line 556, in __get__
    val = self.wrapped(inst)
  File "/usr/lib/python3.6/site-packages/aiohttp/web_request.py", line 319, in remote
    peername = transport.get_extra_info('peername')
  File "/usr/lib/python3.6/asyncio/sslproto.py", line 306, in get_extra_info
    return self._ssl_protocol._get_extra_info(name, default)
  File "/usr/lib/python3.6/asyncio/sslproto.py", line 547, in _get_extra_info
    return self._transport.get_extra_info(name, default)
AttributeError: 'NoneType' object has no attribute 'get_extra_info'

Same. Python 3.5.3, Home Assistant 0.59.0, running on Raspberry Pi.

2017-12-04 00:34:11 ERROR (MainThread) [aiohttp.access] Error in logging
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/aiohttp/helpers.py", line 554, in __get__
    return inst._cache[self.name]
KeyError: 'remote'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/aiohttp/helpers.py", line 521, in log
    for key, value in fmt_info:
  File "/srv/homeassistant/lib/python3.5/site-packages/aiohttp/helpers.py", line 513, in <genexpr>
    for key, method in self._methods)
  File "/srv/homeassistant/lib/python3.5/site-packages/aiohttp/helpers.py", line 473, in _format_a
    ip = request.remote
  File "/srv/homeassistant/lib/python3.5/site-packages/aiohttp/helpers.py", line 556, in __get__
    val = self.wrapped(inst)
  File "/srv/homeassistant/lib/python3.5/site-packages/aiohttp/web_request.py", line 319, in remote
    peername = transport.get_extra_info('peername')
  File "/usr/lib/python3.5/asyncio/sslproto.py", line 306, in get_extra_info
    return self._ssl_protocol._get_extra_info(name, default)
  File "/usr/lib/python3.5/asyncio/sslproto.py", line 546, in _get_extra_info
    return self._transport.get_extra_info(name, default)
AttributeError: 'NoneType' object has no attribute 'get_extra_info'
2017-12-04 00:34:14 ERROR (MainThread) [aiohttp.access] Error in logging
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/aiohttp/helpers.py", line 554, in __get__
    return inst._cache[self.name]
KeyError: 'remote'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/aiohttp/helpers.py", line 521, in log
    for key, value in fmt_info:
  File "/srv/homeassistant/lib/python3.5/site-packages/aiohttp/helpers.py", line 513, in <genexpr>
    for key, method in self._methods)
  File "/srv/homeassistant/lib/python3.5/site-packages/aiohttp/helpers.py", line 473, in _format_a
    ip = request.remote
  File "/srv/homeassistant/lib/python3.5/site-packages/aiohttp/helpers.py", line 556, in __get__
    val = self.wrapped(inst)
  File "/srv/homeassistant/lib/python3.5/site-packages/aiohttp/web_request.py", line 319, in remote
    peername = transport.get_extra_info('peername')
  File "/usr/lib/python3.5/asyncio/sslproto.py", line 306, in get_extra_info
    return self._ssl_protocol._get_extra_info(name, default)
  File "/usr/lib/python3.5/asyncio/sslproto.py", line 546, in _get_extra_info
    return self._transport.get_extra_info(name, default)
AttributeError: 'NoneType' object has no attribute 'get_extra_info'

Same here. SSL using hass.io v 0.58.1. Anyone find a fix?

ERROR (MainThread) [aiohttp.access] Error in logging
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/aiohttp/helpers.py", line 554, in __get__
    return inst._cache[self.name]
KeyError: 'remote'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/aiohttp/helpers.py", line 521, in log
    for key, value in fmt_info:
  File "/usr/lib/python3.6/site-packages/aiohttp/helpers.py", line 513, in <genexpr>
    for key, method in self._methods)
  File "/usr/lib/python3.6/site-packages/aiohttp/helpers.py", line 473, in _format_a
    ip = request.remote
  File "/usr/lib/python3.6/site-packages/aiohttp/helpers.py", line 556, in __get__
    val = self.wrapped(inst)
  File "/usr/lib/python3.6/site-packages/aiohttp/web_request.py", line 319, in remote
    peername = transport.get_extra_info('peername')
  File "/usr/lib/python3.6/asyncio/sslproto.py", line 306, in get_extra_info
    return self._ssl_protocol._get_extra_info(name, default)
  File "/usr/lib/python3.6/asyncio/sslproto.py", line 547, in _get_extra_info
    return self._transport.get_extra_info(name, default)
AttributeError: 'NoneType' object has no attribute 'get_extra_info'

yup, same for me. Just posting so I can get notified of updates to this thread and add to the numbers to prioritise resolution.

2017-12-01 17:57:33 ERROR (MainThread) [aiohttp.access] Error in logging
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/aiohttp/helpers.py", line 554, in __get__
    return inst._cache[self.name]
KeyError: 'remote'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/aiohttp/helpers.py", line 521, in log
    for key, value in fmt_info:
  File "/usr/local/lib/python3.5/dist-packages/aiohttp/helpers.py", line 513, in <genexpr>
    for key, method in self._methods)
  File "/usr/local/lib/python3.5/dist-packages/aiohttp/helpers.py", line 473, in _format_a
    ip = request.remote
  File "/usr/local/lib/python3.5/dist-packages/aiohttp/helpers.py", line 556, in __get__
    val = self.wrapped(inst)
  File "/usr/local/lib/python3.5/dist-packages/aiohttp/web_request.py", line 319, in remote
    peername = transport.get_extra_info('peername')
  File "/usr/lib/python3.5/asyncio/sslproto.py", line 306, in get_extra_info
    return self._ssl_protocol._get_extra_info(name, default)
  File "/usr/lib/python3.5/asyncio/sslproto.py", line 537, in _get_extra_info
    return self._transport.get_extra_info(name, default)
AttributeError: 'NoneType' object has no attribute 'get_extra_info'
2017-12-01 22:43:07 ERROR (MainThread) [aiohttp.access] Error in logging
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/aiohttp/helpers.py", line 554, in __get__
    return inst._cache[self.name]
KeyError: 'remote'

If you don't add any new information by posting, please instead use the subscription button to get updates, and react to the first post with :+1:, to show that you're affected.

Same here

Issue still exists in 0.59.2...

Same here, hassio 0.59.2

Fixed in hassio 0.60.0
Using

frontend: 
  javascript_version: es5

The javascript_version may not be relevant but is the only other change I made since 0.59.2

Hi @gb53smith

Still getting the issue on 0.60.0 with the javascript_version: es5 flag set. Traceback below. Any thoughts?

Error in logging
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/aiohttp/helpers.py", line 554, in __get__
    return inst._cache[self.name]
KeyError: 'remote'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/aiohttp/helpers.py", line 521, in log
    for key, value in fmt_info:
  File "/srv/homeassistant/lib/python3.5/site-packages/aiohttp/helpers.py", line 513, in <genexpr>
    for key, method in self._methods)
  File "/srv/homeassistant/lib/python3.5/site-packages/aiohttp/helpers.py", line 473, in _format_a
    ip = request.remote
  File "/srv/homeassistant/lib/python3.5/site-packages/aiohttp/helpers.py", line 556, in __get__
    val = self.wrapped(inst)
  File "/srv/homeassistant/lib/python3.5/site-packages/aiohttp/web_request.py", line 319, in remote
    peername = transport.get_extra_info('peername')
  File "/usr/lib/python3.5/asyncio/sslproto.py", line 306, in get_extra_info
    return self._ssl_protocol._get_extra_info(name, default)
  File "/usr/lib/python3.5/asyncio/sslproto.py", line 546, in _get_extra_info
    return self._transport.get_extra_info(name, default)
AttributeError: 'NoneType' object has no attribute 'get_extra_info'

same issue here since I use the lets encrypt ceritficate

I believe this is a python version issue. Using hass.io 0.60.0, I see python 3.6. No errors.
Unfortunately, if you started from a older hassbian image, the upgrade of python is not easy. Posts tell you to start again from the latest hassbian image.
In part, this is why I went to hass.io as upgrades are much easier.

I don't think that the version of Python has anything to do with the issue. I'm running hassio and have experienced the same errors. They do seem to have gone since the last update though.

To add a bit more detail that I have not see so far here:

I still have this on 0.61.1 and Python 3.5 built from Hassbian 2017-10-11 image

When using Chrome, a new error (as pasted above) is added to the log each time the Chrome browser is closed. All appears to work ok with the GUI and not errors are added to the log during using the GUI in the browser, it is only when the browser is closed.

Testing with Microsoft Edge and there are no errors added to the log. Whatever Edge does differently (other than perform really slowly with HA) it does not produce this error.

I also get this error added to the log when using the IOS app and Safari on the iPhone

Problem still present in 0.62 with Safari & IOS App :-/
raspbian stretch, python 3.5.3 in venv

Reporting that the problem persists:
Hassbian 0.60.0
Python 3.5.3

Error doing job: Fatal read error on socket transport
Traceback (most recent call last):
  File "/usr/lib/python3.5/asyncio/selector_events.py", line 723, in _read_ready
    data = self._sock.recv(self.max_size)
TimeoutError: [Errno 110] Connection timed out

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/aiohttp/helpers.py", line 554, in __get__
    return inst._cache[self.name]
KeyError: 'remote'

Sun Feb 04 2018 20:05:02 GMT-0300 (-03)

Has anybody found a fix yet?

Thanks in advance!

Reporting that the problem persists:
Hassbian 0.64.3
Python 3.5.3

I followed the steps from milanvo posted Jan28th in the following issue and it fixed it for me:
https://github.com/home-assistant/home-assistant/issues/9762#issuecomment-361057010

I followed the steps from milanvo posted Jan28th in the following issue and it fixed it for me:

9762 (comment)

I had this fixed by following the steps of the linked comment. So this is a Python issue indeed...

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment :+1:

Still an issue

asyncio issue (sslproto.py) has been fixed in Python 3.5.4, 3.6.2, 3.7.0. Any version below those will have this issue.

The workaround is applying following patch (v3.5.3):

diff --git a/Lib/asyncio/sslproto.py b/Lib/asyncio/sslproto.py
index 7ad28d6aa008..ab7ff0bf93d0 100644
--- a/Lib/asyncio/sslproto.py
+++ b/Lib/asyncio/sslproto.py
@@ -543,8 +543,10 @@ def eof_received(self):
     def _get_extra_info(self, name, default=None):
         if name in self._extra:
             return self._extra[name]
-        else:
+        elif self._transport is not None:
             return self._transport.get_extra_info(name, default)
+        else:
+            return default

     def _start_shutdown(self):
         if self._in_shutdown:

Home-assistant would not fix it. I am going to close this issue.

Was this page helpful?
0 / 5 - 0 ratings