raspotify: Stops playing after x songs

Hey! So let me start by saying this the most convenient solution to use spotify connect on an rpi, thank you!!

The issue I’ve run into, is that it stops playing after x tracks. So it will finish playing the track, and then stop until I service raspotify restart . Here’s what I get for service raspotify status :

   Loaded: loaded (/lib/systemd/system/raspotify.service; enabled)
   Active: active (running) since Wed 2017-06-28 11:05:01 UTC; 20min ago
  Process: 1670 ExecStartPre=/bin/chown raspotify:raspotify /var/cache/raspotify (code=exited, status=0/SUCCESS)
  Process: 1667 ExecStartPre=/bin/mkdir -p 0755 /var/cache/raspotify (code=exited, status=0/SUCCESS)
 Main PID: 1673 (librespot)
   CGroup: /system.slice/raspotify.service
           ├─1673 /usr/bin/librespot --name raspotify (raspberrypi) --backend alsa --cache /var/cache/raspotify --bitrate 160
           └─1686 /usr/bin/pulseaudio --start --log-target=syslog

Jun 28 11:05:10 raspberrypi librespot[1673]: INFO:librespot::player: Track "A Jealous Heart Never Rests" loaded
Jun 28 11:05:11 raspberrypi pulseaudio[1686]: [pulseaudio] server-lookup.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
Jun 28 11:05:11 raspberrypi pulseaudio[1686]: [pulseaudio] main.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
Jun 28 11:05:11 raspberrypi pulseaudio[1686]: [pulseaudio] bluez4-util.c: org.bluez.Manager.GetProperties() failed: org.freedesktop.DBus.Error.UnknownMethod: Method "GetProperties" with signature "" on interface "org.bluez.Manager" doesn't exist
Jun 28 11:06:31 raspberrypi librespot[1673]: INFO:librespot::player: Loading track "Playing with Fire"
Jun 28 11:06:32 raspberrypi librespot[1673]: INFO:librespot::player: Track "Playing with Fire" loaded
Jun 28 11:06:35 raspberrypi librespot[1673]: INFO:librespot::player: Loading track "Friday Fish Fry - Maribou State & Pedestrian Remix - Radio Edit"
Jun 28 11:06:35 raspberrypi librespot[1673]: INFO:librespot::player: Track "Friday Fish Fry - Maribou State & Pedestrian Remix - Radio Edit" loaded
Jun 28 11:10:46 raspberrypi librespot[1673]: INFO:librespot::player: Loading track "Waves"
Jun 28 11:10:46 raspberrypi librespot[1673]: INFO:librespot::player: Track "Waves" loaded

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 30 (7 by maintainers)

Commits related to this issue

Most upvoted comments

Hi, I just wanted to leave some feedback that is hopefully helpful.

I was having this exact issue on a very recent deployment off the default raspbian image on a first gen pi with the latest raspotify installed (installed about a week ago).

Following some advice I found on a different project, I uninstalled pulseaudio, and have not had the issue since. Works perfectly now, at least for the last 48 hours anyway. YMMV

Hi again,

I can confirm @kreague solution. The problem is the interaction with pulseaudio.

Really annoying issue. Kind of defeats the whole purpose of raspotify.

I don’t have /etc/pulse/default.pa so I can’t try the fix @niko-tin

What about the rest of us poor souls who absolutely have to use pulseaudio? Any chance to get this issue fixed?

For me audio stops after about 3 songs and I’m not sure why. I disabled audio cache, but it’s still happening. On my Android Spotify client it still tells me the song is playing and if I request the service status it tells me the song is loaded and yet no audio. Any more suggestions? How did you guys fix this?

[EDIT] After running librespot in --verbose mode I find that it probably has something to do with how librespot fetches the file chunks. You can see that it actually loads the first chunk (0), but then requests 1, 67 and 66, and says “yeah, it’s done now” before actually requesting and receiving all the middle chunks. It actually fetches the file after, but at that point it already started playing nothing for some odd reason. I’d take it up with librespot were it not that the dev just announced that he’s quitting librespot 😦

