Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Spotify Connect failures on Moode 4.4
#13
My first post so apologies if the formatting isn't right.

I’ve also been having some issues with spotify connect via moode and thought I would post my findings here in case it helps anyone.

Spotify connect was all working fine for a while (about a week), but then it stop working.  By checking the processes running I managed to determine that librespot started and then pretty much stoped straight away.  This was consistent behaviour.

I then enabled the debug in the playerlib.php as suggested by Tim, and got the following output.


Code:
INFO:librespot_core::session: Connecting to AP "gew1-accesspoint-b-kvtg.ap.spotify.com:4070"
thread 'main' panicked at 'Authentication failed with reason: BadCredentials', core/src/connection/mod.rs:93:21
stack backtrace:


I have a premium account so thats not the issue.
From the moode log I saw the command that was being run was


Code:
20190104 194642 worker: (librespot --name "PiSpotify3" --bitrate 320 --initial-volume 0 --cache /var/local/www/spotify_cache --disable-audio-c
ache --backend alsa --device "plughw:0" --onevent /var/local/www/commandw/spotevent.sh -v > /home/pi/librespot.txt 2>&1 &)


I then ran this command from the shell direct and go the same error.

I had previously run librespot with minimal parameters from the shell OK, so I thought the issue might be the parameters.  I started removing the parameters one by one (starting with the last).
Eventually I got to 


Code:
librespot --name "PiSpotify3" --bitrate 320 --initial-volume 0


which was the first one that ran OK.  So my thought was that the issue was with the --cache parameter.

I then went back to the code in playerlib.php and removed the —cache parameter.  rebooted.

the spotify now works fine :-)

I have a theory.  I did change my spotify account soon before I started using moose with spotify connect. My old account was not premium, but my new account is premium.  I wonder if I connect with an old device (phone) and it had the old account details, and somehow the cache was using the old account.  This might be similar to users that had a similar issue and found that running librespot direct from the shell with the user name and password sorted their problem.  This is just a theory though.  I have not gone back and try to prove it.

Andy

S Y S T E M    P A R A M E T E R S  

Date and time = 2019-01-04 19:56:01
System uptime = up 9 minutes
Timezone = Europe/London
moOde = Release 4.4 2018-12-09

HDWR REV = Pi-1B+ 512MB
A U D I O    P A R A M E T E R S  

Audio device = HiFiBerry DAC+ Pro
Interface = I2S
Hdwr volume = Controller detected
Mixer name = Digital
Output stream = S16_LE / 44100
ALSA version = 1.1.3-5+rpi3
SoX version = 0.1.2-2
Reply


Messages In This Thread
Spotify Connect failures on Moode 4.4 - by abyrd - 12-13-2018, 05:51 PM
RE: Spotify Connect failures on Moode 4.4 - by andyc - 01-04-2019, 09:14 PM

Forum Jump: