alexa_media_player: failed to SignIn
Describe the bug After removing Alexa media Player due to several tests, for the issues the last days, I installed 4.12.5 today.
Unfortunately, it seems that there are configuration issues, depending on the selected amazon Domain.
I can start the login for DE Domain, I am also getting the tfa Page - but the Integration is showing a failure to login in the end of the process.
When I select COM Domain, everything is working and the Integration can login, but no devices we’re added.
To Reproduce
- Go to ‘…’
- Click on ‘…’
- Scroll down to ‘…’
- See error
Expected behavior
Should work independend of the selected amazon Domain.
Screenshots
System details
- Home-assistant (version): 2024.8.0b4
- alexa_media (version from
const.pyor HA startup): 4.12.5 - alexapy (version from
pip show alexapyor HA startup): - Amazon 2FA is enabled (y/n): y
Logs No Logs during Initial setup
Additional context
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 4
- Comments: 56 (7 by maintainers)
Two ways… Wait for an update, or:
Open /homeassistant/custom_components/alexa_media/manifest.json in File Editor Addin and change line 11 to: “requirements”: [“alexapy>=1.28.2”, “packaging>=20.3”, “wrapt>=1.14.0”],
Hello, same problem here in amazon.it
This was fixed in this release of the lib: https://gitlab.com/keatontaylor/alexapy/-/releases/v1.28.2 But the Alexa Media Player needs to update its dependecies to get this version…
Can confirm that editing the
manifast.jsonto1.28.2is the correct workaround!After changing the manifest and activating 2FA it worked without any problems using the DE- Domain.
This is an alexapy v1.28.1 issue. There’s already a solution by @chrisvblemos: https://github.com/alandtse/alexa_media_player/pull/2398#issuecomment-2272232708 https://gitlab.com/keatontaylor/alexapy/-/issues/32
alexalogin.py needs to be patched:
fix_cookies.patch
To use “patch” and the patch file above: apk --no-cache add patch patch “/usr/local/lib/python3.12/site-packages/alexapy/alexalogin.py” < “fix_cookies.patch”
To revert the patch: patch -R “/usr/local/lib/python3.12/site-packages/alexapy/alexalogin.py” < “fix_cookies.patch”
For v4.12.5, also edit manifest.json to:
"requirements": ["alexapy>=1.28.1", "packaging>=20.3", "wrapt>=1.14.0"],Sorry, I seem to have misplaced my crystal ball…
Login to Amazon.com is working, Amazon.de is not working
Exact same problem for me. Domain related. .com works fine but I need amazon.co.uk.
Works on 4.12.6 for me.
I have the same issue on v4.12.6 (latest version at the time of writing)
@xhemp
Either the patch wasn’t applied successfully or there is another issue. To make sure you are using the patch provided by jleinenbach, try to repeat the proccess but instead using the following patch file with additional logging:
Check your logs again afterwards. Multiple warnings should show up if the patch was applied:
_LOGGER.warning("Adding new cookie using alexapy's patch: %s", raw_cookie)Note: this is a workaround and not an official patch. We need to wait for pull requests for alexapy and AMP for the proper fixes, making these patches unnecessary.
I have the same, tried to patch alexapy as well to no avail.
It would be good, If you could track this in a seperate issue and provide Log Files when this Happens again.
There were a couple of areas that had to be changed in the last days - so it is likely that Something with saving the cookies or similar dies mit Work…
Especially, when the Last Change in alexapy is related to partitioned cookies
Worked for me…!! Thanks
OH-MY-GOD - it’s back!
worked a treat! thank you!
Yes, I guess the code owner will update the dependency shortly. It was just fixed about 1 hour ago in alexapy, just be patient for some more minutes or couple of hours until the official dependency update. 😉