Alexa Media Player failing at startup

Hi I have a fair amount of Alexa devices connected to Home Assistant. It’s worked perfectly for a long time. After a reboot completes, I can go to the Integration and “reload” it wth no problems. Unfortunately any of my scripts using Alexa devices also pop up as an error since the integration didn’t do its thing. Log captured below. Any ideas?

Logger: homeassistant.config_entries
Source: config_entries.py:586
First occurred: 2:17:07 PM (1 occurrences)
Last logged: 2:17:07 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 586, 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/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’

1 Like

FYI

Also, this error in your post will persist. The current easy solution is to make an automation that reloads the integration 15 to 20 seconds after HA starts up.

Lastly, Alexa Media Player appears to be completely broken in the next release of HA (2024.8). And due to the lack of developers for Alexa Media Player, it’s likely this custom integration will die as a result.

2 Likes

I’m experiencing the same issue which began after I installed HA 2024.8.

I tried uninstalling and reinstalling the integration but now I can’t even complete the configuration.
I’m getting the error: “Alexa Media Player failed to login.” in the last step.

Any suggestions? Is there an alternative to Alexa Media Player?

1 Like

Check out the github page and it’s issues. Find out which issue you’re having and see what’s said in the comments.

Nope

Thank you.
The workaround / temporary manual fix described here solved the issue!

Alexa Media Player still lives :slight_smile:

From the GitHub chat…

Use Studio Code Server to edit the /homeassistant/custom_components/alexa_media/manifest.json file, so that the “requirements” line reads…

“requirements”: [“alexapy>=1.28.2”, “packaging>=20.3”, “wrapt>=1.14.0”],

Then re-start HA and try to create a new configuaration. I tried this, and it worked!

If it might be helpful, this post has a fix that got Alexa Media Player working for me again with HA 2024.8.0. To recap the fix:

  1. First, using Visual Studio Code (or any other file editor of your choice), open this file:
    /homeassistant/custom_components/alexa_media/manifest.json

  2. Then, locate the line within that file that says requirements: and change that line to this:
    "requirements": ["alexapy>=1.28.2", "packaging>=20.3", "wrapt>=1.14.0"],

  3. Then reboot Home Assistant.

PS Full credit to sca075 within that issue thread for this. :raised_hands:t2:

6 Likes

Same issue also for me (on amazon.it domain).
The integration works for few minutes after “reinstalling” it.
Then nothing appears weird but the integration stops to work.
If I “reload” the integration the cycle repeats (ok for mins, ko after).

All since 2024.8 HA ver.
Some news from dev ?

What dev?

Alexa media player is on life support. There is no dev.

Okay, can someone explain this to me? Having Alexa devices announce things to me is core to my alerting strategy, and I assume many others.
If this integration is all but abandoned, what’s next? Are there so few who use the media player integration for voice announcements? Are there other solid ways to have Echo devices speak notifications to us?

2 Likes

I also rely on echos for voice notifications around the house…cheap and great devices. Easy integration with alexa is the main reason I pay subscription to Nabucasa as well…I know it is only part of it and the custom “alexa media player” is needed but I would assume either an official integration or maintenance of the custom one would be granted since it is most likely something a lot of people use…I doubt people are willing to invest on other speakers if they already have alexa like it is my case…
I am not IT apart from very simple things with HA but seriously this “alexa issue” is not in the TOP priority for the HA team and community?

2 Likes

No, it is not a priority at all for the HA team because the integration you are referring to is not part of HA core. No one in the HA team is responsible for this custom integration.

As for the community, an attempt has been made here to find another suitable person to maintain the integration here, but no one seems to have taken on the challenge so far, and I don’t blame them.

Amazon is what it is - they will keep changing their API and will probably start charging for stuff which used to be free before. The devices were cheap because they thought they’d get lots of profits from people using them to order stuff from Amazon.
Well, they were wrong and it cost them something in the region of $25 billion in four years. Basically, if you own an echo, it’s living on borrowed time.

1 Like

It does seem that for such a major player in the computer world with so many millions of devices that HA would care enough to offer some sort of core support. So, what are the alternatives that are core supported by HA?

Well, in case you missed it, HA have been working on (and greatly improving) their own version called Assist since the beginning of 2023.

ah ok, so there’s no developers at all ?
code has been created from magic ? :slight_smile:

The main developer stopped writing code for it in January 2024. All the magic you’re talking about is random people making small fixes. The integration and it’s upstream library needs a complete overhaul, which is a massive undertaking. I.e. A main developer is needed.

Please take the time to read the post I linked above, it explains everything.

1 Like

got it ! (just read the doc/announce)
sad to hear that (but I can understand her/him), hope someone will get code to review/reengineer it

At the moment, it has worked for me. Many thanks!