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

500 Internal Server Error #2663

Open
nicolux2006 opened this issue Nov 2, 2024 · 23 comments
Open

500 Internal Server Error #2663

nicolux2006 opened this issue Nov 2, 2024 · 23 comments
Labels
v4.13.7 alexa_media version 4.13.7

Comments

@nicolux2006
Copy link

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

When I try to log in to Amazon.de via Alexa Media Player integration. It gives me then the Captcha and then I always end up with a “500 Internal Server Error / Server got itself in trouble”. This also happens when I replace the Local URL with the Public (Nabu Casa) URL.

To Reproduce

Setup the Integration and Login to your Amazon Account

Expected behavior

My expected behavior was that I would then see my Alexa devices in the Home Assistant.

Screenshots

image

System details

  • Home Assistant Core Version: 2024.10.4
  • Home Assistant Supervisor Version: 2024.10.3
  • Home Assistant Operating System Version: 13.2
  • Home Assistant Frontend Version: 20241002.4
  • alexa_media version (from const.py): 4.13.7
  • 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): n
  • Amazon Domain: amazon.de

Debug Logs (alexa_media & alexapy)
Please provide logs.

Additional context

@DomeGr694
Copy link

Same here. I try it since yesterday

@SmilinStanSStanman
Copy link

Same here. I try it today...

@alekseyn1
Copy link

Same. Tried multiple iterations of URLs and such. Still the same issue.

@dunkelheim
Copy link

I ran into that as my password was wrong - maybe double check it.

@SmilinStanSStanman
Copy link

Thanks dunkelheim! I don't know why, but the configuration was being completed with a wrong password too...

@christianlappin
Copy link

Im in the US and hitting amazon.com and getting the same error. I have rebooted and un-installed/re-installed. From Terminal installed alexapy as it was not installed. Also running latest version of HA and integration. Using local IP and then for public IP the naba casa IP. Confirmed user/pass/2fa with different browsers and no go :(

@ElleScott
Copy link

Error: ### 500 Internal Server Error
Server got itself in trouble
Add Integration
Alexa Media Player
Completed UN: and PW:
Takes me to the Amazon login page
Verified password accuracy
Takes me a captcha screen
Before I can complete the captcha
Receive: 500 Internal Server Error
Server got itself in trouble

Current System:
Core
2024.10.4
Supervisor
2024.10.3
Operating System
13.2

Version of Alexa Media Player attempting to install: v4.13.7

@danielbrunt57
Copy link
Collaborator

Please use the Amazon 2SV/OTP method for account login. AMP/alexapy seems to no longer be able to deal with Amazon's CAPTCHA for non-2SV accounts...

@christianlappin
Copy link

christianlappin commented Nov 5, 2024 via email

@danielbrunt57
Copy link
Collaborator

danielbrunt57 commented Nov 6, 2024

OMG this is amazing. Thanks @danielbrunt57 I disabled my 2FA application and switched to OTP via phone codes and the integration set-up perfectly. Thank you!! I liked the extra security of my 2FA app so hopefully AMP/Alexpy will update to support the CAPTCHA in the soon future. For now its working and I am super appreciative.

I'm glad you got it setup~

Everything works perfectly fine here using OTP via 2SV Authenticator app secret key.
Once or twice in several hundred re&re's I got the dreaded captcha window but resolved it by clearing browser cookies & cached files, logging into Amazon to fulfill the first time login which gives you a captcha the first time but not again on subsequent logins, then logged into HA and installed AMP.

@johnpc
Copy link

johnpc commented Nov 10, 2024

I'm confused - what did you do to work around the issue? I don't know what is meant by AMP/alexapy vs Amazon 2SV/OTP or how to use one vs the other. No matter what I do, when I log in and do the captcha, I get 500 Internal Server Error.

Additionally, my setup ui does not have a Use Login Proxy method option, even though at the top of it it says For legacy configuration, disable Use Login Proxy method option..

@danielbrunt57
Copy link
Collaborator

Don't use legacy yaml method...use the UI config method. In Amazon account, enable 2SV with authenticator app (Accounts > Login & security > 2-step verification) and capture the 52-character secret key (displayed when you select Can't scan the barcode?) as that will be input when you configure AMP via the UI config method. You can use the same authenticator app code in your authenticator app and AMP or you can Add a second 2SV authenticator just for AMP if you prefer. Myself, I only use one for both. Make sure once you've enabled 2SV in your account that you log out and back in to make sure it's working. When this is working correctly, there should be no CAPTCHA screen, unless you clear or reset your browser settings, in which case you will get one the first time you log into your account again, but it should not occur after the initial login.

@johnpc
Copy link

johnpc commented Nov 11, 2024

Unfortunately, following those instructions does not work. I still see the captcha and get the 500 error.

Here is a screen recording of my attempt: https://files.jpc.io/d/hMohh-Screen%20Recording%202024-11-11%20at%2012.38.22%E2%80%AFAM.mov

Do not worry about the exposed password/2FA app key in the video. I've already changed the password and removed the 2fa app from my amazon account.

@danielbrunt57
Copy link
Collaborator

I watched your video and then attempted to replicate your steps.

  1. I did not get a captcha screen.
  2. I noticed you are using Safari whereas I use Edge. That might be relevant, or not?
  3. I think you solved the captcha incorrectly. In the video, I see "5mpgrb" but you entered "5rmpgrb".

@johnpc
Copy link

johnpc commented Nov 11, 2024

Thanks. Unfortunately I have tried multiple browsers including Firefox and Chrome with the same result.

I have also solved many captchas so I'm sure I've gotten most of them right 😅.

It actually doesn't matter what I do from the captcha screen. If I choose "See new characters" or "Hear the characters" it also gives me the same 500 error.

I am on the latest HAOS and latest Alexa Media Player from HACs. I do not know what else could be wrong with my setup.

@danielbrunt57
Copy link
Collaborator

Do you have any firewalling enabled?

@johnpc
Copy link

johnpc commented Nov 12, 2024

I do not have any firewalling enabled

@CyberDevil75
Copy link

Same problem, I used Chrome, Edge, mobile, notebook, Playstation... with and without 2FA (withi mobile app, with SMS etc.)... I have try to change the interna URL with direct IP and port, with domani name, with and without local... I have tryed all the imaginable guide and topic online and nothing have a solution for that! -.- I'm very frustrated!

@divdax
Copy link

divdax commented Nov 16, 2024

Same for me. Always 500 Internal Server Error.

@lukino188
Copy link

lukino188 commented Nov 17, 2024

I have been stuck for more than one week but now looks is working. I did same as @johnpc but on 2fa key code part i did not remove any spaces.

@johnpc
Copy link

johnpc commented Nov 18, 2024

Lucky you! It's still happening to me - I just updated hoas and the amp HACs install but it's the same as in my video (regardless of whether I include the spaces in the 2fa key code)

@danielbrunt57
Copy link
Collaborator

danielbrunt57 commented Nov 20, 2024

Lucky you! It's still happening to me - I just updated hoas and the amp HACs install but it's the same as in my video (regardless of whether I include the spaces in the 2fa key code)

Spaces in the OTP secret are irrelevant as they are automatically removed if present.
I always enter the OTP app secret key including spaces and have never had an issue in several hundred re & re's.

@danielbrunt57 danielbrunt57 added the v4.13.7 alexa_media version 4.13.7 label Nov 22, 2024
@abderlahmanalhnedi
Copy link

Same for me. 🥲

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

No branches or pull requests