alexa_media_player: 500 Internal Server Error on SetUp

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

So i tried setting up the integration for ca 40mins now. Dosen’t matter if I choose amazon.de or .com use Otp or not after the Alexa sign in screen pops up. It either says that my account dosen’t exist or it will give me Captcha challange which will result in a 500 Server Error.

To Reproduce

  1. Go to ‘Install’
  2. Click on ‘Submit’ Try to Sign in into Amazon Alex Account
  3. See error

Expected behavior

Sign in/Account Linking working

System details

  • Home Assistant version: Core 2024.11.3 Frontend 20241106.2
  • alexa_media version (from const.py or HA startup log): 5.0.0
  • 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, tried first without and then with on .com and .de
  • Amazon Domain: .com/.de

Debug Logs (alexa_media & alexap home-assistant_2024-11-29T01-52-26.043Z.log y) Please provide [logs]Additional context

It could be the case that the Amazon Servers are currently not working correctly because its 2:30 in the night

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 6
  • Comments: 67

Most upvoted comments

So you’re saying that no one should be frustrated with something that claims to work but has issues, just because it’s free?

No, that’s not what we’re saying.

That’s an odd thing to suggest. Home Assistant, like many free services, sometimes has problems, and it’s completely reasonable to express disappointment when things don’t work as expected.

It’s perfectly reasonable to express your disappointments, but not here. GitHub issues is a place to report issues, get help, offer suggestions, assistance or recommendations, etc. but not complaints, gripes, whining or venting, etc.

If you want to continue discussing this, feel free to pm me over in HA community forum (dbrunt).

New release 5.0.1 has been published. We are back online, fellas!

Thanks to all for contribution.

sigh, literally every single time i got to install this bloody plugin it seems to be broken in some way.

@thefunkygibbon

Let’s keep things positive here! Posting the following categories of comments is not helpful and serves no useful, positive purpose.

  • Complaint: This is the most straightforward term, indicating a statement of dissatisfaction.
  • Gripe: This suggests a persistent complaint, often about a minor annoyance.
  • Whine: This implies a complaining tone, often seen as excessive or petty.
  • Rant: This indicates a passionate and often angry expression of complaint.
  • Venting frustration
  • Expressing dissatisfaction
  • Complaining about a recurring issue

If you need to vent the above thoughts, try the wife or your friends! 😉

The only reason I stick with AMP is Actionable Notifications!

I don’t know how you call it, but I like AMP to be clear, and in parallel I use the NabuCasa cloud, because I can expose entities and control them with voice (VTC = Voice To Command? 😃)

My point was and still is that if you get something for free (and especially software) you should never expect to be perfect. Even paid software solution has “only” 99.9% uptime. If you pay, you have absolutely all the means to complain and go nuts.

Sadly, free software is often free for a reason. We should be thankful for having HA 100% FOC and same for this great extension, that is currently sadly not working. But it will come back soon.

Then, I’d like to see thank you from all of you 😉

Tp be fair the issue is likely on Amazon. During Setup Amazon was telling me that the account I am using isn’t signed up (It is, I used it in the Alexa app to doublecheck and the signup process it was defaulting to was telling me that the email was already used). Sadly however it’s on the devs of this plugin to fix it or give clearer instructions for eu users maybe?

