Home Assistant Cloud (Unknown Error)

Just passing along a little learned experience. If you get an “Unknown Error” upon attempting to link your HA install with the HA Cloud, you need to install cryptography.

For venv installs, switch to your venv, and executing “pip3 install cryptography”

I am getting “Unknown Error,” but I have installed the cryptography package. Looking in the log, I am getting the message “cannot login if already logged in.” This was after a reset to cause a configuration change to take effect. How can I force log out on the cloud side to clear this error after a reboot?

Cloud no longer works for me. I get Unknown Error. running latest version of HASSIO so I’m not sure installing cryptography will help. I’ve reset password and disabled skill in Alexa but no luck.

Same here… Any?

I’m getting this error, and the log does say the problem is cryptography

File “/home/homeassistant/.pyenv/versions/3.6.3/envs/homeassistant-3.6.3/lib/python3.6/site-packages/jose/backends/cryptography_backend.py”, line 10, in
from cryptography.exceptions import InvalidSignature
ModuleNotFoundError: No module named ‘cryptography’

I have done this install, and still have this issue.

 $ find /usr/local/lib/python3.5/dist-packages -name \*cryptography\*
/usr/local/lib/python3.5/dist-packages/cryptography
/usr/local/lib/python3.5/dist-packages/cryptography-2.2.2.dist-info

The interesting thing, I had the cloud/alexa working, until change my to filter alexa, and add broadlink switch/platform. I gave the broadlink the wrong ip address, the restart of ha seem to hang, so I reverted my configuration and and rebooted. Since then, I’ve had the cloud issues.

Any suggests before I rebuild this pi from scratch. (I’m using Dietpi)

I’m on 0.72.1 with Pi 3 B+
Trying to Register.
Still getting “Unknown Error” since when i started in this world.

Already added:

sudo vi /etc/dhcpcd.conf

static domain_name_servers=1.0.0.1 1.1.1.1

So I have a valid DNS set on Raspbian

File “/usr/lib/python3.5/asyncio/futures.py”, line 293, in result
raise self._exception
File “/usr/lib/python3.5/concurrent/futures/thread.py”, line 55, in run
result = self.fn(*self.args, **self.kwargs)
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/cloud/auth_api.py”, line 50, in register
from botocore.exceptions import ClientError
File “/srv/homeassistant/lib/python3.5/site-packages/botocore/exceptions.py”, line 15, in
from botocore.vendored.requests.exceptions import ConnectionError
ImportError: cannot import name ‘ConnectionError’

I have successfully registered and am able to login at the “Nabu Casa” site.
But when trying to login from the frontend, getting the dreaded “Unknown error”

2018-09-26 08:42:33 ERROR (MainThread) [aiohttp.server] 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 67, in ban_middleware
    return await handler(request)
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/http/auth.py", line 68, 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 67, in ban_middleware
    return await handler(request)
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/http/auth.py", line 68, in auth_middleware
    return await handler(request)
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/http/view.py", line 113, in handle
    result = await result
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/cloud/http_api.py", line 45, in error_handler
    result = await handler(view, request, *args, **kwargs)
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/http/data_validator.py", line 47, in wrapper
    result = await method(view, request, *args, **kwargs)
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/cloud/http_api.py", line 102, in post
    data['password'])
  File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/cloud/auth_api.py", line 91, in login
    cognito = _authenticate(cloud, email, password)
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/cloud/auth_api.py", line 123, in _authenticate
    cognito = _cognito(cloud, username=email)
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/cloud/auth_api.py", line 146, in _cognito
    **kwargs
  File "/srv/homeassistant/lib/python3.6/site-packages/warrant/__init__.py", line 172, in __init__
    self.client = boto3.client('cognito-idp', **boto3_client_kwargs)
  File "/srv/homeassistant/lib/python3.6/site-packages/boto3/__init__.py", line 83, in client
    return _get_default_session().client(*args, **kwargs)
  File "/srv/homeassistant/lib/python3.6/site-packages/boto3/session.py", line 263, in client
    aws_session_token=aws_session_token, config=config)
  File "/srv/homeassistant/lib/python3.6/site-packages/botocore/session.py", line 851, in create_client
    endpoint_resolver = self.get_component('endpoint_resolver')
  File "/srv/homeassistant/lib/python3.6/site-packages/botocore/session.py", line 726, in get_component
    return self._components.get_component(name)
  File "/srv/homeassistant/lib/python3.6/site-packages/botocore/session.py", line 922, in get_component
    self._components[name] = factory()
  File "/srv/homeassistant/lib/python3.6/site-packages/botocore/session.py", line 189, in create_default_resolver
    endpoints = loader.load_data('endpoints')
  File "/srv/homeassistant/lib/python3.6/site-packages/botocore/loaders.py", line 132, in _wrapper
    data = func(self, *args, **kwargs)
  File "/srv/homeassistant/lib/python3.6/site-packages/botocore/loaders.py", line 424, in load_data
    raise DataNotFoundError(data_path=name)
botocore.exceptions.DataNotFoundError: Unable to load data for: endpoints```