-
Notifications
You must be signed in to change notification settings - Fork 291
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
Relogin required after reboot if 2 differents amazon accounts are setup #1098
Comments
Thanks. I've determined this is caused by a rate issue with hitting the Amazon servers too much at once and have a solution. However, the logic for connections wasn't changed in since 3.4.1 so I'm not sure how you're not seeing the same issue in 3.4.1. |
Can you please try the PR #1100 to see if it resolves the issue? |
Sure, but please, could you refresh me how procedure to test the PR? I remember that I have done at others times, but but I can't remember it now |
Sure, just replace the |
No luck. Similar behavior I guess. Steps taken:
Some logs to try to help. These after the relogin request at step 8:
And this one after relogin request at step 9: If a further test can be done, just tell me. |
Just a comment... The strange thing is that the relogin is required always for the 1st account and only if the second one is added. If the second acount is not added, then the first one works like a charm. And with 3.4.1 these not happens, and looks like the login procedure is faster, but this last could be only an assessment from me, no way to confirm. |
Can you provide startup logs showing the disconnect please? That's the part where I can see how many api calls are happening at the same time and causing the behavior. You should see both accounts setting up one after the other instead of interspersed. If it's interspersed, then you may not have replaced the |
I suppose that I have to set the debug mode or something similar to take the start up log? If yes, I remember I have to add something like this in the configuration file. It is still applicable?
|
The debug log is huge, so not sure if I can find the lines with relevant information. Anyway, I paste some lines that have caught my attention. If the complete log is relevant to investigate, let me know how I can send you, because is very large and also contain sensitive information to be paste here.
|
Yes, I do need to see the startup right before it detects an issue. I believe you've messaged me on Discord before. alandtse#5464. I've also updated the PR with another version. |
Signed-off-by: Alan Tse <[email protected]>
I can confirm this issue: I have two account, at every reboot I need to relogin. But this happens sometimes just like that, in normal use. I just login in homeassistant and I see alexa media player needs reauthentication. |
Describe the bug
Similar behavior than v.3.4.7 with issue #1082
With one account it seems that there is no problem. Then, when second account is added, it seems to work correctly. However, after reboot, relogin is required for the first account. No matter how many times you do it, always is required after reboot. As comment, it looks that a separate login is required per alexa device take into account the relogin bellow screenshot
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Credentials stored properly for more than one account
Screenshots
System details
const.py
or HA startup): 3.4.8pip show alexapy
or HA startup):Logs
Logger: alexapy.alexalogin Source: /usr/local/lib/python3.8/site-packages/alexapy/alexalogin.py:650 First occurred: 8:44:56 (1 occurrences) Last logged: 8:44:56 No access token found; falling back to credential login instead of oauth.
alexaapi.send_announcement((<alexapy.alexaapi.AlexaAPI object at 0x6786ace8>, 'Test'), {'customer_id': 'xxxx', 'targets': ['xxxx'], 'title': 'Home Assistant', 'method': 'all', 'queue_delay': 1.5}): An error occured accessing AlexaAPI: An exception of type AlexapyLoginError occurred. Arguments: ('Unauthorized',)
Logger: alexapy.helpers Source: /usr/local/lib/python3.8/site-packages/alexapy/helpers.py:153 First occurred: 8:51:14 (1 occurrences) Last logged: 8:51:14 alexaapi.get_notifications((<alexapy.alexalogin.AlexaLogin object at 0x70d539e8>,), {}): A login error occured: An exception of type JSONDecodeError occurred. Arguments: ('Expecting value: line 1 column 1 (char 0)',)
Logger: alexapy.helpers Source: /usr/local/lib/python3.8/site-packages/alexapy/helpers.py:187 First occurred: 8:51:14 (2 occurrences) Last logged: 8:51:14 alexaapi.get_activities((<alexapy.alexalogin.AlexaLogin object at 0x70d539e8>, 10), {}): An error occured accessing AlexaAPI: An exception of type AlexapyLoginError occurred. Arguments: ('Login error detected; not contacting API',) alexaapi.get_last_device_serial((<alexapy.alexalogin.AlexaLogin object at 0x70d539e8>,), {}): An error occured accessing AlexaAPI: An exception of type AlexapyLoginError occurred. Arguments: ('Login error detected; not contacting API',)
Logger: aiohttp.websocket Source: /usr/local/lib/python3.8/site-packages/alexapy/aiohttp/http_websocket.py:599 First occurred: 8:51:11 (1 occurrences) Last logged: 8:51:11 websocket connection is closing.
Logger: alexapy.helpers Source: /usr/local/lib/python3.8/site-packages/alexapy/helpers.py:187 First occurred: 8:51:14 (25 occurrences) Last logged: 8:52:10 alexaapi.get_state((<alexapy.alexaapi.AlexaAPI object at 0x68eb3400>,), {}): An error occured accessing AlexaAPI: An exception of type AlexapyLoginError occurred. Arguments: ('Login error detected; not contacting API',)
Alexa Media Reauthentication Required Reauthenticate [email protected] on the Integrations page. Relogin required after 0:01:01.411918 and 7 api calls.
Additional context
Domain ".es"
Rolling back to v3.4.1 and working properly with two accounts
The text was updated successfully, but these errors were encountered: