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
500 Internal server error while stting up #2138
Comments
Having the exactly same issue. My 2FA is disabled. |
I'm having an timeout error. HASS logs below:
|
This comment was marked as duplicate.
This comment was marked as duplicate.
is it on all versions of the plugin or only on the newest? Because i have the same error. EDIT: same error on other versions |
Hi, Error handling request |
Same here. |
same here |
You have to install alexapy. search for it in the already solved issues. |
Where should I install what? When I search for alexapy in the issues, I get what feels like 100 results. |
When I run the following, pip tells me that 1.25.5 is already installed. pip install alexapy When I attempt to install 1.27.10, I get the following: |
Same issue here! Try this Fix: https://www.youtube.com/watch?v=giyo6Pv3GLo |
My Homeassistant tells me that i have alexapy 1.27.10 installed. But it doesn´t change anything on the error 500. |
Same issue here |
I had the same problem and the following procedure helped me.
|
I did like @lukasvrany did but still I have the 500 error. |
Same here. No news? |
Hello, I recently discovered a solution that resolved this issue for me. When you’re in your 2FA settings on Amazon, make sure to FULLY enable 2FA. I had already activated 2FA with SMS, but it wasn’t fully activated. I was able to generate the OTP secret code and so on, but the Alexa Media Player was giving me a 500 error. I noticed a button to enable 2FA located below the button to create a new code. After fully enabling 2FA and generating a new OTP "master" code, which I then provided to the Alexa Media Player, the 500 error disappeared. |
I had the same problem. I did clean cookies and cache, cheked my amazon password, and everything is working right now. |
Same error but this worked for me. Thanks |
how your 2FA is implemented? Do you use the mail from Amazon or do you use another autenticator app? |
I now renewed the 2FA three times, including the final finishing of implementation, as @jcPOLO told us. But the error still is the same (and I can not renew the login challenge, also the 500 is comming) Any hints on how exactly we have to proceed? I followed the instruction of this wiki here. What I do have: |
Now I have learned how to provide log information. I hope this will help find out what I am doing wrong or where the bug is sitting... |
just one mor info: I checked my alexapy. It was not installed. I did the install via |
This fixed it for me thanks. How the hell is anyone supposed to get this?? This really needs to be reflected in the docs. |
It's literally the first thing in the install instructions. But please feel free to edit the wiki to make it more obvious since you missed it. |
you’re right. I skipped that section and went right to the “in-app Authenticator” section because I thought the external Authenticator section wasn’t relevant in that setup. |
I solved this way:
|
OK. I think the problem is solved. At least it works for me with the instructions.
|
I tried it exactly (?) like @Meteo02 told. I do have not a docker, I do have my installation at a NUC (hass). |
So, fresh install with no other integrations? Or??? "Complete new install" could also mean remove the integration and add it back. |
Can you edit your post and translate the error msg? My German is limited to swear words only... |
in the error message: Very, very strange. Why should I update to a beta version of HA to install this version? |
First I removed the Alexa Player integration, then updated Home Assistant to the beta version and then renstalled the integration and went through the config process. |
I also run into 500 Internal Server Error - Server got itself in trouble 2FA is enabled !! Alexa Media Player - v4.9.0 Home Assistant Running HASS on a RaspPi4 behind a Fritzbox 7590 AX with working DuckDNS and SSL encryption |
It's pretty brutal. Honestly I can't wait to ditch Alexa. The Willow project is getting us very close. |
Understand that this is not a full-time project for myself or any of the other maintainers, it is a pet project that I started years ago based on the excellent work of yet another person who enjoyed hacking away at things in our free time. Both @alandtse and I are not Amazon developers and as mentioned in the readme, this code mimics the Alexa app to the best of its ability, things can break when Amazon changes things or outright stop working if Amazon decides to cut us off. Amazon themselves has an entire team of engineers dedicated to the development of the Alexa App, when here we have a handful of developers who make improvements, fix bugs, etc. in their spare time. Additionally throughout the life of this project, it has been extremely clear that the Amazon Alexa API has nuances and variations for each regional location, small code changes and catches for things that exist in the North American region and do not exist elsewhere. As this project is based on reverse engineering that Amazon Alexa API it is impossible for the small community of supporters on this project to account for and deal with every single variation across those regional locations. I do want you to know that I understand your frustration and I do wish I had better answer for you, but I hope the above gives you some insight into the fact that at the end of the day it is impossible for us to account for every single issue and variation. |
Just dropping by to give my 2 cents: It appears that you can get a 2FA Key from your Amazon account WITHOUT actually turning the freaking thing on. |
I think the problem I had was that I entered too many times the password and I noticed that amazon was trying to discover if I was a bot. Maybe because sometimes I used a wrong password too. So I changed to SMS 2FA, my ISP public IP (rebooted the router to get another public IP from my ISP) and got the last version of alexa_media. For now it is working okay for me. |
Edit: it got stucked with the: But works :) |
TL;DR - Alexa hates your proxy, use https. I'm running Home Assistant Core on Docker, and I've been using Alexa Media Player for a few years now, ever since the early betas and it has proven to be solid. I recently renamed one of my dot devices, which naturally caused it to become unavailable within Home Assistant. In my attempts to add the device back, I deleted the integration to simply add it again, with a fresh list of included devices. This turned into a bit of a nightmare, as I experienced the dreaded "500 Internal Server Error" described here. I tried numerous ways to resolve the connection. Again, it was working fine, I just wanted to add the renamed device back, so I already had 2FA established and a successful connection from Amazon to HA. I finally determined that the problem must be due my migration to NGINX using http instead of the native https connection I used to have when I originally set up Alexa MP. I tried to add a proxy rule to allow the Amazon sign in, and I also tried to add the 2FA key manually. Neither method worked. What solved the issue for me permanently To temporarily enable https, I created a new subdomain with my DNS provider, then I configured LetsEncrypt certbot to issue a new certificate using the new subdomain and modified my firewall policies to: Then I edited
Then I restarted HA, which was now accessible at: https://newsubdomain.myhaserver.com:8123 I'm not an NGINX expert, so I'd be curious if someone smarter knows of a proxy rule that does work. For me, this was not trivial, but it was a heck of a lot faster than the other methods that I tried or were suggested in this thread and ultimately more secure too. |
It should NOT be this difficult. The sooner I can turn off Alexa, the better. We'e almost there.... |
We're already there. I'm just documenting what fixed it for me. This issue is in no way the fault of the awesome folks (who are not paid developers) who have spent countless hours to make the platform available to us (as an unsupported custom component, btw). The root cause is Amazon and the ever changing code base and authentication requirements. |
I just got mine working 5 mins ago I cleared everything on my chrome browser cookies cash and history was all cleared I tried again and it worked |
Timeout errors are caused by network issues where the proxy isn't able to communicate with Amazon or alternatively your browser cannot communicate with the proxy. Disabling IPv6 on HA just for login will sometimes fix that. |
any news? I install e use another browser for the problem of cache of browser. But it doesn't work anyway. |
You need to have SSL keys on your server if you are running locally. If you are not then you need to be using your cloud link from Nabu Casa. logged into HA with the cloud link AND using the same link in the Amazon login information so some nasty security thingies can be exchanged. And then be done with it and enjoy :) SSL is the key here. |
I solved it by simply changing the amazon password. after that with the new password it started working |
I solved it by simply enabling the OTP on Amazon. |
I suspect that if you solved it simply by changing your password or by enabling OTP, then you are probably running HA over https and not through a reverse proxy, such as NGINX, correct? |
No reverse proxy for me. |
Hola, ¿Me podéis ayudar de una manera fácil? no soy un experto y tengo el mismo problema gracias |
Hola, Tengo el mismo problema y no lo consigo, ¿me podéis ayudar de una manera fácil? no soy experto Gracias |
Changing password didn't work for me. I also tried switching off duck dns and nginx, restated and use only the lan ip but still get the 500 error with a captcha to progress instead of an otp populating |
Since you switched off NGINX, try issuing a certificate using LetsEncrypt, then enable https for home assistant and try again. It should work if you're able to use https to access home assistant externally. |
Thank you, I literally just got it working by fluke while having nginx and and duck dns running. |
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.
see also #2136
Describe the bug
I am new to HA and want to install Alexa Media Player. All went fine until I have to do the captcha. There I am running into a 500 error. Even if I want to get a new picture. The path I have mydomain.org:8123/auth/alexamedia/proxy/verify
To Reproduce
fresh install
restart Home assistant
add integration alexa media player
fill the configuration (amazon unser, amazon, password, amazon.de for region, home assistant url, 2FA key) and send
check the OTA key
login for alexa is comming up
prefilled amazon login and password
press button to login
captcha is showing (/auth/alexamedia/proxy/ap/signin/144-3911749-1675617)
clicking on "neue Zeichen anzeigen" causes an 500 (Server got itself in trouble)
or filling the captcha question is doing the same
Expected behavior
The integration shall install proper
Screenshots
System details
const.py
or HA startup): 4.80pip show alexapy
or HA startup): 2023.12.0Logs
Please provide logs.
Additional context
The text was updated successfully, but these errors were encountered: