Fix slow Home Assistant logins when a provider fails to finish loading - #5455
Merged
Conversation
Contributor
|
✅ The title and description are good to go. Thanks! |
A provider whose loaded_in_mass() raised stayed registered and available but never got its ready event set, so every caller waiting for it paid the full timeout - forever. Home Assistant ingress logins wait on it twice per connection, which is the reported 10+ seconds per page load. The Home Assistant provider walked into this whenever its player control settings held a value that is not an entity ID (a leftover from an earlier config): Home Assistant refuses the whole state subscription over one bad entity ID, so registering the controls failed and took the ready signal down with it. - signal a provider as initialized/ready even when a post load step failed, since it stays registered and available either way - drop values that are not entity IDs from the Home Assistant player control settings, logging which one was ignored Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0175XDPLyskM4cJN5j41sgtS
OzGav
force-pushed
the
claude/github-issue-6003-o8zuss
branch
from
August 7, 2026 15:08
f1c7611 to
de5d698
Compare
OzGav
force-pushed
the
claude/github-issue-6003-o8zuss
branch
from
August 8, 2026 09:51
de5d698 to
475c9b4
Compare
Signalling the provider as ready from a finally block re-raised right after, so the steps behind it never ran: no discovery pass (which is where player providers discover their players) and no default name persisted. The failure also surfaced only as the generic task warning, which names the coroutine rather than the provider. Report the failure against the provider it belongs to and carry on with the remaining steps instead. A cancellation still propagates, so a teardown mid load leaves the provider unannounced. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0175XDPLyskM4cJN5j41sgtS
OzGav
force-pushed
the
claude/github-issue-6003-o8zuss
branch
from
August 8, 2026 09:59
475c9b4 to
361b639
Compare
MarvinSchenkel
approved these changes
Aug 8, 2026
MarvinSchenkel
left a comment
Contributor
There was a problem hiding this comment.
Nice find, thanks @OzGav
MarvinSchenkel
enabled auto-merge (squash)
August 8, 2026 10:45
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this implement/fix?
A provider whose loaded_in_mass() raised stayed registered and available but never got its ready event set, so every caller waiting for it paid the full timeout - forever. Home Assistant ingress logins wait on it twice per connection, which is the reported 10+ seconds per page load.
The Home Assistant provider walked into this whenever its player control settings held a value that is not an entity ID (a leftover from an earlier config): Home Assistant refuses the whole state subscription over one bad entity ID, so registering the controls failed and took the ready. signal down with it.
Related issue (if applicable):
Types of changes
bugfixnew-featureenhancementnew-providerbreaking-changerefactordocumentationmaintenancecidependenciesChecklist
pre-commit run --all-filespasses.pytestpasses, and tests have been added/updated undertests/where applicable.music-assistant/modelsis linked.music-assistant/frontendis linked.