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

Endless username & password loop in Alexa/Amazon authentication; fails to progress to OTP window #2514

Closed
Zerreth opened this issue Sep 8, 2024 · 137 comments

Comments

@Zerreth
Copy link

Zerreth commented Sep 8, 2024

Describe the bug

Setup via amazon.com, will endlessly loop through the amazon login screen, it never progresses beyond inputting password.
Setup via amazon.com.be will give a 500 Internal server error.
Setup via amazon.de or amazon.co.uk will succeed, but all devices will be unavailable & uncontrollable.

My account region info:
Going to Amazon.de -> Manage Your Content and Devices: states that it is setup through Amazon.com
Going to Amazon.com -> Manage Your Content and Devices -> Country/Region Settings: Is set to Belgium, as that is my address of residence, and changing it requires a valid address.

To Reproduce

  1. Have an amazon account set to Belgium.
  2. Try to setup the integration using .com or .com.be
  3. See error

Expected behavior

All echo devices available & controllable.

System details

  • Home Assistant version: 2024.9.0
  • alexa_media version (from const.py or HA startup log): 4.12.12
  • 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.com.be ???
@Zerreth
Copy link
Author

Zerreth commented Sep 8, 2024

Additional information:

Managed to get it working by downgrading to 4.11.2, then login via Amazon.com domain was possible without issues. (so no endless loop bewteen login & password) However, no devices were visivle. Reloading the inegration threw errors were captcha failed.

Upgrading to the latest version with it already configured has everything working now.

@danielbrunt57
Copy link
Collaborator

danielbrunt57 commented Sep 8, 2024

Setup via amazon.com, will endlessly loop through the amazon login screen, it never progresses beyond inputting password.

I've experienced this myself and shift-reloading the HA browser page resolved it for me.

My account region info:
Going to Amazon.de -> Manage Your Content and Devices: states that it is setup through Amazon.com
Going to Amazon.com -> Manage Your Content and Devices -> Country/Region Settings: Is set to Belgium, as that is my address of residence, and changing it requires a valid address.

My primary account is amazon.ca but my devices were registered in amazon.com as there used to be a skill in .com that was only in .com. Then TELUS Smart Home skill arrived but only in .ca and I deciced I wanted that more than .com only skill so I tried moving them back to .ca so I could use the TELUS skill but repeated attempts all failed despite the country of residence in amazon.com account being Canada. Recently though, I found a how-to that stated I had to move my Kindle subscription. What? Kindle? Okay, I'll try anything once! I moved it and my devices are all now in .ca!

@tamamma
Copy link

tamamma commented Sep 9, 2024

I'm having the same issue but with the amazon.it after confirming the 2FA code when the page with Amazon Login prompt appears I use my Amazon Login but when in the next page I write my password It goes back on the first login page and keeps in this loop. I've tried using even ducktogo browser to avoid cookies and session issues but is the same.
Screenshot 2024-09-09 alle 13 07 30

@LordShelmchen
Copy link

Same issue with amazon.de. I tried to reinstall the integration after having problem that media player on Alexa isn't working anymore (see other issues).

@Gajotres
Copy link

I can confirm the same issue with amazon.de. It works perfectly well with amazon.com but my devices are bind to amazon.de.

@davdl92
Copy link

davdl92 commented Sep 11, 2024

Same here with amazon.it domain.
Endless loop in the authentication process.

@c4coer
Copy link

c4coer commented Sep 11, 2024

same for amazon.fr.
Endless loop in the authentication process.

@he4th3n
Copy link

he4th3n commented Sep 11, 2024

Same here for amazon.it; rolling back to v4.12.11 works fine, though. Seems to be a regression introduced with some change in v4.12.12.

@gregorio-ferreira
Copy link

I am facing same loop, amazon.es

After adding my info, together with 2FA, once I click on "open website" get into the described loop above to loging into my Amazon account, but it uses the local IP address of my HA.

image

This is the URL it directs me for logging in: http://192.168.1.4:8123/auth/alexamedia/proxy?config_flow_id=01J7HHFK87YVK1XQH02<1234567>&callback_url=http://192.168.1.4:8123/auth/alexamedia/callback?flow_id%3D01J7HHFK87YVK1XQH02<1234567>

@danielbrunt57
Copy link
Collaborator

Same here for amazon.it; rolling back to v4.12.11 works fine, though. Seems to be a regression introduced with some change in v4.12.12.

There were only two changes in 4.12.12 from 4.12.11.
One was in config_flow.py and the other in __init__.py:

image

@danielbrunt57
Copy link
Collaborator

danielbrunt57 commented Sep 11, 2024

I'm having the same issue but with the amazon.it after confirming the 2FA code when the page with Amazon Login prompt appears I use my Amazon Login but when in the next page I write my password It goes back on the first login page and keeps in this loop. I've tried using even ducktogo browser to avoid cookies and session issues but is the same. Screenshot 2024-09-09 alle 13 07 30

That window is messed up!

image

image

@danielbrunt57
Copy link
Collaborator

danielbrunt57 commented Sep 12, 2024

I also now have the issue (amazon.ca).

It would seem to be a new development related to HA Core 2024.9.1 (not sure about 2024.9.0) as I went back to AMP 4.12.11 and saw the same thing. Also tried 4.12.8 and same thing so I'm pretty sure it's nothing that's changed in AMP.
I also had a Edge browser update in the middle of the above so I also tried Firefox but saw the same behaviour.

Through trial and error trying to figure out the flow sequence, I was able to trick it and get to the OTP window.

The problem is the new three page login sequence with email, then password, then 2SV
AMP was programmed to do the callback after two pages (the way the Amazon login used to be) but gets an "unsuccessful" response after only two pages since the login sequence did not finish all three pages and AMP returns you to the previous (first) page to try again. So...

At this screen, select the first option

image

Enter "x x" for First and last name and click CREATE YOUR AMAZON ACCOUNT

image

When that fails, select Sign in Already a customer?

image

The page then changes to show both email & password on the same page. (which is still the first page in the callback sequence)

image

Now you can select SIGN IN which then proceeds to the 2nd page which is Two-Step Verification
and the callback to HA will then occur where it will test if your email, password & OTP login was successful or not.
If not, it sends you back to the first page in Amazon's new 3 page sequence.

image

@danielbrunt57 danielbrunt57 changed the title Cannot setup with Belgian Amazon account. Endless username & password loop in Alexa/Amazon authentication; fails to progress to OTP window Sep 12, 2024
@Onlyhanz-com
Copy link

Through trial and error trying to figure out the flow sequence, I was able to trick it and get to the OTP window.
After you've cycled through name, password and back to name, select the option Create Account New to Amazon?
Fill in a first & last name (anything at all as not going to matter so "Q W" is quick and easy to type!)
Amazon will then inform you that an account with your email already exists.
At that point re-select "Sign in Already a customer?" and proceed with the email and password windows and then the OTP window should appear. By that point though, the integration generated OTP has likely expired but you can just enter your current app generated OTP code and it should work.
If it returns to the integration add window and it just sits and spins and never progresses, that likely means the proxy listening session has expired and you'll have to repeat the process.

These steps worked for me after battling for 2 hours, thank you.

@mjwgeek
Copy link

mjwgeek commented Sep 12, 2024

This method, although let me sign in, it immediately failed and sign me out again.

Edit: After upgrading to that latest version, 4.12.12, that method did work and stayed signed in. Nice!

@dfirvida79
Copy link

The same issue happens to me with amazon.es on HA Core 2024.9.1 and AMP 4.12.12. I don't know where the problem is but it's frustrating.

@danielbrunt57
Copy link
Collaborator

The same issue happens to me with amazon.es on HA Core 2024.9.1 and AMP 4.12.12. I don't know where the problem is but it's frustrating.

I totally emphasize with your frustration!
It seems to be an endless uphill battle but hopefully we'll win soon...

@jleinenbach
Copy link
Contributor

I had the same issues yesterday, but it seems that it's fixed now.

Nothing official for Alexa, but at least for Europe, there were some AWS authentication issues:
https://health.aws.amazon.com/health/status?eventID=arn:aws:health:eu-south-1::event/MULTIPLE_SERVICES/AWS_MULTIPLE_SERVICES_OPERATIONAL_ISSUE/AWS_MULTIPLE_SERVICES_OPERATIONAL_ISSUE_5F163_8C858970C70

@tamamma
Copy link

tamamma commented Sep 12, 2024

I had the same issues yesterday, but it seems that it's fixed now.

Nothing official for Alexa, but at least for Europe, there were some AWS authentication issues: https://health.aws.amazon.com/health/status?eventID=arn:aws:health:eu-south-1::event/MULTIPLE_SERVICES/AWS_MULTIPLE_SERVICES_OPERATIONAL_ISSUE/AWS_MULTIPLE_SERVICES_OPERATIONAL_ISSUE_5F163_8C858970C70

Just tried again now with my amazon.it account but login loop issue is still there.

@Gajotres
Copy link

Also, still not working with amazon.de

@xav093
Copy link

xav093 commented Sep 12, 2024

same for amazon.fr.
Endless loop in the authentication process.

@silvio-l
Copy link

silvio-l commented Sep 12, 2024

same for amazon.de (doesnt matter if otp by phone or by app). HaOS 2024.09.1 + HACS AMP v4.12.12

Thanks @Onlyhanz-com ... this worked for me too

@Gajotres
Copy link

Gajotres commented Sep 12, 2024

I also now have the issue (amazon.ca).

It would seem to be a new development related to HA Core 2024.9.1 (not sure about 2024.9.0) as I went back to AMP 4.12.11 and saw the same thing. Also tried 4.12.8 and same thing so I'm pretty sure it's nothing that's changed in AMP. I also had a Edge browser update in the middle of the above so I also tried Firefox but saw the same behaviour.

Through trial and error trying to figure out the flow sequence, I was able to trick it and get to the OTP window. After you've cycled through name, password and back to name, select the option Create Account New to Amazon? Fill in a first & last name (anything at all as not going to matter so "Q W" is quick and easy to type!) Amazon will then inform you that an account with your email already exists. At that point re-select "Sign in Already a customer?" and proceed with the email and password windows and then the OTP window should appear. By that point though, the integration generated OTP has likely expired but you can just enter your current app generated OTP code and it should work. If it returns to the integration add window and it just sits and spins and never progresses, that likely means the proxy listening session has expired and you'll have to repeat the process.

I can confirm this actually works as a workaround. I was able to integrate AMP; no give me some time to see if it's stable. Kudos for a workaround ❤️

@SpcFilho
Copy link

I also now have the issue (amazon.ca).

It would seem to be a new development related to HA Core 2024.9.1 (not sure about 2024.9.0) as I went back to AMP 4.12.11 and saw the same thing. Also tried 4.12.8 and same thing so I'm pretty sure it's nothing that's changed in AMP. I also had a Edge browser update in the middle of the above so I also tried Firefox but saw the same behaviour.

Through trial and error trying to figure out the flow sequence, I was able to trick it and get to the OTP window. After you've cycled through name, password and back to name, select the option Create Account New to Amazon? Fill in a first & last name (anything at all as not going to matter so "Q W" is quick and easy to type!) Amazon will then inform you that an account with your email already exists. At that point re-select "Sign in Already a customer?" and proceed with the email and password windows and then the OTP window should appear. By that point though, the integration generated OTP has likely expired but you can just enter your current app generated OTP code and it should work. If it returns to the integration add window and it just sits and spins and never progresses, that likely means the proxy listening session has expired and you'll have to repeat the process.

