HELP! components/cloud/auth_api.py (ERROR)

Hello,
I am receiving a strange error when I am attempting to login into my “Home Assistant Cloud” for use with Alexa. I have reset my password multiple times in an attempt to resolve this. Came someone please help? I am running Hassbian 0.61.1.

Tue Jan 23 2018 01:00:11 GMT-0600 (Central Standard Time)

Error handling request
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/aiohttp/web_protocol.py", line 410, in start
resp = yield from self._request_handler(request)
  File "/srv/homeassistant/lib/python3.5/site-packages/aiohttp/web.py", line 325, in _handle
resp = yield from handler(request)
  File "/srv/homeassistant/lib/python3.5/site-packages/aiohttp/web_middlewares.py", line 93, in impl
return (yield from handler(request))
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/http/ban.py", line 58, in ban_middleware
return (yield from handler(request))
  File "/usr/lib/python3.5/asyncio/coroutines.py", line 213, in coro
res = yield from res
  File "/usr/lib/python3.5/asyncio/coroutines.py", line 213, in coro
res = yield from res
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/http/__init__.py", line 430, in handle
result = yield from result
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/cloud/http_api.py", line 49, in error_handler
result = yield from handler(view, request, *args, **kwargs)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/http/__init__.py", line 486, in wrapper
result = yield from method(view, request, *args, **kwargs)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/cloud/http_api.py", line 82, in post
data['password'])
  File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__
yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
future.result()
  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 126, in login
cognito = _authenticate(cloud, email, password)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/cloud/auth_api.py", line 161, in _authenticate
cognito.authenticate(password=password)
  File "/srv/homeassistant/lib/python3.5/site-packages/warrant/__init__.py", line 383, in authenticate
self.verify_token(tokens['AuthenticationResult']['IdToken'],'id_token','id')
  File "/srv/homeassistant/lib/python3.5/site-packages/warrant/__init__.py", line 197, in verify_token
kid = jwt.get_unverified_header(token).get('kid')
AttributeError: module 'jose.jwt' has no attribute 'get_unverified_header'

This is not solved. But to let you know what I have done and doesn’t solved every process I made below I reboot my pi.
I have try to edit from just cloud: to https://home-assistant.io/components/cloud.alexa/ so it won’t expose every devices in my HA. I have the same issue last night auth_api.py error.
I try to sign-out and sign-in again doesn’t work. On Amazon side I see devices that already in with (offline)
I deleted cloud: from configuration.yaml can load to gui but no cloud sign in at configuration.
I put back cloud: in configuration.yaml can load to gui but no cloud sign in at configuration and also cloud not support (This even worst).
Since it is not support I delete folder .cloud, remove cloud: , no error report. But don’t have cloud login in configuration. If I put in cloud: will say not support.

I have backup configuration so lucky me.

Basically did the same troubleshooting :frowning:

Hello @Andrew_Lozoya
Did you solve this issue?

reply appreciated!!

@Sunonline
Hello
Did you find solution ?
Thank you in advance

Cloud component?

In your configuration.yaml
cloud:
config:
Check config, restart ha.
Go to configuration on ha frontend, right hand side you see the word Cloud. Click on it and will ask you to sign-in to home-assistant skill that link on cloud with alexa. Once sign-in you will see account linked. (Thus username, password is the same you sign-up to home-assistant skill on alexa app.
—————-
Open alexa amazon web or app on your phone. Go to skill, search home-assistant / if you have sign-up do it and sign-in to home-assistant skill. You will noticed and see the skill is linked.

@Sunonline Try it, no success :frowning:

No success on ha side or server side?

You have to sign up for home-assistant skill or hassio skill on server side from amazon alexa app or website.
Once you sign-up then sign in to see the home-assistant skill is linked with amazon alexa app.

In configuration.yaml put cloud: and config: .
Check your settig and restart ha to make it effect.

Come back to ha frontend / configuration / cloud / sign-in the same account you sign-up with home-assistant on alexa app.

You will see now it will shows you account linked. When you click on setting also will link you to alexa app > smart home > on right hand side, scroll down, you will see search or sync for devices, click on it. Your devices in ha will show on alexa app.

After entering credentials I get this:
image

Log entry:

Tue Aug 07 2018 13:02:21 GMT+0200 (Central European Summer Time)
Error handling request
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/aiohttp/web_protocol.py", line 378, in start
    resp = await self._request_handler(request)
  File "/srv/homeassistant/lib/python3.5/site-packages/aiohttp/web_app.py", line 341, in _handle
    resp = await handler(request)
  File "/srv/homeassistant/lib/python3.5/site-packages/aiohttp/web_middlewares.py", line 88, in impl
    return await handler(request)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/http/static.py", line 66, in staticresource_middleware
    return await handler(request)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/http/real_ip.py", line 34, in real_ip_middleware
    return await handler(request)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/http/ban.py", line 67, in ban_middleware
    return await handler(request)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/http/auth.py", line 66, in auth_middleware
    return await handler(request)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/http/view.py", line 113, in handle
    result = await result
  File "/srv/homeassistant/lib/python3.5/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.5/site-packages/homeassistant/components/http/data_validator.py", line 47, in wrapper
    result = await method(view, request, *args, **kwargs)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/cloud/http_api.py", line 102, in post
    data['password'])
  File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
    future.result()
  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 91, in login
    cognito = _authenticate(cloud, email, password)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/cloud/auth_api.py", line 126, in _authenticate
    cognito.authenticate(password=password)
  File "/srv/homeassistant/lib/python3.5/site-packages/warrant/__init__.py", line 383, in authenticate
    self.verify_token(tokens['AuthenticationResult']['IdToken'],'id_token','id')
  File "/srv/homeassistant/lib/python3.5/site-packages/warrant/__init__.py", line 197, in verify_token
    kid = jwt.get_unverified_header(token).get('kid')
AttributeError: module 'jose.jwt' has no attribute 'get_unverified_header'

Instance: hassbian 0.75.1
Platform: Home Assistant Cloud login

@t.srubar did you find a solution ?
PLEASE HELP

Unfortunately not yet

I too have a very similar issue. I am interested to find out if you’ve made any progress.

I opened a ticket: https://github.com/home-assistant/home-assistant/issues/16469

If you’re having issues with the get_unverified_header method not existing, we’ve added a solution to our troubleshooting page.

1 Like