alandtse / alexa_media_player

This is a custom component to allow control of Amazon Alexa devices in Home Assistant using the unofficial Alexa API.
Apache License 2.0
1.44k stars 277 forks source link

Endless authentication requests for EU domains due to 500 error #1701

Closed KC-inDomus closed 2 years ago

KC-inDomus commented 2 years ago

Describe the bug An endless request of auth is happening on AMP @amazon.it.

Alexa Media Reauthentication Required
Reauthenticate [](mailto:omissis) on the [Integrations](https://omissis:8123/config/integrations) page. Relogin required after 0:00:13.833459 and 15 api calls.

To Reproduce

System details

Logs alexaapi.get_state((<alexapy.alexaapi.AlexaAPI object at 0x7f8ced65f070>,), {}): An error occured accessing AlexaAPI: An exception of type AlexapyLoginError occurred. Arguments: ('Login error detected; not contacting API',)

Additional context Started a couple of days ago.

donpearson commented 2 years ago

Got the same problem as well as of today. I’ve tried at left 10 times now and still not authenticating …

jamesw4 commented 2 years ago

Same - just seems to have started today or yesterday.

andybali commented 2 years ago

Same here (amazon.de) Since yesterday in different time intervals. Until yesterday everything was fine, no changes done from my side Webaufnahme_4-9-2022_9473

neildsb commented 2 years ago

+1,

3 times today within ~30mins or so

serlinGi commented 2 years ago

same problem from last night, "not contacting API". (amazon.it)

Averall14 commented 2 years ago

I've been having the same problem for 2 days

Scialla commented 2 years ago

Same problem here, require relogin everyday

legi1 commented 2 years ago

caught me as well, tried new setup, no success.

CMDR-Sloma commented 2 years ago

Same problem here too, started yesterday evening.

Freddyfux commented 2 years ago

Same problem here.

cricolo commented 2 years ago

Same problem

thorrrr commented 2 years ago

HI Guys Same issue i have read docs and was trying to find the config page to remove alexa_media.(email).pickle. But i cannot find it on my system i have checked the custom integrations folder and looked in Alexa Media folder anybody tell me where it is please ?

gladiangel commented 2 years ago

Idem stesso problema!

jtizzel commented 2 years ago

Same problem here, via UK Amazon

flex1996 commented 2 years ago

Same Problem here in germany

Averall14 commented 2 years ago

Addendum, since this morning I have to re-authenticate every 5-10 minutes. Not nice. (Germany)

DJBenson commented 2 years ago

Same here, UK.

gladiangel commented 2 years ago

La mia autenticazione dura pochi secondi. Mi chiede di riautenticare abbastanza immediatamente. [amazon.it]

esatto ...stessa cosa anche a me!!speriamo che risolvono presto

candrea77 commented 2 years ago

same here! +1

BettySwallocks commented 2 years ago

My .co.uk authentication needs re-doing every few hours. If I do re-authenticate then I get a duplicate integration entry for Alexa Media Player each time in my integrations list, with no apparent option to remove/delete other than to re-authenticate for every duplicate entry to clear.

atlaspl commented 2 years ago

Same problem

walterb65 commented 2 years ago

every 5 to 10 mins here for amazon.de, after re-authenticate the integration show up twice.

Home Assistant 2022.8.7 Supervisor 2022.08.5 Operating System 8.5 Frontend 20220802.0 - latest

jjvelar commented 2 years ago

Same in Spain.

kompre commented 2 years ago

same.

johnbubak commented 2 years ago

😭

quentinn commented 2 years ago

Same here; started two days ago. It works one time (for example trigger an annoucement) and then requests another authentication

LeoCal commented 2 years ago

Same here. Even after triggering a re-auth manually, it requires a re-authentication after a few minutes. :-(

figorr commented 2 years ago

Since last night. Same error. I removed the integration, removed the repository and restarted HA.

After this I downloaded again the repo, restarted HA, reinstalled the integration and configured it with the 2FA. The integration showed that it is ok but then ... after a while ask to reconfigure it again.

Friedi1970 commented 2 years ago

Same here. After reauth it takes 2 or 3 minutes and then it’s again to reauth.

LeoCal commented 2 years ago

It must be a server side issue then. Quoting the component documentation:

This is a custom component to allow control of Amazon Alexa devices in Homeassistant using the unofficial Alexa API. Please note this mimics the Alexa app so Amazon may cut off access at anytime.

Hopefully this has not happened and it's simply an intermittent issue...

Friedi1970 commented 2 years ago

It must be a server side issue then. Quoting the component documentation:

This is a custom component to allow control of Amazon Alexa devices in Homeassistant using the unofficial Alexa API. Please note this mimics the Alexa app so Amazon may cut off access at anytime.

Hopefully this has not happened and it's simply an intermittent issue...

Could also be that something had been changed server side and to be changed within the API. And “anytime” does not mean every time 🙄

LeoCal commented 2 years ago

It must be a server side issue then. Quoting the component documentation:

This is a custom component to allow control of Amazon Alexa devices in Homeassistant using the unofficial Alexa API. Please note this mimics the Alexa app so Amazon may cut off access at anytime.

Hopefully this has not happened and it's simply an intermittent issue...

Could also be that something had been changed server side and to be changed within the API. And “anytime” does not mean every time 🙄

Right, it might be a sever side change that needs a corresponding counterpart change on the client side.

Friedi1970 commented 2 years ago

I did it once again and switched on extended debugging and got the following:

Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht

Logger: alexapy.helpers
Source: custom_components/alexa_media/media_player.py:618 
Integration: Alexa Media Player (documentation, issues) 
First occurred: 12:03:10 (8 occurrences) 
Last logged: 12:03:11

alexaapi.get_state((<alexapy.alexaapi.AlexaAPI object at 0x7f5f505270>,), {}): A login error occured: An exception of type JSONDecodeError occurred. Arguments: ('Expecting value: line 1 column 1 (char 0)',)
alexaapi.get_state((<alexapy.alexaapi.AlexaAPI object at 0x7f5f505c00>,), {}): A login error occured: An exception of type JSONDecodeError occurred. Arguments: ('Expecting value: line 1 column 1 (char 0)',)
alexaapi.get_state((<alexapy.alexaapi.AlexaAPI object at 0x7f60e1bf10>,), {}): A login error occured: An exception of type JSONDecodeError occurred. Arguments: ('Expecting value: line 1 column 1 (char 0)',)
alexaapi.get_state((<alexapy.alexaapi.AlexaAPI object at 0x7f60e2b160>,), {}): A login error occured: An exception of type JSONDecodeError occurred. Arguments: ('Expecting value: line 1 column 1 (char 0)',)
alexaapi.get_state((<alexapy.alexaapi.AlexaAPI object at 0x7f73ba1930>,), {}): A login error occured: An exception of type JSONDecodeError occurred. Arguments: ('Expecting value: line 1 column 1 (char 0)',)

Maybe helpful.

ciutty commented 2 years ago

I have the same problem, for 2 days; I tried to restore the system a few days before the problem arose but to no avail.

bwrex commented 2 years ago

Same here

H0d0rKF commented 2 years ago

Me too, same Problem

energywave commented 2 years ago

Same here, Amazon.it seems like json reply is different from expected. It seems a server side change that require a patch in this integration.

liuk4friends commented 2 years ago

Same here in Italy. This below is from my Log Viewer:

  File "/usr/local/lib/python3.10/site-packages/alexapy/alexaapi.py", line 173, in _request
    raise AlexapyLoginError("Login error detected; not contacting API")
alexapy.errors.AlexapyLoginError: Login error detected; not contacting API
MadD0c commented 2 years ago

I ahve had this issue for the last 3 days. I am on amazon.co.uk in ireland. This issue #1697 appears the same. I have reverted back through to 4.0 but still get the issue. So appears to be on Amazon's side. Looking through the comments it appears to be only affecting those connecting to European Servers??

tfranger commented 2 years ago

Same here; started 3 days ago.

tempus2016 commented 2 years ago

Exactly the same issue over the last few days.

Logger: alexapy.helpers
Source: runner.py:119
First occurred: 11:41:55 (3 occurrences)
Last logged: 11:43:08

alexaapi.next((<alexapy.alexaapi.AlexaAPI object at 0x7f7fd00a00>,), {}): An error occured accessing AlexaAPI: An exception of type AlexapyLoginError occurred. Arguments: ('Login error detected; not contacting API',)
alexaapi.pause((<alexapy.alexaapi.AlexaAPI object at 0x7f7fd00a00>,), {}): An error occured accessing AlexaAPI: An exception of type AlexapyLoginError occurred. Arguments: ('Login error detected; not contacting API',)
Logger: homeassistant
Source: /usr/src/homeassistant/homeassistant/runner.py:96
First occurred: 11:41:55 (3 occurrences)
Last logged: 11:43:08

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/alexapy/helpers.py", line 141, in wrapper
    return await func(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/alexapy/alexaapi.py", line 1040, in next
    await self.set_media({"type": "NextCommand"})
  File "/usr/local/lib/python3.10/site-packages/alexapy/alexaapi.py", line 1024, in set_media
    await self._post_request(
  File "/usr/local/lib/python3.10/site-packages/alexapy/alexaapi.py", line 203, in _post_request
    return await self._request("post", uri, data)
  File "/usr/local/lib/python3.10/site-packages/backoff/_async.py", line 133, in retry
    ret = await target(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/alexapy/alexaapi.py", line 173, in _request
    raise AlexapyLoginError("Login error detected; not contacting API")
alexapy.errors.AlexapyLoginError: Login error detected; not contacting API
CelestinoMarini commented 2 years ago

Same....I've been having the same problem for 2 days

mash727 commented 2 years ago

Problem is the same for myself in Germany

stalakerob commented 2 years ago

I also had issues. I deleted the integration and added it again. During amazon authentication I'm getting a "500 Internal Server Error". Cannot add the integration. I'm on amazon.de.

KreonNoerk1987 commented 2 years ago

Same here

marceskenazi commented 2 years ago

Same here in the UK. Started about 2 days ago. Now it's got worse and only stays configured for about 10 minutes.

robertwigley commented 2 years ago

Same here. amazon.co.uk.

benjamingros69 commented 2 years ago

Sale for me, Amazon.fr. Have to keep logging for 2 days now.

LindsayReid commented 2 years ago

Have been having this problem for a few days. Seems that I can only get a "one shot" auth reset before it needs re authing. I am sure the devs are looking at the problem but it is really annoying that part of my HA no longer works. UK

itsboo07 commented 2 years ago

we all are in same boat ....we might need some fix soon