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

AlexapyLoginError("Login error detected; not contacting API") #2646

Open
francesco3395 opened this issue Oct 24, 2024 · 3 comments
Open

AlexapyLoginError("Login error detected; not contacting API") #2646

francesco3395 opened this issue Oct 24, 2024 · 3 comments

Comments

@francesco3395
Copy link

Describe the bug

Less than 15 minutes after configuration/reconfiguration, Alexa devices stop working

To Reproduce

  1. Set up the integration
    1.1 set up your email
    1.2 set password
    1.3 set the Amazon URL: amazon.it
    1.4 set local URL: 192.168.1.XX:8123
    1.5 set the 2FA secret: 32 character string without spaces from the 2FA setup page of amazon.it
    1.6 enter the number generated by the integration on the amazon.it settings page
    1.6 login with username and password
    1.7 enter the 2FA code
    1.8 setup complete
  2. Alexa tts tests (works)
action: notify.alexa_media_echo_show_xx
data:
  message: Ciao
  data:
    type: tts
  1. wait 15 minutes
  2. test alexa tts (not works)
action: notify.alexa_media_echo_show_xx
data:
  message: Ciao
  data:
    type: tts

Expected behavior

Echo dot/show say : Ciao

System details

  • Home Assistant version: 2024.9.3
  • alexa_media version (from const.py or HA startup log): 4.13.5
  • alexapy version (from pip show alexapy in homeasssistant container or HA startup log): 1.29.3
  • 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.
2024-10-24 16:59:28.739 WARNING (MainThread) [alexapy.helpers] alexaapi.run_behavior((<alexapy.alexaapi.AlexaAPI object at 0x7fa3c7516c30>, {'@type': 'com.amazon.alexa.behaviors.model.OpaquePayloadOperationNode', 'type': 'Alexa.Speak', 'operationPayload': {'deviceType': 'XXXXXXXXXXXXXXX', 'deviceSerialNumber': 'XXXXXXXXXXXXX', 'locale': 'it-it', 'customerId': 'XXXXXXXXXXXXX', 'textToSpeak': 'Ciao', 'target': {'customerId': 'XXXXXXXXXXXXXXX', 'devices': [{'deviceSerialNumber': 'XXXXXXXXXXXXXXXX', 'deviceTypeId': 'XXXXXXXXXXXXXXX'}]}, 'skillId': 'amzn1.ask.1p.saysomething'}}), {'queue_delay': 1.5}): An error occurred accessing AlexaAPI: An exception of type AlexapyLoginError occurred. Arguments:
('Login error detected; not contacting API',)
2024-10-24 16:59:28.739 WARNING (MainThread) [alexapy.helpers] alexaapi.send_sequence((<alexapy.alexaapi.AlexaAPI object at 0x7fa3c7516c30>, 'Alexa.Speak'), {'customer_id': 'XXXXXXXXXXXXX', 'textToSpeak': 'Ciao', 'target': {'customerId': 'XXXXXXXXXXXXXXXXX', 'devices': [{'deviceSerialNumber': 'XXXXXXXXXXXXXX', 'deviceTypeId': 'XXXXXXXXXXXXXXX'}]}, 'skillId': 'amzn1.ask.1p.saysomething', 'queue_delay': 1.5}): An error occurred accessing AlexaAPI: An exception of type AlexapyLoginError occurred. Arguments:
('Login error detected; not contacting API',)
2024-10-24 16:59:28.739 WARNING (MainThread) [alexapy.helpers] alexaapi.send_tts((<alexapy.alexaapi.AlexaAPI object at 0x7fa3c7516c30>, 'Ciao'), {'customer_id': 'XXXXXXXXXXXX', 'queue_delay': 1.5}): An error occurred accessing AlexaAPI: An exception of type AlexapyLoginError occurred. Arguments:
('Login error detected; not contacting API',)
2024-10-24 16:59:28.740 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/alexapy/helpers.py", line 137, in wrapper
return await func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/alexapy/alexaapi.py", line 889, in send_tts
await self.send_sequence(
File "/usr/local/lib/python3.12/site-packages/alexapy/helpers.py", line 137, in wrapper
return await func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/alexapy/alexaapi.py", line 512, in send_sequence
await self.run_behavior(node_data, queue_delay=queue_delay)
File "/usr/local/lib/python3.12/site-packages/alexapy/helpers.py", line 137, in wrapper
return await func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/alexapy/alexaapi.py", line 434, in run_behavior
await self._post_request("/api/behaviors/preview", data=data)
File "/usr/local/lib/python3.12/site-packages/alexapy/alexaapi.py", line 226, in _post_request
return await self._request("post", uri, data, query)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/backoff/_async.py", line 151, in retry
ret = await target(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/alexapy/alexaapi.py", line 199, in _request
raise AlexapyLoginError("Login error detected; not contacting API")
alexapy.errors.AlexapyLoginError: Login error detected; not contacting API

@francesco3395
Copy link
Author

Not having found a solution or a thread where this problem has been solved I open this new thread to trace or understand how to solve this problem.

@francesco3395
Copy link
Author

francesco3395 commented Oct 24, 2024

Same problem when trying version 4.13.2

@francesco3395
Copy link
Author

I tried to remove the pooling and everything seems to work
image

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

No branches or pull requests

1 participant