@rkorell, I can confirm the suggested workaround (using zeroconf) works. This is the summary of my troubleshooting tread with GPT, on implementing the workaround:
Workaround confirmed
I was hitting the same go-librespot issue where Volumio kept restarting because go-librespot failed with:
failed authenticating with login5: INVALID_CREDENTIALS
The Volumio backend then tried to query Spotify volume on 127.0.0.1:9879, got ECONNREFUSED, and crashed/restarted.
What fixed it for me was switching go-librespot from spotify_token authentication to Zeroconf.
My working /data/go-librespot/config.yml credentials section is:
credentials:
type: zeroconf
zeroconf:
persist_credentials: true
The important part was the order of operations:
- Log out of Spotify in Volumio.
- Stop Volumio and go-librespot.
- Edit
/data/go-librespot/config.ymland replace thespotify_tokencredentials block with the Zeroconf block above. - Start
go-librespot-daemon. - Connect to the Volumio device from the Spotify app using Spotify Connect.
- Start Volumio again.
If you stay logged into Spotify through the Volumio UI, Volumio appears to regenerate config.yml and overwrite the Zeroconf configuration with a spotify_token block again.
Since making this change, go-librespot stays active and the Volumio backend no longer enters the restart/configuration loop.
So the underlying issue seems to be the Spotify token configuration generated by Volumio for go-librespot, while Zeroconf authentication works correctly.