Skip to content
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

spotifyd keeps skipping to next song without playing anything #1299

Open
PierreRust opened this issue Sep 3, 2024 · 15 comments
Open

spotifyd keeps skipping to next song without playing anything #1299

PierreRust opened this issue Sep 3, 2024 · 15 comments
Labels
bug A functionality or parts of a program that do not work as intended

Comments

@PierreRust
Copy link

Description

For a few days spotifyd does not play any song (it's been working flawlessly for years) and instead keeps jumping to the next song in the queue. When looking at the logs, it complains about failing to load the track.

A quick search show that raspotify (dtcooper/raspotify#670 ) and librespot (librespot-org/librespot#1322) have the same issue, which is linked to a change on spotify side.
A fix has already been implemented in the dev branch, so it just switching to that branch might do the trick.

To Reproduce

Simply trying to play any song.

Expected behavior

Logs

Click to show logs
Skipping to next track, unable to load track <SpotifyId { id: 69833159059242552919549488751628926202, audio_type: Track }>: ()
At track 9 of 50 <"spotify:playlist:37i9dQZF1EVJHK7Q1TBABQ"> update [false]
Sending status to server: [kPlayStatusPlay]
command=Load(SpotifyId { id: 188428358408371624228923353197735646366, audio_type: Track }, true, 0)
Sending status to server: [kPlayStatusPlay]
Loading <Banquet> with Spotify URI <spotify:track:4juzduULFJiZVIcrC1tkxE>
Downloading file 34aab3a88d9e4675772318618ae0f4f2580e1ea8
channel error: 2 0
Unable to load encrypted file: ChannelError

Versions (please complete the following information):

  • OS: Ubuntu 24.04 LTS
  • Spotifyd: v 0.3.5
@PierreRust PierreRust added the bug A functionality or parts of a program that do not work as intended label Sep 3, 2024
@PierreRust
Copy link
Author

I've just tried to edit the dependency to librespot to point to the dev branch. Due to conflicts on the dependencies of this branch and the version in the lock file, this requires to run cargo update .

Unfortunately it seems that librespot api has quite changed in the dev branch and the build fails (missing fields on enums and structs, invalid type un function args, ...) , it will require more work than what I hoped. Given that I know nothing about spotifyd nor librespot code base, I'm afraid I'll not be able ti fix this by myself 😞

@dabalroman
Copy link

The dev branch on librespot works just fine, you can migrate to that project for now.

I don't think the repo maintainer would be happy to merge the code that depends on librespot dev-5.0.0 code that hasn't been released yet.

@eladyn any thoughts on that?

@PierreRust
Copy link
Author

Yes, you're right, I'm switched to librespot as a workaround and it works fine.

The main reason for creating this issue was to trace the issue for other spotifyd users who encounter it.

@Moltey
Copy link

Moltey commented Sep 4, 2024

There is supposed to be a workaround (add "0.0.0.0 apresolve.spotify.com" to /etc/hosts):
librespot-org/librespot#972 (comment)

For me, the workaround does not work, unfortunately. I am thankful for any other solution.

@ius
Copy link

ius commented Sep 4, 2024

For me, the workaround does not work, unfortunately. I am thankful for any other solution.

That workaround used to work, but has stopped working recently. See the latest replies in the linked thread.

Seems you can use librespot's dev branch, or alternatively I got https://github.com/devgianlu/go-librespot to work (after configuring audio_device = "pulse" (but it's not as stable as spotifyd used to be).

@whisperzer0
Copy link

whisperzer0 commented Sep 4, 2024

For anyone else encountering the same issues, see my comment here:

#1300 (comment)

@Exceen
Copy link

Exceen commented Sep 5, 2024

I made a quick workaround for this problem in my fork by updating librespot to v0.4.2
https://github.com/Exceen/spotifyd-fix

just check it out and compile it yourself

afaik signing into your account is broken in general, that's a problem of librespot and not of spotifyd, so you have to use it without an account

and I just noticed that there's a pull request already #1301

@ultraboost
Copy link

I made a quick workaround for this problem in my fork by updating librespot to v0.4.2 https://github.com/Exceen/spotifyd-fix

just check it out and compile it yourself

Seems to work great so far.

@ultraboost
Copy link

I made a quick workaround for this problem in my fork by updating librespot to v0.4.2 https://github.com/Exceen/spotifyd-fix
just check it out and compile it yourself

Seems to work great so far.

I spoke too soon. It's happening again.

@Exceen
Copy link

Exceen commented Sep 23, 2024

I made a quick workaround for this problem in my fork by updating librespot to v0.4.2 https://github.com/Exceen/spotifyd-fix
just check it out and compile it yourself

Seems to work great so far.

I spoke too soon. It's happening again.

still works for me. what's the issue you have?

@ultraboost
Copy link

ultraboost commented Sep 23, 2024

I made a quick workaround for this problem in my fork by updating librespot to v0.4.2 https://github.com/Exceen/spotifyd-fix
just check it out and compile it yourself

Seems to work great so far.

I spoke too soon. It's happening again.

still works for me. what's the issue you have?

After maybe 15 minutes of listening and searching for new music I like (so sampling several tracks from different artists) it started playing up the same as before. ie. random track selection, play for a few seconds then select another random track like it's possessed. A reboot sorted it but I'm now trying https://github.com/lordievader/spotifyd to see if that's any different.

@Exceen
Copy link

Exceen commented Sep 24, 2024

I made a quick workaround for this problem in my fork by updating librespot to v0.4.2 https://github.com/Exceen/spotifyd-fix
just check it out and compile it yourself

Seems to work great so far.

I spoke too soon. It's happening again.

still works for me. what's the issue you have?

After maybe 15 minutes of listening and searching for new music I like (so sampling several tracks from different artists) it started playing up the same as before. ie. random track selection, play for a few seconds then select another random track like it's possessed. A reboot sorted it but I'm now trying https://github.com/lordievader/spotifyd to see if that's any different.

then maybe something else is wrong with your system. it's the exact same fix lordievader did

@ultraboost
Copy link

I made a quick workaround for this problem in my fork by updating librespot to v0.4.2 https://github.com/Exceen/spotifyd-fix
just check it out and compile it yourself

Seems to work great so far.

I spoke too soon. It's happening again.

still works for me. what's the issue you have?

After maybe 15 minutes of listening and searching for new music I like (so sampling several tracks from different artists) it started playing up the same as before. ie. random track selection, play for a few seconds then select another random track like it's possessed. A reboot sorted it but I'm now trying https://github.com/lordievader/spotifyd to see if that's any different.

then maybe something else is wrong with your system. it's the exact same fix lordievader did

Comparing side by side it looks like you've made more changes and some formatting alterations? Although I'm no expert in these matters! I'm running it on a PiZero 2W with DietPi if that offers any clues.

@ius
Copy link

ius commented Sep 24, 2024

After maybe 15 minutes of listening and searching for new music I like (so sampling several tracks from different artists) it started playing up the same as before. ie. random track selection, play for a few seconds then select another random track like it's possessed

Note librespot is currently affected by other playback issues, e.g. librespot-org/librespot#1340 which I'm also running into with @Exceen's patched version.

For me the crash means spotifyd will restart (and need to be reselected as an output in the desktop Linux client) - but I can imagine the behavior might be different depending on your setup.

tl;dr check spotifyd logs

@ultraboost
Copy link

ultraboost commented Sep 24, 2024

I made a quick workaround for this problem in my fork by updating librespot to v0.4.2 https://github.com/Exceen/spotifyd-fix
just check it out and compile it yourself

Seems to work great so far.

I spoke too soon. It's happening again.

still works for me. what's the issue you have?

After maybe 15 minutes of listening and searching for new music I like (so sampling several tracks from different artists) it started playing up the same as before. ie. random track selection, play for a few seconds then select another random track like it's possessed. A reboot sorted it but I'm now trying https://github.com/lordievader/spotifyd to see if that's any different.

Nope, no different. After 10 minutes it's skipping through tracks itself again. Unable to select anything or play anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A functionality or parts of a program that do not work as intended
Projects
None yet
Development

No branches or pull requests

7 participants