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

Alexa Media Player fails to start after restarting HA 2024.6.3 #2290

Open
macroysan opened this issue Jun 19, 2024 · 7 comments
Open

Alexa Media Player fails to start after restarting HA 2024.6.3 #2290

macroysan opened this issue Jun 19, 2024 · 7 comments

Comments

@macroysan
Copy link

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

To Reproduce

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

Screenshots

System details

  • Home-assistant (version):
  • alexa_media (version from const.py or HA startup):
  • alexapy (version from pip show alexapy or HA startup):
  • Amazon 2FA is enabled (y/n). <!---We will not debug login issues if unanswered--->:

Logs
Please provide logs.

Additional context

@DanrwAU
Copy link

DanrwAU commented Jun 22, 2024

Seeing similar issues with failing to start.

Restarting does fix it

2024-06-22 12:39:07.053 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry myemail - amazon.com.au for alexa_media
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 594, in async_setup
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/alexa_media/__init__.py", line 335, in async_setup_entry
await login.login(cookies=await login.load_cookie())
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/alexapy/alexalogin.py", line 328, in load_cookie
cookies = pickle.loads(await myfile.read())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/http/cookies.py", line 312, in __setitem__
raise CookieError("Invalid attribute %r" % (K,))
http.cookies.CookieError: Invalid attribute 'partitioned'

@jum0n
Copy link

jum0n commented Jun 22, 2024

Mine fails after every HA restart. If I manually restart later, it works until the next restart then fails to start again. Is that the same behavior each of you have?

@Menz01
Copy link

Menz01 commented Jun 22, 2024

for me... every time I restart HA it shows failed but if i go to the integration and click reload, it starts working

@TarheelGrad1998
Copy link

Same issue, with the partitioned error. As a workaround, I have implemented an automation that fixes it for now (below, replace with one of your Alexa media players).

alias: "Alexa Media: Keep Online"
description: ""
trigger:
  - platform: state
    entity_id:
      - media_player.den_echo
    to: unavailable
    for:
      hours: 0
      minutes: 1
      seconds: 0
action:
  - service: homeassistant.reload_config_entry
    target:
      entity_id: media_player.den_echo
    data: {}
mode: single

@bozzobrain
Copy link

Same issue here. Restart HA and Alexa Media Player failed to setup. Reloading the integration appears to permanently fix the setup until the next restart of HA.

Log

Logger: homeassistant.config_entries
Source: config_entries.py:594
First occurred: 2:08:55 PM (1 occurrences)
Last logged: 2:08:55 PM

Error setting up entry [email protected] - amazon.com for alexa_media
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 594, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/alexa_media/__init__.py", line 335, in async_setup_entry
    await login.login(cookies=await login.load_cookie())
                              ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/alexapy/alexalogin.py", line 328, in load_cookie
    cookies = pickle.loads(await myfile.read())
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/http/cookies.py", line 312, in __setitem__
    raise CookieError("Invalid attribute %r" % (K,))
http.cookies.CookieError: Invalid attribute 'partitioned'

@simonk1969
Copy link

simonk1969 commented Jun 22, 2024

Isn't this a duplication of #2288 ?

@danielbrunt57
Copy link

Isn't this a duplication of #2288 ?

Yes it is.

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

8 participants