-
Notifications
You must be signed in to change notification settings - Fork 289
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 initialize after restarting HA 2024.6.3 due to partitioned cookie #2288
Comments
Seeing the same thing.
|
Mine does't work even after reloading it. |
I have the same issue, I need to manually reload integration after each restart, reload seems to work each time. |
Same issue. Reloading works for me too. |
My workaround for now is this automation:
|
Please note this has been in the FAQ for years. https://github.com/alandtse/alexa_media_player/wiki/FAQ#modulenotfounderror-no-module-named-alexapy |
But now it's happening on every restart ever since the upgrade. That FAQ entry only mentions "on upgrade". Implying the first time. Not every time. |
I removed the pickle file from .storage, removed the integration, re-added and it's working fine. From the FAQ:
@quietsnow FYI |
I followed your link and...
I removed the pickle file, removed and re-installed the integration but my problem after HA restart still exists...
|
i'm facing the same issue here |
Yeah please re-open this issue. It's not a 1 time occurrence anymore and is every restart. |
I also have this issue. The integration fails to start every time I restart HA. And it succeed to load by reloading the integration. The error is always
The issue started about 1-2 weeks ago. I never experienced this before. |
Hi all - same here
|
I just went back from HA 2014.6.3 to 2014.6.2 and it started up no problem |
I am also having this same issue. Using the automation work-around from danielbrunt57 until it's fixed. Thanks. |
same issue here...renaming old pickle file didnt help unfortunately |
For me, renaming the .pickle file and deleting the integration worked as this forced a re-authentication when adding the integration back in. Have not restarted since doing that so unsure if it's persistent. |
I just reverted to 2024.6.2 and confirm that it is working correctly. It's just 2024.6.3 that has the issue. |
If you're running 2024.6.3, the integration will fail to initialize after HA restarts. |
i have the same problem |
I just now re-upgraded to HA 2024.6.3 and after restarting the first time, Alexa Media Player initialized just fine but upon subsequent restarts is failing to initialize. |
It looks like PR #119621 did change the media_player platform to load earlier than it did in 2024.6.2. |
I don't think the media_player platform is at all related/relevant. |
I've found a solution which is working for me. My issue seems to be in alexapy which is using python 3.12. It's cookies.py does not define partitioned in the cookie dictionary, which for some reason is what my setup is encountering during first initialization after restart but not during a reload. I found this PR: gh-112713 : Add support for 'partitioned' attribute in http.cookies #112714 which has been approved for python 3.13 but hasn't been finalized yet and still has to go through several betas before official ETA release in October. This would seem to be needed now as MS Edge (my default browser) seems to already be creating partitioned cookies (CHIPS) and I've read that Google Chrome recently started rolling it out as well. First, edit
Then, in the homeassistant container, I replaced
My Alexa Media Player integration is now initializing first time, every time! |
cookies.py is an easy fix in docker, copy the updated cookies.py locally and mount the updated file readonly into the container:
|
I use HA OS. There is noch docker-compose.yml. |
Just edit manifest.json (custom_components/alexa_media folder) and replace in requirements field
Then restart HA Fix the issue for me (but if extension is updated, needed to be done again). |
***NEW DEVELOPMENT *** The cutoff for new features in Python 3.13 was at the beginning of the beta cycle on 2024-05-08. Python new features won't happen again now until 3.14 but the partitioned cookie PR might get looked at as "type-security/bug fix". In the midst of the above, I went hunting again and found a PR from 3 weeks ago for the Unifi add-on which which also has/had partitioned cookie trouble. That PR was Bump aiounifi to v80 #124004.
I added that code to alexapy/alexalogin.py and it eliminated the partitioned cookie error in |
I've managed to submit a clean MR to The code change is in the first 60 lines (up to
Basically, change:
|
alexapy version 1.29.2 is released and has resolved the partitioned cookie error!
|
@danielbrunt57 I'm not familiar with any manifest file. Where is that located and why does it need to be modified? I thought HACS handled updates for us. |
Everything working perfectly from one hour ago. |
custom_components/alexa_media folder |
Thanks; I was able to make that change. After this is done, should we expect to see an update in HACS (because I don't)? Sorry for the basic questions, I haven't had to customize HACS integrations like this yet. I appreciate the guidance. |
I just swapped the manifest file and am still getting errors, I think I'm missing #2288 (comment) but I don't understand it. Any chance these fixes can be rolled into a hacs update? |
@Krispkiwi What version is your |
Just rebuilding my HA now so it'll likely be a few hours before i can answer this but just to make sure I get you the correct information, where do I find this information once I have it back up? just the debug logs? |
Either:
|
@danielbrunt57 are you planning to bump alexapy too with your other PRs? That should close this issue. I'm holding off on the next release since I thought that was forecoming. |
So am I interpreting this correctly, if an RP is submitted now, we get the fix via the official release and no longer have to use workarounds here? If this is the case, I would like to save myself the manual work. Sorry if I'm perhaps asking stupid questions, but I haven't yet delved that deeply into the architecture of HA, as I'm actually only a user and not a developer ;) |
thx a lot!!!! |
I am running HA OS and it shows me in the log version 1.28.2? How can I update to 1.29.2? |
The fix will be included in the next release. |
Hello everyone, I decided to update HA from 2024.7.4 (where AMP was still working) to HA 2024.9.1. I removed AMP and its integration. After reinstalling the custom integration of AMP from HACS I can no longer install AMP. During the procedure it takes me back to the login site but nothing happens, just a continuous loop of email and password requests without being able to connect. I ask you to help me because I don't know what to do anymore. I also tried to follow some suggestions from @danielbrunt57 but to no avail. I modified the manifest file but nothing. I don't know what to do anymore and I find it very difficult to follow this topic because I'm not very practical with programming. |
Good evening, I installed a clean version of Home Assistant on another PC (intel nuc) and started the installation procedure of Alexa media player but I encountered the same problem that is the procedure brings me back to the login site but nothing happens, just a continuous cycle of email and password requests without being able to connect. Do you have any solution? |
|
@JackTalisker Thank you so much...I managed to solve it. @danielbrunt57 thanks to you too who always manage to find the problem. |
AMP 4.13.1 now requires |
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
Alexa Media Player is failing to initialize after restarting HA 2024.6.3. If I reload the integration, all is well.
To Reproduce
Restart Home assistant 2014.6.3 and observe that the integration failed to load.
Expected behavior
It should load like it did on 2024.6.2 and older.
Screenshots
System details
const.py
or HA startup): 4.10.2pip show alexapy
or HA startup):Logs
home-assistant_2024-06-17T13-08-27.618Z.log
Additional context
The text was updated successfully, but these errors were encountered: