Spotify plugin not working fixed with ldconfig

Hello all.

After a fresh install of 2.141 on RPi 3 with Hifiberry DAC I could not get spotify to work. I can browse spotify fine and chose an artist or a playlist. Playback items appear to be in the queue but playback does not work. Webradio works fine and I get the startup sound ok.

(I too had trouble updating to 2.141 but wound up re-flashing with new image. Hasn’t worked since.)

Rebooted, warm and cold. Tried removing and reinstalling spotify plugin. Same problem. Starting looking at logs and found this:

2017-05-06T22:03:47.718Z - info: [1494108227718] CoreStateMachine::play index undefined
2017-05-06T22:03:47.719Z - info: [1494108227719] CoreStateMachine::setConsumeUpdateService undefined
2017-05-06T22:03:47.720Z - info: [1494108227720] CorePlayQueue::getTrack 1
2017-05-06T22:03:47.726Z - info: Error:
TypeError: Cannot read property ‘service’ of undefined
at Promise._successFn (/volumio/app/statemachine.js:1040:92)
at nextTickCallback (/volumio/node_modules/kew/kew.js:47:28)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
2017-05-06T22:03:47.728Z - info: [1494108227727] ------------------------------ 11ms

One thing I noted: running ldd on /usr/bin/spopd it is linked to but cannot find libspotify:

volumio@myplayer:/var/log$ ldd /usr/bin/spopd
linux-vdso.so.1 (0x7eb38000)
libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0x76f4c000)
libspotify.so.12 => not found
libglib-2.0.so.0 => /lib/arm-linux-gnueabihf/libglib-2.0.so.0 (0x76e48000)

Seems odd because /usr/bin/spopd is running. So I ran ldconfig and re-ran ldd:

volumio@myplayer:~$ ldd /usr/bin/spopd
linux-vdso.so.1 (0x7ef2f000)
libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0x76ee1000)
libspotify.so.12 => /usr/local/lib/libspotify.so.12 (0x76d1f000)
libglib-2.0.so.0 => /lib/arm-linux-gnueabihf/libglib-2.0.so.0 (0x76c1c000)
libgmodule-2.0.so.0 => /usr/lib/arm-linux-gnueabihf/libgmodule-2.0.so.0 (0x76c08000)

looks better. Tried to kill/restart spopd on command line but that did not seem to work. Working after rebooting.

Just sharing this experience in case it helps anyone else. I would need to re-install again to report this more carefully as a bug, but it may be worth looking into whether ldconfig is getting run after new libraries are installed.

Cheers!

-jim

Hi jimq,

Thanks for the post, I had the same kind of problem and that got it solved.

I just did a fesh install of volumio (flashed a sd card from scratch) with latest version 2.163, and no way to get spotify working. Before that I was on an older version which worked fine.

The issue reported by the log was slightly different :

2017-05-08T12:20:39.956Z - info: SpopD Daemon Started 2017-05-08T12:20:44.962Z - info: Connecting to daemon 2017-05-08T12:20:44.996Z - info: SPOP command error: 2017-05-08T12:20:44.999Z - info: Error: connect ECONNREFUSED 127.0.0.1:6602 at Object.exports._errnoException (util.js:1026:11) at exports._exceptionWithHostPort (util.js:1049:20) at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1085:14) 2017-05-08T12:20:45.004Z - info: SPOP status error: 2017-05-08T12:20:45.006Z - info: Error: connect ECONNREFUSED 127.0.0.1:6602 at Object.exports._errnoException (util.js:1026:11) at exports._exceptionWithHostPort (util.js:1049:20) at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1085:14) 2017-05-08T12:20:45.405Z - info: Spotify access token expires at 1494249644966 2017-05-08T12:20:45.407Z - info: Spotify access token is BQBMpNni1jZANPFPIbS5IjU2K3M2LkyaUL0n26Dy0ZrDh0gz9XJkn_Guwwdpgah-Ak_4U9BjalFmnViUy2xSTw 2017-05-08T12:20:45.409Z - info: Spotify credentials grant success

Running “ldd spopd”, it turned out both libspotify.so.12 and libjson-glib-1.0.so.0 were not linked.

By running “sudo ldconfig”, libspotify got linked but not libjson-glib. The later wasn’t installed at all. Installing it manually and running ldconfig again got it working.

Thanks again !
DonGui