mirror of
https://github.com/librespot-org/librespot.git
synced 2026-04-27 08:15:50 +03:00
[GH-ISSUE #1472] Unexpected exit due to "seek timestamp is out-of-range" #661
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#661
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 @Malvineous on GitHub (Feb 27, 2025).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/1472
Description
librespot exits due to a decoder error, when it should just continue with the next song.
Version
git from 2024-12-30
How to reproduce
Hard to reproduce, intermittent. Seems to happen when the connection drops out briefly.
Log
All the log output was normal except for this at the end:
It happened overnight and when I woke up, the Spotify UI was saying it was 8 hours into a three minute song, paused, but librespot had disconnected so it was no longer selected as the playback device.
Restarting librespot and playing the same song again worked fine, so the song itself was not the problem, it seems like the communication interruption was more likely the cause.
Host (what you are running
librespoton):Linux, PC
Additional context
I'm just reporting this as I think that "timestamp out of range" Symphonia error should really be treated as a minor error (or just 'end of current song'), it shouldn't cause the whole application to terminate because of it.
@Malvineous commented on GitHub (Mar 3, 2025):
Weirdly I seem to be getting this issue daily now, sometimes multiple times a day.
It just sits there pinging and ponging after this point, but the playback device has changed. When I change the playback device back to librespot, that's when it crashes:
@photovoltex commented on GitHub (Mar 3, 2025):
Thanks for the detailed report^^
Seems like the seeking evaluates a incorrect position where to resume. Probably because we dropped the state in a running position probably because we wan't to restart the dealer and pickup the playing state, but don't do so automatically :/. Might have to adjust the behavior again so that it handles this kinda of dropout correclty.
It seems to try to seek to
894203milliseconds which would be around ~14 minutes. If I remember correct I had a similar behavior at some point where I would seek out of bounds, but I remember that the player handled that correct and did resume at the begining as fallback. Might have to check that behavior later.@Malvineous commented on GitHub (Mar 3, 2025):
It is a bit odd because it has been happening on short songs too, but the web player also displays strange timestamps, like 9 hours into a three minute song, so not really sure what's going on there.
I don't think I've changed anything though (not even a reboot) since it started happening, so maybe a change on Spotify's end triggered it?
@roldengarm commented on GitHub (Apr 2, 2025):
I'm trying to integrate Home Assistant with Spotify Plus, using the SpotifyPlus integration, and I'm seeing the same behaviour here. It tries to start at 494128 but that's out of bounds, it's a much shorter son. Logs:
From the Spotify mobile app and Spotify Web it all works fine, so not sure why it doesn't work from the HA integration.
@roderickvd commented on GitHub (Apr 3, 2025):
At least
librespotcould be made more robust by "saturating" the seek, meaning: clamping a seek target position to the duration of the song like here. I'll see if I can propose a small PR for it.@roderickvd commented on GitHub (Apr 4, 2025):
Please give #1483 a spin.
@roderickvd commented on GitHub (Apr 6, 2025):
Re-opening as the real fix should be in the websocket handler.