alandtse / alexa_media_player

This is a custom component to allow control of Amazon Alexa devices in Home Assistant using the unofficial Alexa API.
Apache License 2.0
1.48k stars 284 forks source link

Integration no longer working #2592

Open ashoktvm opened 3 days ago

ashoktvm commented 3 days ago

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

Debug Logs (alexa_media & alexapy) Please provide logs.

Additional context

grewhit25 commented 3 days ago

i have the same issue HA 2024.10.1 container.

emiliano25 commented 3 days ago

Same issue HA 2024.10.1 docker

LG69Domo commented 3 days ago

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

ashoktvm commented 3 days ago

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)

Not working. It still goes to the login page

xeonzen commented 3 days ago

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

ashoktvm commented 3 days ago

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

for me it goes to the username login page

MuhChy commented 3 days ago

Same problem for me. @alandtse is it possible to fix this?

chris2pple commented 3 days ago

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

Stainy3244 commented 3 days ago

As 4.13.3 put HA into an infinite loop, it was pulled, but not before HA 2024 10.1 was updated to NOT accept any version at or before 4.13.3. If you're on HA 2024 10.1 it wont like AMP until it receives a correction release

assafshafran commented 3 days ago

As 4.13.3 put HA into an infinite loop, it was pulled, but not before HA 2024 10.1 was updated to NOT accept any version at or before 4.13.3. If you're on HA 2024 10.1 it wont like AMP until it receives a correction release

This was driving me crazy.. I disabled the integration for now. Just to make sure there isn’t any other option currently right?

Stainy3244 commented 3 days ago

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

seganku commented 3 days ago

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

I restored a backup, then upgraded core to 2024.10.1. It's been working for me.

ashoktvm commented 3 days ago

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

I restored a backup, then upgraded core to 2024.10.1. It's been working for me.

I restored backup as well, but integration shows initializing.

zUpm4n commented 2 days ago

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. Thank you !!!!

aaklan commented 2 days ago

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 :) )

MuhChy commented 2 days ago

For me i just Missed to Update hacs. After removing everything related to the old Alexa Media Player, i installed the newest hacs Version and then i used the workaround aaklan mentioned. Thx

aaklan @.***> schrieb am So. 6. Okt. 2024 um 09:48:

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 :) )

— Reply to this email directly, view it on GitHub https://github.com/alandtse/alexa_media_player/issues/2592#issuecomment-2395335351, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEFTZGSCOLVGUKJJVMOYXXLZ2DTMHAVCNFSM6AAAAABPNLPFAWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOJVGMZTKMZVGE . You are receiving this because you commented.Message ID: @.***>

ashoktvm commented 2 days ago

I dont know how u guys get the work around to work. May be I think its issue with amazon India

Xento commented 2 days ago

I have the same issue. When doing the normal workflow the website asks for the email address, on the next page it asks for the password. After submitting the password it returns to the email page.

When trying the workaround I must enter a captcha wich turns into a 500 server error when submitted.

EDIT: After a few tries it didn't required a captcha and directly prompted the 2FA

RocketKuhr commented 2 days ago

I have the same issue. When doing the normal workflow the website asks for the email address, on the next page it asks for the password. After submitting the password it returns to the email page.

When trying the workaround I must enter a captcha wich turns into a 500 server error when submitted.

I have the same problem. Also try to several times, but didnt get worked

ps: Domain is Amazon.de

lucasauda commented 2 days ago

Yesterday I installed my first Home Assistant (2024.10.1 with Docker on Raspberry Pi OS). Configuring this integration, I was trapped in the "back to username" loop. Now I'm happy to know I'm not that dumb...

Thanks to @LG69Domo, today I got it configured with the "create new account" workaround (on amazon.it). But my device (Echo Dot 4) stays in pending status. And after some minutes I got a reauthentication request.

This time the configuration form required the 2FA code too, and I wrote one generated with my authenticator app. Then I repeated the same procedure as before.

I also updated to the just released v4.13.4, but my device still doesn't connect...

I attach a log that I tried to create: home-assistant_alexa_media_2024-10-06T20-33-49.676Z.log

Thanks!

ashoktvm commented 2 days ago

4.13.4 still doesn't fix the loop to login page problem. @alandtse please look into this

tuxpoldo commented 1 day ago

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'