alexa_media_player: Integration can't load with 2024.8.0b0
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
The integration can’t load with HomeAssistant 2024.8.0b0 The following error will be logged:
Logger: homeassistant.config_entries
Quelle: config_entries.py:604
Erstmals aufgetreten: 07:00:02 (2 Vorkommnisse)
Zuletzt protokolliert: 07:00:29
Error setting up entry c*******h@c******e - amazon.de for alexa_media
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 604, in async_setup
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/alexa_media/__init__.py", line 353, in async_setup_entry
await login.login(cookies=await login.load_cookie())
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/alexalogin.py", line 643, in login
resp = await self._session.get(
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 481, in _request
raise RuntimeError("Session is closed")
RuntimeError: Session is closed
To Reproduce
- Go to ‘…’
- Click on ‘…’
- Scroll down to ‘…’
- See error
Expected behavior
System details
- Home-assistant (version):
- alexa_media (version from
const.pyor HA startup): - alexapy (version from
pip show alexapyor HA startup): - Amazon 2FA is enabled (y/n). <!—We will not debug login issues if unanswered—>:
Logs
2024-08-01 07:52:08.931 DEBUG (MainThread) [custom_components.alexa_media.helpers] c*******h@c******e: Returning uuid {'uuid': '60396035782f10e29d05ce91580cb2fe', 'index': 0}
2024-08-01 07:52:08.941 DEBUG (MainThread) [alexapy.alexalogin] Creating TOTP for 7************************************************KHQ
2024-08-01 07:52:08.941 DEBUG (MainThread) [alexapy.alexalogin] Generating OTP 1****7
2024-08-01 07:52:08.941 DEBUG (MainThread) [alexapy.alexalogin] Login created for c*******h@c******e - amazon.de
2024-08-01 07:52:08.941 ERROR (MainThread) [homeassistant] Error doing job: Unclosed client session (None)
2024-08-01 07:52:08.942 DEBUG (MainThread) [alexapy.alexalogin] Searching for cookies from /config/.storage/alexa_media.***@***.de.pickle
2024-08-01 07:52:08.942 DEBUG (MainThread) [alexapy.alexalogin] Searching for cookies from /config/alexa_media.c*******h@c******e.pickle
2024-08-01 07:52:08.942 DEBUG (MainThread) [alexapy.alexalogin] Searching for cookies from /config/.storage/alexa_media.***@***.de.txt
2024-08-01 07:52:08.943 DEBUG (MainThread) [alexapy.alexalogin] Using credentials to log in
2024-08-01 07:52:08.943 WARNING (MainThread) [alexapy.helpers] alexalogin.login((<alexapy.alexalogin.AlexaLogin object at 0x7fed1c4a1df0>,), {'cookies': {}}): An error occurred accessing AlexaAPI: An exception of type RuntimeError occurred. Arguments:
('Session is closed',)
2024-08-01 07:52:08.943 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry c*******h@c******e - amazon.de for alexa_media
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 604, in async_setup
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/alexa_media/__init__.py", line 353, in async_setup_entry
await login.login(cookies=await login.load_cookie())
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/alexalogin.py", line 643, in login
resp = await self._session.get(
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 481, in _request
raise RuntimeError("Session is closed")
RuntimeError: Session is closed
Additional context
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 10
- Comments: 25 (11 by maintainers)
raised a ticket there: https://gitlab.com/keatontaylor/alexapy/-/issues/30
You could also Support and provide some more Details, such as Error Logs…
Hello! I have updated all components of my Home Assistant setup, but the Alexa media player integration is still not functioning correctly. Here are the current versions I’m running:
Core: 2024.8.0b3 Supervisor: 2024.08.0 Operating System: 12.4 Python: 3.12.3
I’m on 2024.8.0b1 and it’s not working for me. Not with 4.12.1 nor with the latest update 4.12.4
And yes, still Python 3.12 afaik
Interesting update, the beta is working for me. Without the automation restart fix. Maybe we don’t have to do anything, it’s possible the last beta in combination with the updates to AMP fixed everything naturally.