alexa_media_player: Get 404: not found during authentication - DO NOT USE v4.13.8! Solution: Revert to v4.13.7

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

I get 404: page not found error when I click on Sign in in the external page opened when I try to add the integration.

To Reproduce

  1. Go to ‘…’
  2. Click on ‘…’
  3. Scroll down to ‘…’
  4. See error

Screenshots image

image

System details

  • Home Assistant version: 2024.11.1
  • alexa_media version (from const.py or HA startup log): 4.13.8
  • alexapy version (from pip show alexapy in homeasssistant container or HA startup log): 1.29.4
  • Is Amazon 2FA/2SV enabled <!—We will not debug login issues if unanswered—> (y/n): y
  • Amazon Domain: amazon.it

Debug Logs (alexa_media & alexapy) Please provide logs.

Additional context

I tried with and without 2FA key (I validated the OTP correctly). same result. I tried to Deactivate and activate again the 2FA in amazon but get same result.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 45

Most upvoted comments

I disabled the 2sv, actived again using as preferred method the otp sms.

but as 2fa i ever get the approve notification by the Amazon app (not otp generated by Authenticator)

OTP via SMS or an amazon approval notification will not work as that introduces another step in the auth sequence and AMP’s proxy callback is only written to handle one or two callbacks looking for “authentication successful” before it fails.

It will be a while before I am able to tear this thing apart and try and write something different to get the initial login successful cookie, which will be along the lines of Apollon’s alexa-remote2. But that’s a javascript library that’s used in Node-RED’s node-red-contrib-alexa-remote2-applestrudel and is not something that can just be “dropped” into HA’s Python environment…

This is one very fustrating integration. Following all the steps as above and some of the apparent workarounds and still end up with 500 Internal Server Error- Server got itself in trouble. I appreciate that the dev. has done this freely and has the capricious Amazon to deal with but this has been going on for months now and never seems to address the issues that many have encountered. It would be good to know if this problems are soluble or if it this is beyond repair given the amazon end of things. Then we can take this out of our HA setups till someone else has a try.

Use version 4.13.7. v4.18.8 is bad. PR to undo it has been merged into Dev but Alan hasn’t bundled a new version release yet.

AMP needs a major rewrite to eliminate all of this and just prepare itself to send you to Amazon to authenticate yourself however you like so that it can get the damn cookie that it needs to get itself going. This is the way alexa-remote2 works (it’s called “proxy method”) which is much simpler and never requires your email, password or OTP codes. You just have to manually browse to http://<your_local_ip>:3456 and successfully log in to Amazon. Once that is completed, the browser page informs you it’s done and you can close the window. It now has the initial login session cookie and bob’s yer uncle.