alexa_media_player: Endless username & password loop in Alexa/Amazon authentication; fails to progress to OTP window
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
- Have an amazon account set to Belgium.
- Try to setup the integration using .com or .com.be
- See error
Expected behavior
All echo devices available & controllable.
System details
- Home Assistant version: 2024.9.0
- alexa_media version (from
const.pyor HA startup log): 4.12.12 - alexapy version (from
pip show alexapyin 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 ???
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 8
- Comments: 145 (3 by maintainers)
Commits related to this issue
- fix: bump alexapy to 1.29.3 (#2634) closes #2514 closes #2515 — committed to alandtse/alexa_media_player by srescio 2 years ago
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
Enter “x x” for First and last name and click CREATE YOUR AMAZON ACCOUNT
When that fails, select Sign in Already a customer?
The page then changes to show both email & password on the same page. (which is still the first page in the callback sequence)
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.
These steps worked for me after battling for 2 hours, thank you.
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
Enter “x x” for First and last name and click CREATE YOUR AMAZON ACCOUNT
When that fails, select Sign in Already a customer?
The page then changes to show both email & password on the same page. (which is still the first page in the callback sequence)
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.
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.
Thank you sir this worked for me on the latest alexa media player version
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 ❤️
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?
exactly that was the solution for me as well.
Changing the password had no effect, but that sequence “tricked” the login screen 😉
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!
None of the workaround is working for me
https://github.com/alandtse/alexa_media_player/issues/2554#issuecomment-2381869404 Is your firewall/ad blocker blocking the API?
That window is messed up!
I’m having the same problem too, I’ve been trying for weeks, no alternative solution has worked, I’ve also uninstalled everything related to Alexa and reinstalled it, nothing, after logging in it requires you to fill in the puzzle, but it always gives a 500 internal server error and I’ve never succeeded moving forward, I use amazon.it, but I also tried .com
Please help me 😄
Hello everyone,
I have tried to use the variant with the creation of the new account, but then I get the following message in Home Assistant:
I then receive the following message in the logs:
Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht
Logger: alexapy.helpers Quelle: custom_components/alexa_media/init.py:361 Integration: Alexa Media Player (Dokumentation, Probleme) Erstmals aufgetreten: 14:01:31 (11 Vorkommnisse) Zuletzt protokolliert: 14:11:02
alexalogin.login((<alexapy.alexalogin.AlexaLogin object at 0x7f4e834398b0>,), {‘cookies’: {}}): A connection error occurred: An exception of type ClientConnectorError occurred. Arguments: (ConnectionKey(host=‘api.amazonalexa.com’, port=443, is_ssl=True, ssl=True, proxy=None, proxy_auth=None, proxy_headers_hash=1993723757392613630), ConnectionRefusedError(111, “Multiple exceptions: [Errno 111] Connect call failed (‘0.0.0.0’, 443), [Errno 111] Connect call failed (‘::’, 443, 0, 0)”))
Until yesterday, this was working for me, but yesterday it asked me to reconfigure it, and when I followed the same process, instead of asking for the code, it asked me for a CAPTCHA first. After completing the CAPTCHA, I get a ‘500 Internal Server Error’. Any solution?
Worked perfectly in amazon.es. Thanks !
I confirm that the workaround also worked for me on amazon.es.
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).
https://github.com/alandtse/alexa_media_player/pull/2634
I gave up! Removed Alexa Media Player integration!
How are regular releases possible if there is no active developer there? Who is doing all these releases then?On 14 Oct 2024, at 21:52, Abba- @.***> wrote:
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.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>
Man you saved my day, this worked out
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.
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?
@skydado Thank you. Now everything seems to be working by disabling polling.
I feel like such a DAU (dümmster anzunehmender User ) - roughly translated DIU (dumbest imaginable user)…
Pi-hole blocked api.eu.amazonalexa.com and api.amazonalexa.com. After I whitelisted them both it worked…
THANKS for the nudge into the correct direction! Works perfectly now.
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.
This worked for me straight away. Thank you!
I needed to reinstalling Home Assistant but I spent a whole day trying to install Alexa Media Player. I then found this thread. I very pleased to say the workaround to sign in as a new customer then an existing customer works perfectly. Thank you danielbrunt57.
Actually I do kind of think that is something the developers should be mindful of as a rule. There is other software I can think of that has a core functionality but RELIES on external plugins to provide the real power (Obsidian for example - where there are hundreds of plugins, but some core ones like dataview and tasks). When upgrading the core developers do need to think of the overall experience. If important plugins provide functionality to large numbers of people these should not be broken lightly, and at the very least with extensive prior interactions with the developers, and reporting it as a breaking change. We are taking here about the 10 or 15 MOST important plugins only - and I can’t believe that most developers and beta testers would not have had these installed and would have reported them broken.
I’m not sure that it is 100% relevant that it is HACS versus HA either - oftentimes things are on HACS for reasons other than them being very niche or rare. If an update were to precipitously break all mushroom cards for example, that would be somewhat of an issue which would cause many people to seek other solutions.
Works for me comment , thanks @danielbrunt57
you want Ha to maintain changes to integrations they don’t even officially support? AMP is from hacs not ha
I can’t get by this continuous loop. The work around does not work for me
@atlaspl many thanks! Your solve worked perfectly!
It’s worked for me. Thank you
To update, it continues to work flawlessly, no requests to reauthenticate.
Thank you so much for the workaround, really easy to implement following your guide.
Seems that the issues some here are having after implementing the workaround, in that they’re being asked to re-authenticate regularly, are specific to their setup and use, and not affecting everybody (fingers crossed.)
Problem solved, thank you very much
Try deleting the integration config entry, restart HA, ensure there is no .storage/alexa_auth or .storage/alexa_media*.pickle (if there is, delete file(s) & restart HA again), clear your browser’s cookie’s and cached files, login into your Amazon account in a normal browser tab to re-establish cookies, and then try re-adding the integration.
same problem. this workaround worked for about 20 minutes and then same error loop for me. welp I’ve been wanting to get Alexa out of my life and this seems to be a good time since she doesn’t work with ha anymore
Just tried again now with my amazon.it account but login loop issue is still there.
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).
I’ve experienced this myself and shift-reloading the HA browser page resolved it for me.
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!