[GH-ISSUE #44] thread 'main' panicked at 'Box<Any>', src/session.rs:115 #33

Closed
opened 2026-02-27 19:28:25 +03:00 by kerem · 4 comments
Owner

Originally created by @sashahilton00 on GitHub (Jan 29, 2018).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/44

Issue by joerg-krause
Saturday Mar 04, 2017 at 09:05 GMT
Originally opened as https://github.com/plietar/librespot/issues/156


Running the latest master works great so far! Yesterday, I set up a playlist in the Spotify App lo be played in a loop and selected the librespot client as audio sink. When I woke up today, the librespot client died:

DEBUG:librespot::audio_file: File 774f64e3c9690d01ecad1a35ed0bde12d978dfae complete
DEBUG:librespot::session: Session[0] strong=3 weak=6
DEBUG:librespot::player: command=Load(SpotifyId(u128 { high: 8492558088775026015, low: 11919394522851906758 }), true, 0)
DEBUG:librespot::session: drop Dispatch
thread 'main' panicked at 'Box<Any>', src/session.rs:115
Originally created by @sashahilton00 on GitHub (Jan 29, 2018). Original GitHub issue: https://github.com/librespot-org/librespot/issues/44 <a href="https://github.com/joerg-krause"><img src="https://avatars2.githubusercontent.com/u/6870896?v=4" align="left" width="96" height="96" hspace="10"></img></a> **Issue by [joerg-krause](https://github.com/joerg-krause)** _Saturday Mar 04, 2017 at 09:05 GMT_ _Originally opened as https://github.com/plietar/librespot/issues/156_ ---- Running the latest master works great so far! Yesterday, I set up a playlist in the Spotify App lo be played in a loop and selected the librespot client as audio sink. When I woke up today, the librespot client died: ``` DEBUG:librespot::audio_file: File 774f64e3c9690d01ecad1a35ed0bde12d978dfae complete DEBUG:librespot::session: Session[0] strong=3 weak=6 DEBUG:librespot::player: command=Load(SpotifyId(u128 { high: 8492558088775026015, low: 11919394522851906758 }), true, 0) DEBUG:librespot::session: drop Dispatch thread 'main' panicked at 'Box<Any>', src/session.rs:115 ```
kerem 2026-02-27 19:28:25 +03:00
Author
Owner

@sashahilton00 commented on GitHub (Jan 29, 2018):

Comment by joerg-krause
Saturday Mar 04, 2017 at 09:23 GMT


I am able to reproduce the panic when I force a disconnection of my DSL connection in the router. The librespot client keeps streaming fine after the router get a new IP. However, the Spotify App drops connection to the client. The status bar goes from green to blue., but the device is in the list and selectable. If I select the device now, librespot panics.

<!-- gh-comment-id:361261032 --> @sashahilton00 commented on GitHub (Jan 29, 2018): <a href="https://github.com/joerg-krause"><img src="https://avatars2.githubusercontent.com/u/6870896?v=4" align="left" width="48" height="48" hspace="10"></img></a> **Comment by [joerg-krause](https://github.com/joerg-krause)** _Saturday Mar 04, 2017 at 09:23 GMT_ ---- I am able to reproduce the panic when I force a disconnection of my DSL connection in the router. The librespot client keeps streaming fine after the router get a new IP. However, the Spotify App drops connection to the client. The status bar goes from green to blue., but the device is in the list and selectable. If I select the device now, librespot panics.
Author
Owner

@sashahilton00 commented on GitHub (Jan 29, 2018):

Comment by joerg-krause
Saturday Mar 11, 2017 at 11:07 GMT


The error message is "Connection reset by peer". Ideally, we should try to reconnect. Unfortunately, I have no idea, how to do it for librespot.

When this event happens, the Spotify Player disconnects for a moment from the librespot device (the status bar goes from green to blue for a short moment) than the device is displayed as connected again for about 2 or 3 seconds. Thereafter, the player shows the device as disconnected.

<!-- gh-comment-id:361261054 --> @sashahilton00 commented on GitHub (Jan 29, 2018): <a href="https://github.com/joerg-krause"><img src="https://avatars2.githubusercontent.com/u/6870896?v=4" align="left" width="48" height="48" hspace="10"></img></a> **Comment by [joerg-krause](https://github.com/joerg-krause)** _Saturday Mar 11, 2017 at 11:07 GMT_ ---- The error message is "Connection reset by peer". Ideally, we should try to reconnect. Unfortunately, I have no idea, how to do it for librespot. When this event happens, the Spotify Player disconnects for a moment from the librespot device (the status bar goes from green to blue for a short moment) than the device is displayed as connected again for about 2 or 3 seconds. Thereafter, the player shows the device as disconnected.
Author
Owner

@sashahilton00 commented on GitHub (Jan 29, 2018):

Comment by bowiz2
Friday Sep 01, 2017 at 11:43 GMT


Have the same issue when playing from the Android client. Passing a username and using the --disable-discovery flag allowed me to connect from my phone, but after about 1.5 - 2 minutes, the connection was dropped, while librespot still showed nothing out of the ordinary.

After the connection was dropped, I couldn't reconnect to librespot, as it still thought it was connected to the client.

I received a similar
thread 'main' panicked at 'Box<Any>', src/session.rs:83
error after about 5 minutes.

Build info:
INFO:librespot: librespot ddfc28f (2017-08-04). Built on 2017-08-07. Build ID: N5RcEuis
Running on a Raspberry Pi 1

<!-- gh-comment-id:361261073 --> @sashahilton00 commented on GitHub (Jan 29, 2018): <a href="https://github.com/bowiz2"><img src="https://avatars1.githubusercontent.com/u/4411787?v=4" align="left" width="48" height="48" hspace="10"></img></a> **Comment by [bowiz2](https://github.com/bowiz2)** _Friday Sep 01, 2017 at 11:43 GMT_ ---- Have the same issue when playing from the Android client. Passing a username and using the --disable-discovery flag allowed me to connect from my phone, but after about 1.5 - 2 minutes, the connection was dropped, while librespot still showed nothing out of the ordinary. After the connection was dropped, I couldn't reconnect to librespot, as it still thought it was connected to the client. I received a similar `thread 'main' panicked at 'Box<Any>', src/session.rs:83` error after about 5 minutes. Build info: `INFO:librespot: librespot ddfc28f (2017-08-04). Built on 2017-08-07. Build ID: N5RcEuis ` Running on a Raspberry Pi 1
Author
Owner

@ComlOnline commented on GitHub (Jan 29, 2018):

Please continue discussion for this in #103, as it seems to be same bug.

<!-- gh-comment-id:361350266 --> @ComlOnline commented on GitHub (Jan 29, 2018): Please continue discussion for this in #103, as it seems to be same bug.
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#33
No description provided.