[GH-ISSUE #238] Librespot playback stops after two songs #162

Closed
opened 2026-02-27 19:29:10 +03:00 by kerem · 8 comments
Owner

Originally created by @daskorn on GitHub (Jul 22, 2018).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/238

When I use librespot with a LTE internet connection the playback stops after just two tracks. Currently I use the librespot plugin of Volumio on a RPi3 connected via WIFI to a LTE (~5-8Mbit/s) router. First noticeable difference to a standard DSL 16k or 50k connection is the late start of the music. It takes around 5-20 seconds before the music starts.

This is a trace of the moment where it stucks:

INFO:librespot: librespot 9b85d33 (2018-05-18). Built on 2018-05-18.
...
...
...
TRACE:librespot_audio::fetch: chunk 67 / 69 complete
TRACE:librespot_audio::fetch: requesting chunk 68
TRACE:librespot_audio::fetch: chunk 68 / 69 complete
DEBUG:librespot_audio::fetch: File 6fc6ab32506451ef9b766f9b554d5a6c6c794510 complete, saving to cache
INFO:librespot_playback::player: SpCon::kSpSinkInactive
DEBUG:librespot_playback::player: command=Load(SpotifyId(u128!(128805885672356123695001461388728647940)), true, 0)
DEBUG:librespot_core::session: Invalidating session[0]
DEBUG:librespot_core::session: drop Dispatch
ERROR:librespot_core::session: Error { repr: Os { code: 104, message: "Connection reset by peer" } }
TRACE:librespot: Ctrl-C received
DEBUG:librespot_connect::spirc: drop Spirc[0]
INFO:librespot_playback::player: Shutting down player thread

This error just appears for librespot. The Android/Windows/iOS apps of spotify are starting each track immediately and are playing continously.

Any suggestions what I can do to make librespot work along with LTE?

Kind regards

Originally created by @daskorn on GitHub (Jul 22, 2018). Original GitHub issue: https://github.com/librespot-org/librespot/issues/238 When I use librespot with a LTE internet connection the playback stops after just two tracks. Currently I use the librespot plugin of Volumio on a RPi3 connected via WIFI to a LTE (~5-8Mbit/s) router. First noticeable difference to a standard DSL 16k or 50k connection is the late start of the music. It takes around 5-20 seconds before the music starts. This is a trace of the moment where it stucks: ``` INFO:librespot: librespot 9b85d33 (2018-05-18). Built on 2018-05-18. ... ... ... TRACE:librespot_audio::fetch: chunk 67 / 69 complete TRACE:librespot_audio::fetch: requesting chunk 68 TRACE:librespot_audio::fetch: chunk 68 / 69 complete DEBUG:librespot_audio::fetch: File 6fc6ab32506451ef9b766f9b554d5a6c6c794510 complete, saving to cache INFO:librespot_playback::player: SpCon::kSpSinkInactive DEBUG:librespot_playback::player: command=Load(SpotifyId(u128!(128805885672356123695001461388728647940)), true, 0) DEBUG:librespot_core::session: Invalidating session[0] DEBUG:librespot_core::session: drop Dispatch ERROR:librespot_core::session: Error { repr: Os { code: 104, message: "Connection reset by peer" } } TRACE:librespot: Ctrl-C received DEBUG:librespot_connect::spirc: drop Spirc[0] INFO:librespot_playback::player: Shutting down player thread ``` This error just appears for librespot. The Android/Windows/iOS apps of spotify are starting each track immediately and are playing continously. Any suggestions what I can do to make librespot work along with LTE? Kind regards
kerem closed this issue 2026-02-27 19:29:10 +03:00
Author
Owner

@abrakadabra2k commented on GitHub (Sep 16, 2018):

I am having the same issue via LAN and WiFi. :-
Sometimes after 2 songs, sometimes more...

<!-- gh-comment-id:421739480 --> @abrakadabra2k commented on GitHub (Sep 16, 2018): I am having the same issue via LAN and WiFi. :-\ Sometimes after 2 songs, sometimes more...
Author
Owner

@BjarkeVadPedersen commented on GitHub (Oct 21, 2018):

Hi,
I am experiencing a similar issue, playback stops after a few songs with the following error message:
INFO:librespot_playback::player: Track "1950" loaded ERROR:librespot_core::session: Error { repr: Os { code: 104, message: "Connection reset by peer" } }

This is with librespot built from source on a Raspberry Pi 3B.

Thanks!

<!-- gh-comment-id:431700123 --> @BjarkeVadPedersen commented on GitHub (Oct 21, 2018): Hi, I am experiencing a similar issue, playback stops after a few songs with the following error message: `INFO:librespot_playback::player: Track "1950" loaded ERROR:librespot_core::session: Error { repr: Os { code: 104, message: "Connection reset by peer" } } ` This is with librespot built from source on a Raspberry Pi 3B. Thanks!
Author
Owner

@skuligowski commented on GitHub (Oct 21, 2018):

Hi,
I am having the same issue, after 2-3 songs, it stops playing.
ERROR:librespot_core::session: Os { code: 104, kind: ConnectionReset, message: "Connection reset by peer" }

Do you have any workaround for that issue?

<!-- gh-comment-id:431700681 --> @skuligowski commented on GitHub (Oct 21, 2018): Hi, I am having the same issue, after 2-3 songs, it stops playing. `ERROR:librespot_core::session: Os { code: 104, kind: ConnectionReset, message: "Connection reset by peer" }` Do you have any workaround for that issue?
Author
Owner

@abrakadabra2k commented on GitHub (Oct 22, 2018):

Hi,
I am having the same issue, after 2-3 songs, it stops playing.
ERROR:librespot_core::session: Os { code: 104, kind: ConnectionReset, message: "Connection reset by peer" }

Do you have any workaround for that issue?

I am using Spotify Connect with this config now:
https://github.com/RafaPolit/moode-spotify-connect-web

<!-- gh-comment-id:431753355 --> @abrakadabra2k commented on GitHub (Oct 22, 2018): > Hi, > I am having the same issue, after 2-3 songs, it stops playing. > `ERROR:librespot_core::session: Os { code: 104, kind: ConnectionReset, message: "Connection reset by peer" }` > > Do you have any workaround for that issue? I am using Spotify Connect with this config now: https://github.com/RafaPolit/moode-spotify-connect-web
Author
Owner

@skuligowski commented on GitHub (Oct 22, 2018):

Is it somehow still possible to get spotify_appkey.key from spotify
website? The site with the request form is dead.
I think sooner or later spotify-connect-web will be broken too and it would
be better to find a valid solution of ConnectionReset issue for librespot..

pon., 22 paź 2018, 08:50 użytkownik abrakadabra2k notifications@github.com
napisał:

Hi,
I am having the same issue, after 2-3 songs, it stops playing.
ERROR:librespot_core::session: Os { code: 104, kind: ConnectionReset,
message: "Connection reset by peer" }

Do you have any workaround for that issue?

I am using Spotify Connect with this config now:
https://github.com/RafaPolit/moode-spotify-connect-web


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/librespot-org/librespot/issues/238#issuecomment-431753355,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFNl18ffcg2EO_eU-YbzcH7YUr26EENuks5unWq8gaJpZM4VaEAX
.

<!-- gh-comment-id:431895642 --> @skuligowski commented on GitHub (Oct 22, 2018): Is it somehow still possible to get spotify_appkey.key from spotify website? The site with the request form is dead. I think sooner or later spotify-connect-web will be broken too and it would be better to find a valid solution of ConnectionReset issue for librespot.. pon., 22 paź 2018, 08:50 użytkownik abrakadabra2k <notifications@github.com> napisał: > Hi, > I am having the same issue, after 2-3 songs, it stops playing. > ERROR:librespot_core::session: Os { code: 104, kind: ConnectionReset, > message: "Connection reset by peer" } > > Do you have any workaround for that issue? > > I am using Spotify Connect with this config now: > https://github.com/RafaPolit/moode-spotify-connect-web > > — > You are receiving this because you commented. > Reply to this email directly, view it on GitHub > <https://github.com/librespot-org/librespot/issues/238#issuecomment-431753355>, > or mute the thread > <https://github.com/notifications/unsubscribe-auth/AFNl18ffcg2EO_eU-YbzcH7YUr26EENuks5unWq8gaJpZM4VaEAX> > . >
Author
Owner

@sashahilton00 commented on GitHub (Nov 3, 2018):

See https://github.com/librespot-org/librespot/issues/134 for this bug. Basically librespot doesn't handle reconnection, hence it crashes if your internet drops out. spotify_appkey.key is dead, the apis for using it don't even exist anymore afaik. Closing in favour of aforementioned issue.

<!-- gh-comment-id:435596575 --> @sashahilton00 commented on GitHub (Nov 3, 2018): See https://github.com/librespot-org/librespot/issues/134 for this bug. Basically librespot doesn't handle reconnection, hence it crashes if your internet drops out. spotify_appkey.key is dead, the apis for using it don't even exist anymore afaik. Closing in favour of aforementioned issue.
Author
Owner

@stargazer commented on GitHub (Aug 15, 2019):

For anyone experiencing the same issue. I've been struggling for months now with the infamous ConnectionReset and Invalidating Session messages. I tried multiple versions of librespot, multiple ways to install it, and still got the same.

It turns out it was a network issue, on my end. I disabled my raspberrypi's ethernet interface and switched to the wifi. Never looked back. Works like a dream. Apparently my ethernet has some glitches. I can finally enjoy some music :)

<!-- gh-comment-id:521562044 --> @stargazer commented on GitHub (Aug 15, 2019): For anyone experiencing the same issue. I've been struggling for months now with the infamous `ConnectionReset` and `Invalidating Session` messages. I tried multiple versions of `librespot`, multiple ways to install it, and still got the same. It turns out it was a network issue, on my end. I disabled my raspberrypi's ethernet interface and switched to the wifi. Never looked back. Works like a dream. Apparently my ethernet has some glitches. I can finally enjoy some music :)
Author
Owner

@georgefst commented on GitHub (Jun 3, 2021):

It turns out it was a network issue, on my end. I disabled my raspberrypi's ethernet interface and switched to the wifi. Never looked back.

Similar here after switching off bluetooth (wifi + bluetooth interfering with each other is a known issue on some Pi models). Of course, ideally librespot should be able to handle disconnects without falling over completely. But there's been recent activity at #609, so hopefully that will be resolved some day.

<!-- gh-comment-id:854221693 --> @georgefst commented on GitHub (Jun 3, 2021): > It turns out it was a network issue, on my end. I disabled my raspberrypi's ethernet interface and switched to the wifi. Never looked back. Similar here after switching off bluetooth (wifi + bluetooth interfering with each other is a known issue on some Pi models). Of course, ideally `librespot` should be able to handle disconnects without falling over completely. But there's been recent activity at #609, so hopefully that will be resolved some day.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/librespot#162
No description provided.