music-assistant-server

Branch:dev-lidarr-plugin

Commit Details

Fix Spotify not loading after updating to 2.10 (#6065)

After updating to 2.10, Spotify stops loading with "Spotify playback
authorization required", even on an account that was fully set up and
working before. Playback is dead and every queue request returns "No
playable items found". Running the Spotify setup again fixes it, which
is why this looks like an ordinary re-authentication prompt.

2.10 moved provider credentials out of the plain config values into
`setup_data`, and a one-off migration moves them across on the first
start. That migration skipped Spotify, so the credentials stayed where
2.9 wrote them, and the new code no longer looks there.

`setup()` still finds the global token, because
`seed_stored_config_values` exposes the stored values at that point, so
the load starts. `rehydrate_provider_config` then re-parses the config
against the declared config entries only, and none of the credentials
are declared entries any more, so they all drop out.
`LibrespotBackend.setup()` is the first to read one and raises.

The credentials themselves are never lost, so an install that already
hit this recovers on the next start without re-authenticating.

**Changes**

- The migration now moves Spotify's `refresh_token_global`, `refresh_token_dev`, `librespot_credentials`, `client_id` and `account_id` into `setup_data`.
- The deprecated `refresh_token` deliberately stays in `values`, because `_migrate_legacy_token` reads it from there during `setup()` and clears it afterwards.
- That same function now reads `client_id` from `setup_data` first, since the migration is what moved it.

**Related issue (if applicable):**

- https://github.com/music-assistant/support/issues/6208
Forgejo

Author

Kiegan Groot<[email protected]>
August 27, 2026 at 09:41 PM UTC

Committer

Marcel van der Veldt<[email protected]>
August 29, 2026 at 12:28 AM UTC
49additions
5deletions
4files changed

Parent commits

Changes

4 files
+49-5

Changed Files (4)

music_assistant/controllers/config/
music_assistant/providers/spotify/
tests/controllers/config/
tests/providers/spotify/
music_assistant/controllers/config/migrations.py
+4-2
music_assistant/providers/spotify/__init__.py
tests/controllers/config/test_migrations.py
tests/providers/spotify/test_setup.py
+45-3