I am thinking that is probably accurate. It’s a known fact that Amazon did change the Alexa login windows earlier this year. The Alexa app used to present email + password together on first screen then optionally followed by OTP input if configured on the account. The login sequence now is 1. email, 2. password, optionally 3. OTP input. Another developer found a different URL for us to use which starts with sign in as new account and we have to select sign in to existing account where email + password are together followed by OTP input. I’ve dug inside the code for alexa-remote2 (javascript) from which this integration was developed years ago and have asked a few questions to the author of that repo who still actively works on it. Unfortunately, AMP was hardcoded to make things more user friendly for us than the way remote2 gets kickstarted, which is basically immune to authentication processes by Amazon. It just informs you to manually open a URL in your browser. that URL is a simply proxy callback when authentication is successful. It just waits for the success message however long and however many hoops Amazon takes you through (OTP, CAPTCHA, double verify you are who you say you are via an OTP SMS to the phone number on the account, open the Alexa app and verify yourself, or, or, or. Once success is achieved, the callback retrieves the login session cookie to kickstart itself. Yes! I’ve spent many MANY sleepless nights trying to figure this thing out, and I only recently started this deep-dive inside Python and the huge learning curve 5 months ago. Before then, I really had no understanding of the inside workings of “HA”, and all in my “spare” time when not working, socializing, watching TV, sleeping. Okay…<END RANT>! I want to try and figure out how to get back to the basic auth process like alexa-remote2… Thank god for "Google: and “ChatGPT”!

Hopefully, we’ll get there. Please have patience even when you’re frustrated!

One more comment, yesterday Apollon77 (alexa-remote2) did point me to his code section where he creates the Alexa “login” URL. I just need to check if that’s the URL we’re using or not. My first impression when I looked at it is I think it might be the URL we used to use 4 months ago and if so, doesn’t help me provide an instant fix but will serve as a starting point to develop a new method of authenticating AMP with Amazon (Alexa). And that will take time unless other contributors get involved.

I am also having: “Config flow could not be loaded: 500 Internal Server Error Server got itself in trouble” which I find to be a very poor error message. This is a very unreliable integration. It regularly does not work and throws my setup into kaos. I use TTS on my alexa devices to alert us during day to day operation. I hope they fix this finally.

I also use 2FA so that is not the problem. An I am current on ALL updates.

sigh, literally every single time i got to install this bloody plugin it seems to be broken in some way.

After setting up same error as you guys here the log

Logger: homeassistant.util.package
Source: util/package.py:152
First occurred: 5:35:22 AM (3 occurrences)
Last logged: 5:35:27 AM

Unable to install package alexapy==1.29.4: × No solution found when resolving dependencies: ╰─▶ Because alexapy==1.29.4 depends on aiofiles>=23.1.0,<24.0.0 and aiofiles>=24.1.0, we can conclude that alexapy==1.29.4 cannot be used. And because you require alexapy==1.29.4, we can conclude that your requirements are unsatisfiable.

A software package free or not should be tested prior to release

I always test my pull requests…in Canada so…move to Canada!!! Please, think before you speak!!!

I am not complaining. I am stating a fact. A software package free or not should be tested prior to release. If an error is found after release, then there should be some way to rewind the version to a working state. Should that not be possible, then a news release would be helpful, and hopefully a patch. Most of us use the Alexa integration to give TTS voice alerts about system status within our Home Assistant enviornment.

Error messages should include as much information as possible not “got into trouble”.

My Home Assistant is now crippled without the messaging that I have worked on and relied on for the past several years. I am hoping that the developers are able to resolve this issue.

This is a breaking change for me, meaning I may break out the google and replace the alexa.

This is only my opinion so go ahead and flame me.

"It's free, don't complain."

So you’re saying that no one should be frustrated with something that claims to work but has issues, just because it’s free? That’s an odd thing to suggest. Home Assistant, like many free services, sometimes has problems, and it’s completely reasonable to express disappointment when things don’t work as expected.

Just to clarify, my comment was based on my personal experience and opinion. I wasn’t making any broad claims or complaining about support or feeling entitled. I was simply stating what I’ve encountered. If you’re unsure, maybe give my comment another read.

"And a few bucks/month for HA isn't a lot either."

As I’ve pointed out, paying 75 euros a year for features I don’t even need—like remote access and Alexa integration—doesn’t seem worth it. I already have those capabilities. Plus, the subscription service doesn’t even offer the ability to stream audio to Alexa, anyway, at least according to the Nabucasa documentation I’ve come across.