alexa_media_player: Error fetching alexa_media data: Error communicating with API: Too Many Requests - all devices disappear

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 am using this integration since few years, i was using it without any issue since a month ago, while upgrading to 4.13+ i had authentication issue, so i went back to 4.12.

Then, the 12th of september after a HA restart, all alexa echo devices appear offline ever since. I tried to reinstall the intregration, upgrade and reauthenticate from fresh, but in case of a fresh new installation the list doesn’t appear at all (therefore why is unavailable in the list already present since previous)

To Reproduce

i can install a fresh new integration and list of devices not appearing even if the alexa account is active and devices there and working

ì

System details

  • Home Assistant version: 2024.6.3 but i also tried 2024.9.2

  • alexa_media version (from const.py or HA startup log): Screenshot 2024-09-22 alle 22 14 19

  • 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): YES

  • Amazon Domain: amazon.it

Debug Logs (alexa_media & alexapy) Please provide logs. Screenshot 2024-09-22 alle 22 14 54

Additional context

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 3
  • Comments: 46

Commits related to this issue

Most upvoted comments

using AMP version 4.12.7 and 2024.9.3 for HA I don’t encounter any problems. To resolve the authentication loop: instead of entering the data and logging in, just go to register new account and by entering the data the error “user already registered” will be returned. Once this step has been carried out, simply log in by entering the correct data and everything will work correctly.

I’ve done this multiple times. Its when I get returned to HA that HA just shows a blank error screen.

This ^ It is not the Amazon login or 2SV that’s the issue. The workaround for create new, then login works. It’s back in HA at the final step that the error is generated and setup of thr integration fails.

By following this procedure I was able to get the installation to work several times. Using chrome and trying to create a new account before logging in has always worked for me. Importantly, you do not need to refresh the web page

This was even after completely removing AMP, removing config files, clearing cookies, removing alexa and .pickle within .storage.

I reinstalled at AMP 4.12.11 and on HA 2024.8.2.

As you can see the Amazon login/workaround for creating an account works. It’s when we get back to HA, we get the error.

image

I found the answer on github!: “Are any of you using an ad blocker/firewall such as Pi-hole or AdGuard by chance? Some adlists were recently updated to block the Amazon Alexa API. This is solved by adding ^api(.[a-z]+)?.amazonalexa.com$ to your Pi-hole whitelist or @@||api*.amazonalexa.com^ for AdGuard. This regex is not region specific and should work for all endpoints”

Hi, there is a workaround for endless loop signin here. https://github.com/alandtse/alexa_media_player/issues/2514 In my scenario, after uninstall and reinstall, the integration stop working after some minutes and I receive this error “”" An error occurred accessing AlexaAPI: An exception of type AlexapyLoginError occurred. Arguments: (‘Login error detected; not contacting API’,)“”“”

Same problem here in Germany. Please fix.

I tried to uninstall and reinstall and now I’m in a endless loop on the Amazon Login website during setup.

Same issue after 20/30 min -> “All devices unavailable”

i try time polling to 500 , but don’t work

HA core 2024.9.2 AMP 4.13.2