Hassio - 500 error on upgrade to 0.65.x

I wasn’t able to find this problem posted recently (or in the past with the same stack trace). This is occurring for me when going from hassio version 0.64.3 to any 0.65.x version. I get a 500 Internal Server Error, and the following is logged out:

2018-03-13 19:25:10 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/aiohttp/web_protocol.py", line 381, in start
    resp = await self._request_handler(request)
  File "/usr/lib/python3.6/site-packages/aiohttp/web_app.py", line 310, in _handle
    resp = await handler(request)
  File "/usr/lib/python3.6/site-packages/aiohttp/web_middlewares.py", line 88, in impl
    return await handler(request)
  File "/usr/lib/python3.6/site-packages/homeassistant/components/http/static.py", line 68, in staticresource_middleware
    return await handler(request)
  File "/usr/lib/python3.6/site-packages/homeassistant/components/http/real_ip.py", line 27, in real_ip_middleware
    return await handler(request)
  File "/usr/lib/python3.6/site-packages/homeassistant/components/http/ban.py", line 68, in ban_middleware
    return await handler(request)
  File "/usr/lib/python3.6/site-packages/homeassistant/components/http/auth.py", line 28, in auth_middleware
    return await handler(request)
  File "/usr/lib/python3.6/site-packages/homeassistant/components/http/view.py", line 100, in handle
    result = await result
  File "/usr/lib/python3.6/site-packages/homeassistant/components/frontend/__init__.py", line 481, in get
    _is_latest(self.js_option, request)
  File "/usr/lib/python3.6/site-packages/homeassistant/components/frontend/__init__.py", line 599, in _is_latest
    return useragent and hass_frontend.version(useragent)
AttributeError: module 'hass_frontend' has no attribute 'version'

Seems like this is some sort of dependency issue, but I don’t know enough about python/home assistant architecture to understand what’s happening. I thought to some extent that if I was seeing this problem with the hassio docker image, everyone would, but that doesn’t seem to be the case (maybe something config related then?)

EDIT: Went into the running homeassistant container and checked out “/config/deps/lib/python3.6/site-packages/hass_frontend”, which doesn’t have the version method. Couldn’t say why.

I ended up getting rid of the deps folder that was in the volume mounted /config directory, and now everything seems to work.

1 Like

Hello

I got the same error for chrome browser in PC, but firefox browser can run hass. I cannot run it on my android phone, but another android phone can run it on chrome browser. I am very confused what happened.

Can you clarify how to fix it in version hass 0.65.xx? What exactly do for config/deps?

I had the issue no matter where I was loading the page (iOS app, firefox, chrome, etc) - I think it was a problem on the server when trying to initialize the frontend, not a problem with a particular browser. I had just noticed in the root config directory for my hass instance, there was a deps folder with an older version of hass_frontend code in it. I’m not too familiar with what that folder is for, but I imagine it’s for dynamically installed dependencies.

I just deleted it and the error no longer occurred, since the correct version of hass_frontend started being loaded.

Thank you. I just removed the folder config/deps as your recommendation. The error 500 disappears on PC and android phone.

I also have the same issue since latest version 67.0. It seems deleting the deps folder won’t fix the issue.