This is a great workaround, and it worked on the first try. I’ve been trying various methods since this morning, but none of them worked—except yours. Thank you! Hopefully, Amazon will address this bug with the new login screen (or the Integration Developer will work on a fix for this new behavior).

@danielbrunt57
Copy link
Collaborator

@xav093 Try my sequence above

@david-romero
Copy link

Great workaround @danielbrunt57. It worked for me. Thanks

@tamamma
Copy link

tamamma commented Sep 13, 2024

I also now have the issue (amazon.ca).

It would seem to be a new development related to HA Core 2024.9.1 (not sure about 2024.9.0) as I went back to AMP 4.12.11 and saw the same thing. Also tried 4.12.8 and same thing so I'm pretty sure it's nothing that's changed in AMP. I also had a Edge browser update in the middle of the above so I also tried Firefox but saw the same behaviour.

Through trial and error trying to figure out the flow sequence, I was able to trick it and get to the OTP window. After you've cycled through name, password and back to name, select the option Create Account New to Amazon? Fill in a first & last name (anything at all as not going to matter so "Q W" is quick and easy to type!) Amazon will then inform you that an account with your email already exists. At that point re-select "Sign in Already a customer?" and proceed with the email and password windows and then the OTP window should appear. By that point though, the integration generated OTP has likely expired but you can just enter your current app generated OTP code and it should work. If it returns to the integration add window and it just sits and spins and never progresses, that likely means the proxy listening session has expired and you'll have to repeat the process.

This workaround was good for me too with amazon.it Thank You

@dfirvida79
Copy link

My experience is that this is a problem with HA Core 9.0 or 9.1. I have been able to test with HA 8.2 and AMP 4.12.12 and it works fine. Something was touched in the latest versions of HA that is causing AMP to fail.

I have not yet been able to test the workaround you have shared.

@dfirvida79
Copy link

dfirvida79 commented Sep 13, 2024

I confirm that the workaround also worked for me on amazon.es.

@hatchna
Copy link

hatchna commented Oct 8, 2024

So I tried the workaround outlined above to go to click create an account and then sign in as an existing user when it says I have sn account already. However when I do that, instead of bringing up a field for me to enter my OTP code, it brings up a captcha field, and when I enter the captcha in I get an 500 server error. Any thoughts as to why I'm not getting the option to input the OTP code?

@ashoktvm
Copy link

ashoktvm commented Oct 8, 2024

None of the workaround is working for me

@jazzmonger
Copy link

and when I enter the captcha in I get an 500 server error.
Check the url. Is it on your ha server? It likely is an error from HA.

I battled this same problem for over a week trying every single suggestion in this thread without luck until I finally went to Amazon and changed my frigging password. It then worked. That was the only way I could get past this problem. As bizarre as that sounds, it worked and is still working.

@hatchna
Copy link

hatchna commented Oct 8, 2024

Changing my Amazon password for some reason got me past it. Weird.

@jazzmonger
Copy link

Ok we’re 2 for 2. Others should try this.

@bertybassett
Copy link

password change no dice

@patst
Copy link

patst commented Oct 11, 2024

I also now have the issue (amazon.ca).

It would seem to be a new development related to HA Core 2024.9.1 (not sure about 2024.9.0) as I went back to AMP 4.12.11 and saw the same thing. Also tried 4.12.8 and same thing so I'm pretty sure it's nothing that's changed in AMP. I also had a Edge browser update in the middle of the above so I also tried Firefox but saw the same behaviour.

Through trial and error trying to figure out the flow sequence, I was able to trick it and get to the OTP window.

The problem is the new three page login sequence with email, then password, then 2SV AMP was programmed to do the callback after two pages (the way the Amazon login used to be) but gets an "unsuccessful" response after only two pages since the login sequence did not finish all three pages and AMP returns you to the previous (first) page to try again. So...

At this screen, select the first option

image

Enter "x x" for First and last name and click CREATE YOUR AMAZON ACCOUNT

image

When that fails, select Sign in Already a customer?

image

The page then changes to show both email & password on the same page. (which is still the first page in the callback sequence)

image

Now you can select SIGN IN which then proceeds to the 2nd page which is Two-Step Verification and the callback to HA will then occur where it will test if your email, password & OTP login was successful or not. If not, it sends you back to the first page in Amazon's new 3 page sequence.

image

exactly that was the solution for me as well.

Changing the password had no effect, but that sequence "tricked" the login screen ;-)

@bkarakashev
Copy link

Same here I try all suggested workaround and nothing is working.
I am getting the 500 Internal Server Error. for Amazon.co.uk

@apocaliss92
Copy link

also now have the issue (amazon.ca).

Man you saved my day, this worked out

@f18m
Copy link

f18m commented Oct 14, 2024

I tried both:

Nothing worked so far... I'm having this issue with amazon.it

@hajar97
Copy link

hajar97 commented Oct 14, 2024 via email

@Suprimos85
Copy link

also get the 500 error

@Abba-
Copy link

Abba- commented Oct 14, 2024

I don’t really get it. People for months now using these workaround hacks. Alexa Integration gets regular updates, with no sign of anyone even thinking of fixing this issue. My question is for @alandtse - is this unsolvable problem which is why nobody is working on it, or what is the reason why this issue continues and nobody seemingly cares?

On 14 Oct 2024, at 10:41, Francesco Montorsi @.***> wrote: I tried both: Daniel's workaround #2514 (comment) <#2514 (comment)> Password reset on my Amazon account reinstalling AMP several times Nothing worked so far... I'm having this issue with amazon.it — Reply to this email directly, view it on GitHub <#2514 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD2QG7RHM6QFPNCNABHY263Z3N7VBAVCNFSM6AAAAABN3HU4ZSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMJQGQ3DOMJZHE. You are receiving this because you commented.

As recently as 2 weeks ago there was an issue where it caused a memory leak within HA. That bulletin links to this one from May shedding light that there is no active developer on this project.

@CaioLps
Copy link

CaioLps commented Oct 15, 2024

Also getting the same 500 Internal Server Error on Amazon.ca

@evilasiorg
Copy link

Just sharing my experience. I use my cell phone number as amazon login. To the workaround mentioned works, when you execute the step to fail on new account creation, you must use an email pattern as a login. If you try to use an cellphone the work around does not work.

Hope it help someone.

@hajar97
Copy link

hajar97 commented Oct 15, 2024 via email

@Abba-
Copy link

Abba- commented Oct 15, 2024

How are regular releases possible if there is no active developer there? Who is doing all these releases then?

According to the post linked, PR's are still being reviewed, but no active development is taking place. I'm not pretending to have any insider knowledge, just sharing what I've found while looking up this issue.

@proffalken
Copy link

The very same, thought the 'create new account' workaround had nailed it, but when it returned to HA, it spun for a short while with 'Loading next step for Alexa Media Player' followed by 'Error'.

But, on the 4th attempt, without changing anything, it randomly worked. So right now, for me, its working again.

I'd like to say a huge thanks to @danielbrunt57 for all the effort put in to keeping this thing alive . Having used it for several years, I hope something else come along that can replicate the functionality before this integration become unfixable permanently.

I had this as well - making sure the do not require OTP for this browser checkbox was UNCHECKED made this work for .co.uk

@bertybassett
Copy link

bertybassett commented Oct 16, 2024

now I get the code part then I get 404 error (used to be a 500 but now 404).

@Suprimos85
Copy link

still getting
auth/alexamedia/proxy/verify
500 Internal Server Error
Server got itself in trouble

@Wizard99it
Copy link

I gave up! Removed Alexa Media Player integration!

@srescio
Copy link
Contributor

srescio commented Oct 19, 2024

#2634

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