INFO:librespot::player: Loading track "Unique"
DEBUG:librespot_audio::fetch: Downloading file 531c40b52e1fbdac27a568e60a3699cf4ce68674
TRACE:librespot_audio::fetch: requesting chunk 0
TRACE:librespot_audio::fetch: chunk 0 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 1
TRACE:librespot_audio::fetch: requesting chunk 67
TRACE:librespot_audio::fetch: requesting chunk 66
TRACE:librespot_audio::fetch: chunk 66 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 67
TRACE:librespot_audio::fetch: chunk 67 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 1
INFO:librespot::player: Track "Unique" loaded
TRACE:librespot_audio::fetch: chunk 1 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 2
TRACE:librespot_audio::fetch: chunk 2 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 3
TRACE:librespot_audio::fetch: chunk 3 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 4
TRACE:librespot_audio::fetch: chunk 4 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 5
TRACE:librespot_audio::fetch: chunk 5 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 6
TRACE:librespot_audio::fetch: chunk 6 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 7
TRACE:librespot_audio::fetch: chunk 7 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 8
TRACE:librespot_audio::fetch: chunk 8 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 9
TRACE:librespot_audio::fetch: chunk 9 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 10
TRACE:librespot_audio::fetch: chunk 10 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 11
TRACE:librespot_audio::fetch: chunk 11 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 12
TRACE:librespot_audio::fetch: chunk 12 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 13
TRACE:librespot_audio::fetch: chunk 13 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 14
TRACE:librespot_audio::fetch: chunk 14 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 15
TRACE:librespot_audio::fetch: chunk 15 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 16
TRACE:librespot_audio::fetch: chunk 16 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 17
TRACE:librespot_audio::fetch: chunk 17 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 18
TRACE:librespot_audio::fetch: chunk 18 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 19
TRACE:librespot_audio::fetch: chunk 19 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 20
TRACE:librespot_audio::fetch: chunk 20 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 21
TRACE:librespot_audio::fetch: chunk 21 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 22
TRACE:librespot_audio::fetch: chunk 22 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 23
TRACE:librespot_audio::fetch: chunk 23 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 24
TRACE:librespot_audio::fetch: chunk 24 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 25
TRACE:librespot_audio::fetch: chunk 25 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 26
TRACE:librespot_audio::fetch: chunk 26 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 27
TRACE:librespot_audio::fetch: chunk 27 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 28
TRACE:librespot_audio::fetch: chunk 28 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 29
TRACE:librespot_audio::fetch: chunk 29 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 30
TRACE:librespot_audio::fetch: chunk 30 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 31
TRACE:librespot_audio::fetch: chunk 31 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 32
TRACE:librespot_audio::fetch: chunk 32 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 33
TRACE:librespot_audio::fetch: chunk 33 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 34
TRACE:librespot_audio::fetch: chunk 34 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 35
TRACE:librespot_audio::fetch: chunk 35 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 36
TRACE:librespot_audio::fetch: chunk 36 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 37
TRACE:librespot_audio::fetch: chunk 37 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 38
TRACE:librespot_audio::fetch: chunk 38 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 39
TRACE:librespot_audio::fetch: chunk 39 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 40
TRACE:librespot_audio::fetch: chunk 40 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 41
TRACE:librespot_audio::fetch: chunk 41 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 42
TRACE:librespot_audio::fetch: chunk 42 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 43
TRACE:librespot_audio::fetch: chunk 43 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 44
TRACE:librespot_audio::fetch: chunk 44 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 45
TRACE:librespot_audio::fetch: chunk 45 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 46
TRACE:librespot_audio::fetch: chunk 46 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 47
TRACE:librespot_audio::fetch: chunk 47 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 48
TRACE:librespot_audio::fetch: chunk 48 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 49
TRACE:librespot_audio::fetch: chunk 49 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 50
TRACE:librespot_audio::fetch: chunk 50 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 51
TRACE:librespot_audio::fetch: chunk 51 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 52
TRACE:librespot_audio::fetch: chunk 52 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 53
TRACE:librespot_audio::fetch: chunk 53 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 54
TRACE:librespot_audio::fetch: chunk 54 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 55
TRACE:librespot_audio::fetch: chunk 55 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 56
TRACE:librespot_audio::fetch: chunk 56 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 57
TRACE:librespot_audio::fetch: chunk 57 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 58
TRACE:librespot_audio::fetch: chunk 58 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 59
TRACE:librespot_audio::fetch: chunk 59 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 60
TRACE:librespot_audio::fetch: chunk 60 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 61
TRACE:librespot_audio::fetch: chunk 61 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 62
TRACE:librespot_audio::fetch: chunk 62 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 63
TRACE:librespot_audio::fetch: chunk 63 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 64
TRACE:librespot_audio::fetch: chunk 64 / 68 complete
TRACE:librespot_audio::fetch: requesting chunk 65
TRACE:librespot_audio::fetch: chunk 65 / 68 complete
DEBUG:librespot_audio::fetch: File 531c40b52e1fbdac27a568e60a3699cf4ce68674 complete

@higab85, @staubrein et al., you might like to try the latest version. Install by,

curl -sL https://raw.github.com/dtcooper/raspotify/master/install.sh | sh