Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration no longer working #2592

Open
ashoktvm opened this issue Oct 5, 2024 · 30 comments
Open

Integration no longer working #2592

ashoktvm opened this issue Oct 5, 2024 · 30 comments

Comments

@ashoktvm
Copy link

ashoktvm commented Oct 5, 2024

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

@grewhit25
Copy link

i have the same issue HA 2024.10.1 container.

@emiliano25
Copy link

Same issue HA 2024.10.1 docker

@LG69Domo
Copy link

LG69Domo commented Oct 5, 2024

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)

@ashoktvm
Copy link
Author

ashoktvm commented Oct 5, 2024

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
Copy link

xeonzen commented Oct 5, 2024

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

@ashoktvm
Copy link
Author

ashoktvm commented Oct 5, 2024

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

for me it goes to the username login page

@MuhChy
Copy link

MuhChy commented Oct 5, 2024

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

@chris2pple
Copy link

chris2pple commented Oct 5, 2024

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
Copy link

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
Copy link

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
Copy link

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
Copy link

seganku commented Oct 5, 2024

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
Copy link
Author

ashoktvm commented Oct 6, 2024

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
Copy link

zUpm4n commented Oct 6, 2024

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
Copy link

aaklan commented Oct 6, 2024

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
Copy link

MuhChy commented Oct 6, 2024 via email

@ashoktvm
Copy link
Author

ashoktvm commented Oct 6, 2024

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

@Xento
Copy link

Xento commented Oct 6, 2024

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
Copy link

RocketKuhr commented Oct 6, 2024

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
Copy link

lucasauda commented Oct 6, 2024

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
Copy link
Author

ashoktvm commented Oct 7, 2024

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

@tuxpoldo
Copy link

tuxpoldo commented Oct 7, 2024

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'

@lucasauda
Copy link

Hi @LG69Domo @zUpm4n @aaklan @MuhChy, sorry to bother you...
Since you wrote the workaround worked, I wanna ask if your Amazon devices connect and behave properly.
Maybe mine is another kind of issue...

@grewhit25
Copy link

The ‘create new account’ workaround as mentioned above by @LG69Domo works for me and attached devices appears to be working fine; for ‘compile’ -> ‘submit’.

@ugfus1630
Copy link

ugfus1630 commented Oct 12, 2024

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)

It is worked for me. Two more info:
OTP at the end will filled automatically just click ok.
If you disabled the alexa integration before (because of the memory leak issue before), enable it after finish the setup steps (or before :-)).

I did the setup many times and later realized that I disabled the integration some days ago and after update and authenticate, it was still disabled.

@Sectorchan
Copy link

this workaround doesnt work for me, once its back in HA it says failed

@DariusVaitkus
Copy link

I just tested it now and successfully added integration to my backup system. I got the same login screen after entering password again and again. Then Noticed, that URL is pointing to my local IP. So I decided to add integration from my phone and from outside network, as I have cloudflared integration. So filled all fields - in both HA access URL and public URL I added my external domain, confirmed 2FA and got all my speakers in HA. And I did not use NabuCasa subscription.

@Dazer95
Copy link

Dazer95 commented Oct 21, 2024

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

I got this too. Make sure you’re entering the right details

@danielbrunt57
Copy link
Collaborator

Amazon has changed the login windows for the Alexa app and the original code in alexapy/AMP no longer works correctly.

goes to an error 500 screen after the captcha

I've found that after clearing your browser's cookies, you need to log into amazon once to fulfill the captcha and re-establish initial cookies. It was only after doing that that I could then successfully complete the AMP proxy authentication otherwise I got the infamous "500 error".

I got the same login screen after entering password again and again

This is kind of resolved with the latest alexapy/AMP version. The initial screen should now be the new customer screen with option to log into existing at which point after selecting you get the email & password prefilled on 1st window followed by the OTP prefilled window. AMP proxy auth callback only works with two screens - email & password, then OTP. Anything else will fail & return you to the first window to try again.

Also, the URL being your local IP is correct as that is how auth proxy callback works.

@Suleiman700
Copy link

This may help you

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests