Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Librespot playback stops after two songs #238

Closed
daskorn opened this issue Jul 22, 2018 · 8 comments
Closed

Librespot playback stops after two songs #238

daskorn opened this issue Jul 22, 2018 · 8 comments

Comments

@daskorn
Copy link

daskorn commented Jul 22, 2018

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

@abrakadabra2k
Copy link

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

@BjarkeVadPedersen
Copy link

BjarkeVadPedersen commented 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!

@skuligowski
Copy link

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?

@abrakadabra2k
Copy link

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

@skuligowski
Copy link

skuligowski commented Oct 22, 2018 via email

@sashahilton00
Copy link
Member

See #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.

@stargazer
Copy link

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 :)

@georgefst
Copy link

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 up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants