balena sound & spotify connect (os error 104)

Hi,
Spotify connect on balena sound is dropping out frequently which is pretty frustrating. I haven’t found the exact issue in any other thread. Appears to be an OS ERROR 104 and a subscription validation issue (though I have a valid Spotify Premium sub). Here’s the log info below. Any advice?

 spotify  [2022-07-30T00:54:27Z INFO  librespot_core::session] Connecting to AP "ap-gae2.spotify.com:4070"
 spotify  [2022-07-30T01:04:28Z WARN  librespot] Connection failed: Cannot create session: early eof
 spotify  [2022-07-30T01:07:16Z INFO  librespot_core::session] Connecting to AP "ap-gae2.spotify.com:4070"
 spotify  [2022-07-30T01:07:17Z INFO  librespot_core::session] Authenticated as "hamish.low" !
 spotify  [2022-07-30T01:07:17Z INFO  librespot_playback::mixer::softmixer] Mixing with softvol and volume control: Linear
 spotify  [2022-07-30T01:07:17Z INFO  librespot_playback::convert] Converting with ditherer: tpdf
 spotify  [2022-07-30T01:07:17Z INFO  librespot_playback::audio_backend::pulseaudio] Using PulseAudioSink with format: S16
 spotify  [2022-07-30T01:07:17Z INFO  librespot_core::session] Country: "NZ"
 spotify  [2022-07-30T01:07:18Z INFO  librespot_playback::player] Loading <Paert: Tabula Rasa, I. Ludus - Con moto> with Spotify URI <spotify:track:5dR2YTRxvWDQFqnd7gKUhu>
 spotify  [2022-07-30T01:07:27Z WARN  librespot_playback::player] Player::pause called from invalid state
 spotify  [2022-07-30T01:07:28Z INFO  librespot_playback::player] <Paert: Tabula Rasa, I. Ludus - Con moto> (632106 ms) loaded
 spotify  [2022-07-30T01:07:28Z WARN  librespot_playback::player] This track will at its peak be subject to 4.80 dB of dynamic limiting.
 spotify  [2022-07-30T01:07:28Z WARN  librespot_playback::player] Please lower pregain to avoid.
 spotify  [2022-07-30T01:07:36Z ERROR librespot_core::session] Connection reset by peer (os error 104)
 spotify  [2022-07-30T01:07:36Z WARN  librespot_audio::fetch::receive] Error from channel for data receiver for range 838972 (+16384).
 spotify  [2022-07-30T01:07:36Z WARN  librespot_audio::fetch::receive] Error from channel for data receiver for range 822588 (+16384).
 spotify  [2022-07-30T01:07:36Z WARN  librespot_audio::fetch::receive] Error from channel for data receiver for range 806204 (+16384).
 spotify  [2022-07-30T01:07:36Z WARN  librespot_audio::fetch::receive] Error from channel for data receiver for range 855356 (+16384).
 spotify  [2022-07-30T01:07:36Z WARN  librespot_audio::fetch::receive] Error from channel for data receiver for range 871740 (+16384).
 spotify  [2022-07-30T01:07:36Z ERROR librespot_connect::spirc] subscription terminated
 spotify  [2022-07-30T01:07:36Z WARN  librespot] Spirc shut down unexpectedly

+1, same issue here, has anyone found a solution?

A bit late, but… It seems like the error is caused by a connection issue between librespot (the software used by Balena Sound to stream Spotify) and the Spotify servers. Specifically, the log shows that there was a connection reset by peer (os error 104), which means that the remote server terminated the connection.

There are a few things you could try to troubleshoot this issue:

  • Try a wired network connection instead of wireless to see if that helps stabilize the connection.
  • Check if there are any firewall or network settings that may be blocking the connection to the Spotify servers.
  • Check if there are any updates available for Balena Sound or librespot and apply them if there are.