snapcast icon indicating copy to clipboard operation
snapcast copied to clipboard

spotify not working anymore

Open grosseskino opened this issue 1 year ago • 2 comments

For a couple of days snapserver on raspberry pi 3 with spotify stopped working. Today I had spare time to look further into the issue.

When I try to play songs on snapcast, the tracks are skipping and no music is played.

that keeps on for a long time. were there any updates to the spotify encryption? haven't updated the pi for a long time as everything was working fine :/

I turned on debug on snapserver and here's the log:

Aug  9 22:31:29 hass snapserver[587]: Frame has 53 tracks
Aug  9 22:31:29 hass snapserver[587]: command=Load(SpotifyId { id: 172499255624876055795394383849597485597, audio_type: Track }, true, 8806)
Aug  9 22:31:29 hass snapserver[587]: Loading <Sleeping Satellite> with Spotify URI <spotify:track:3WSyYBhLZRLbQo2tJgFvSR>
Aug  9 22:31:29 hass snapserver[587]: new AudioKeyManager
Aug  9 22:31:29 hass snapserver[587]: Downloading file 251e68e189ce5e94496bffa14ce479f83899d503
Aug  9 22:31:29 hass snapserver[587]: new ChannelManager
Aug  9 22:31:29 hass snapserver[587]: channel error: 2 1
Aug  9 22:31:29 hass snapserver[587]: Unable to load encrypted file.
Aug  9 22:31:29 hass snapserver[587]: getNextMessage: Time, size: 8, id: 9462, refers: 0
Aug  9 22:31:29 hass snapserver[587]: onMessageReceived: Time, size: 8, id: 9462, refers: 0, sent: 2471967,77930, recv: 53,432241
Aug  9 22:31:29 hass snapserver[587]: Unable to load <SpotifyId { id: 172499255624876055795394383849597485597, audio_type: Track }>
Aug  9 22:31:29 hass snapserver[587]: (SPOTIFY) Skipping to next track
Aug  9 22:31:29 hass snapserver[587]: At track 1 of 53 <"spotify:playlist:51fVldz1yp6VNjQj5XRqZp"> update [false]
Aug  9 22:31:29 hass snapserver[587]: command=Load(SpotifyId { id: 182939448841248615583457118748295152310, audio_type: Track }, true, 0)
Aug  9 22:31:29 hass snapserver[587]: unknown subscription uri=social-connect/v2/session_update
Aug  9 22:31:29 hass snapserver[587]: unknown subscription uri=social-connect/v2/session_update
Aug  9 22:31:29 hass snapserver[587]: Loading <Don't Stop Believin'> with Spotify URI <spotify:track:4bHsxqR3GMrXTxEPLuK5ue>
Aug  9 22:31:29 hass snapserver[587]: Downloading file 8d4313a476a8b09a6c0165dc533867deba7d4865
Aug  9 22:31:29 hass snapserver[587]: channel error: 2 1
Aug  9 22:31:29 hass snapserver[587]: Unable to load encrypted file.
Aug  9 22:31:29 hass snapserver[587]: Unable to load <SpotifyId { id: 182939448841248615583457118748295152310, audio_type: Track }>
Aug  9 22:31:29 hass snapserver[587]: (SPOTIFY) Skipping to next track
Aug  9 22:31:29 hass snapserver[587]: At track 2 of 53 <"spotify:playlist:51fVldz1yp6VNjQj5XRqZp"> update [false]
Aug  9 22:31:29 hass snapserver[587]: command=Load(SpotifyId { id: 132281762222030684086981812643668530674, audio_type: Track }, true, 0)
Aug  9 22:31:29 hass snapserver[587]: Loading <Blue Monday '88> with Spotify URI <spotify:track:31MOjWj3CT3dCQsMV2b8Wu>
Aug  9 22:31:29 hass snapserver[587]: Downloading file 7a0798af441f7355ba82f1f4ea373badbc9dc4df
Aug  9 22:31:29 hass snapserver[587]: channel error: 2 1
Aug  9 22:31:29 hass snapserver[587]: Unable to load encrypted file.
Aug  9 22:31:29 hass snapserver[587]: Unable to load <SpotifyId { id: 132281762222030684086981812643668530674, audio_type: Track }>
Aug  9 22:31:29 hass snapserver[587]: (SPOTIFY) Skipping to next track

Environment details

  • OS: Raspbian GNU/Linux 10 (buster)
  • snapserver v0.26.0 (rev e30a9f33)

grosseskino avatar Aug 09 '22 21:08 grosseskino

From where did you take these logs? This format looks unknown to me Aug 9 22:31:29 hass snapserver[587]: Please start librespot from command line and check if it is working and update to the latest librespot version. If it's not working, open a bug at librespot. I'm using librespot-java for the last two weeks, which is working. This is no recommendation to switch to librespot-java, but only an evaluation of mine.

badaix avatar Aug 10 '22 06:08 badaix

This might be https://github.com/librespot-org/librespot/issues/972

You should ensure you are running the latest version of librespot (which you should always do before posting issues).

kingosticks avatar Aug 10 '22 06:08 kingosticks

so after some research i figured out that the spotify encryption has changed. previously i compiled librespot myself.

i now installed cargo: curl https://sh.rustup.rs -sSf | sh the the current librespot (0.4.2): cargo install librespot afterwards moved the binary:

mv /usr/bin/librespot /usr/bin/librespot-old
cp /root/.cargo/bin/librespot /usr/bin/librespot

and it works :)

(the logs were from syslog)

grosseskino avatar Aug 12 '22 14:08 grosseskino

News to me but glad it works

kingosticks avatar Aug 12 '22 18:08 kingosticks