alexa_media_player: Integration no longer working

IMPORTANT: Please search the issues, including closed issues, and the FAQ before opening a new issue. The template is mandatory; failure to use it will result in issue closure.

Describe the bug

All my Alexa devices got disabled. So I deleted the integration and tried adding it again. THen it asks to login to alexaa using my amazon id But even after giving correct username and password it keeps on coming back to to the login screen

To Reproduce

  1. Go to ‘…’
  2. Click on ‘…’
  3. Scroll down to ‘…’
  4. See error

Expected behavior

Screenshots

System details

  • Home Assistant version: 1.10.24
  • alexa_media version (from const.py or HA startup log): 4.13.2
  • alexapy version (from pip show alexapy in homeasssistant container or HA startup log):
  • Is Amazon 2FA/2SV enabled <!—We will not debug login issues if unanswered—> (y/n):y
  • Amazon Domain: amazon.in

Debug Logs (alexa_media & alexapy) Please provide logs.

Additional context

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 3
  • Comments: 33

Most upvoted comments

I’ve had the same problem, and resolve in this way:

  • From the Amazon login page (where you will be asked for username only and not for the password) check “Create new account”
  • Put XX in the first field and compile the module with your Amazon Account (if not already compiled), don’t create a new one
  • At this point a page with the message that username already exist will appear.
  • Now check the box “Already have account” and it will show a page with Username and Password (and not only username as the first time),
  • go on and everything will work (it will ask for an OTP)

I’ve had the same problem, and resolve in this way:

  • From the Amazon login page (where you will be asked for username only and not for the password) check “Create new account”
  • Put XX in the first field and compile the module with your Amazon Account (if not already compiled), don’t create a new one
  • At this point a page with the message that username already exist will appear.
  • Now check the box “Already have account” and it will show a page with Username and Password (and not only username as the first time),
  • go on and everything will work (it will ask for an OTP)

Worked for me too, thanks a lot! (For the later readers, I had difficulties to understand "compile the module with your Amazon Account " but it meant just to press the big blue button on the form for me 😃 )

for amazon.de server the same problem , endless login loop , very frustrating

addition , i tried the method with creating new amazon account and after receiving the message that the account already exists i switched back to already have an account and it worked, at least for me on the german Amazon servers

It does not work with amazon.de - Same problem as described by other users - endless loop wile logging in - Error 500:

2024-10-07 11:46:22.515 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 477, in _handle_request
    resp = await request_handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 559, in _handle
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 117, in impl
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 92, in security_filter_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 210, in forwarded_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 26, in request_context_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 242, in auth_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 32, in headers_middleware
    response = await handler(request)
               ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 73, in handle
    result = await handler(request, **request.match_info)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/alexa_media/config_flow.py", line 1049, in wrapped
    return await cls.handler(request, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/authcaptureproxy/auth_capture_proxy.py", line 439, in all_handler
    resp = await getattr(self.session, method)(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/httpx/_client.py", line 1905, in post
    return await self.request(
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/httpx/_client.py", line 1572, in request
    request = self.build_request(
              ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/httpx/_client.py", line 358, in build_request
    return Request(
           ^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/httpx/_models.py", line 338, in __init__
    Cookies(cookies).set_cookie_header(self)
  File "/usr/local/lib/python3.12/site-packages/httpx/_models.py", line 1048, in set_cookie_header
    urllib_request = self._CookieCompatRequest(request)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/httpx/_models.py", line 1184, in __init__
    super().__init__(
  File "/usr/local/lib/python3.12/urllib/request.py", line 318, in __init__
    self.full_url = url
    ^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/urllib/request.py", line 344, in full_url
    self._parse()
  File "/usr/local/lib/python3.12/urllib/request.py", line 373, in _parse
    raise ValueError("unknown url type: %r" % self.full_url)
ValueError: unknown url type: '/auth/alexamedia/proxy/ap/register/138-0915940-8012813'

Just to make sure there isn’t any other option currently right?

The only solution I’m aware of is stay on 4.13.2 / HA 2021.10.0 - I restored a backup

this worked for me but goes to an error 500 screen after the captcha

for me it goes to the username login page

this worked for me but goes to an error 500 screen after the captcha