Skip to content

Spotify playback broken with newer accounts - "Did not get key for decrypting track" / librespot-c AP2 incompatibility #2007

Description

@mminklet

Spotify playback broken with newer accounts - "Did not get key for decrypting track" / librespot-c AP2 incompatibility

Hi, running OwnTone 29.2 on a Raspberry Pi 4 (Debian Trixie, 64-bit), also reproduced on a Pi 3B (Raspbian Bullseye). Spotify authentication succeeds fine via the web interface, playlists and tracks show up correctly in the library. However playback always fails immediately.

Platform

  • Raspberry Pi 4, Debian GNU/Linux 13 (Trixie), aarch64
  • Also reproduced on Raspberry Pi 3B, Raspbian Bullseye, armhf
  • OwnTone 29.2 (Docker image owntone/owntone:latest and owntone/owntone:staging, also apt-installed on Bullseye)

Steps to reproduce

  1. Fresh OwnTone install, authenticate with a Spotify Premium account created recently
  2. Add any track or playlist to the queue via the web interface or API
  3. Attempt playback — fails immediately, no audio output

Logs

[  LOG] [   library]  spotify: Logged into Spotify succesfully with username <redacted> (tcp mode)
[  LOG] [   library]  spotify: Spotify scan completed in 1 sec
[  LOG] [     input]  spotify: Error opening source: Did not get key for decrypting track
[  LOG] [     input]  spotify: Error opening source: Did not get key for decrypting track
[  LOG] [     input]  spotify: Error opening source: Cannot connect to access points, cooldown after multiple disconnects
[  LOG] [     input]  spotify: (LOGGING SKIPPED - above log message is repeating)
[  LOG] [    worker]  web: Error starting playback.
[  LOG] [    worker]  web: JSON api request failed with error code 500 (/api/player/play)

The account is a dedicated Spotify Premium account with no other active sessions. Restarting OwnTone, wiping the database, and re-authenticating makes no difference. The cooldown error appears to be a cascade from the repeated key failures rather than a genuine connection problem — network connectivity to Spotify's access points is confirmed working (port 443 and 4070 both reachable).

From what I can tell this is related to Spotify's AP2 protocol rollout breaking older librespot implementations - for NEW spotify accounts. The librespot issue and music-assistant describe the same root cause.

I realise that this is entirely dependant on upstream changes, I just wanted to open an issue that people could get to and hopefully track any potential fix when newer versions of librespot-c is implemented (if it's even possible)


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions