mirror of
https://github.com/librespot-org/librespot.git
synced 2026-04-27 08:15:50 +03:00
[GH-ISSUE #417] Librespot crashes upon connection #269
Labels
No labels
A-Alsa
SpotifyAPI
Tokio 1.0
audio
bug
can't reproduce
compilation
dependencies
duplicate
enhancement
good first issue
help wanted
high priority
imported
imported
invalid
new api
pull-request
question
reverse engineering
wiki
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/librespot#269
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @mordax7 on GitHub (Dec 28, 2019).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/417
There is sometimes a problem that is really hard to fix. Basically how to reproduce it is like follows:
(use two Spotify accounts).
At this point, the only way to recover is by stopping Librespot and the Spotify client on your device. Once both stopped you need to first open your Spotify client and afterwards start Librespot, then you will be able to connect to Librespot connect.
Here the logs:
@kaymes commented on GitHub (Jan 22, 2020):
Looking at the error message and the code, the issue seems to be missing error handling when the connection is shut down.
in channel.rs:
The
t.expect("channel closed")causes the panic you see. Instead of usingexpectthe error should be caught and a ChannelError should be issued.When a new account takes over, practically everything is shut down and new server connections are made. If this happens while data is being downloaded some of the data-receiving futures may still be active. Thus, the error of shut-down network sessions must be handled correctly.
@kaymes commented on GitHub (Jan 22, 2020):
I created PR #425 to fix the issue but I can't test it myself at the moment.
@xMordax could you please test whether the issue is gone with the new code and if not post the error messages again.