mirror of
https://github.com/aome510/spotify-player.git
synced 2026-04-26 09:25:49 +03:00
[GH-ISSUE #710] playback stops intermittently #1355
Labels
No labels
bug
documentation
enhancement
good first issue
help wanted
pull-request
question
third-party
third-party
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/spotify-player#1355
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 @earhax on GitHub (May 3, 2025).
Original GitHub issue: https://github.com/aome510/spotify-player/issues/710
Describe the bug
intermittently, playback just stops in the middle of a song, even with the Spotify app open in addition to Spotify-player CLI.
To Reproduce
use Spotify-player, play music in a playlist. after a few songs, playback randomly just stops dead. Happens to me all the time. but maybe i'm just lucky like that!
Expected behaviour
playing songs shouldn't just stop for no reason. playback should continue until stopped by the user.
Log and backtrace
Log and backtrace of a run reproducing the bug to help debug the issue, which are usually located in
$HOME/.cache/spotify-player/.i'm on my phone right now and don't have access to the log, but if this keeps up, I'll add the log later. also, i think $home only works on Mac. on PC it's probably %userprofile% and \ instead of / for the separator. might be worth noting in bug report steps/info.
Environment
@stevenwalton commented on GitHub (May 9, 2025):
This has been happening to me a lot lately. I was follow the log waiting for it to crash. Here's the tail.
Note that this has a max lifetime of a week and I redacted a few things like the
access_tokenComments
It appears what is happening is that the server connection gets closed and after re-establishing the audio doesn't continue.
Sometimes I can continue by pressing play, but this doesn't always seem to be the case.
The log will say that it got a Paused pay event.
But most times when I press play the progress bar resumes but there is no audio (@earhax do you see this behavior?).
Because of this, I think the issue isn't just due to resolving the connection.
I think there's something a bit more complicated and may involve the connection to the audio device.
I notice some weird behavior in the logs when it is re-establishing connections.
I think you should probably redact the access tokens from the log
Is something going on with the request token logic? All of these make requests for
expires_in: TimeDelta { secs: 3600, nanos: 0 }.I think the crash happened before the last token request, so it might be that that log was late to requesting tokens? It could be that the new session is playing because the tokens are refreshed earlier, which is happening because there's some errors like
librespot_core::session: Connection to server closedandSocket is not connectedprior to the retokenization?Extra maybe related
I have also noticed that sometimes there is a problem when outputting audio with my airpods.
I'm not exactly sure the sequence that leads to the event but it can happen if I take my headphones out of my ears.
This doesn't pause
spotify_playerbut I believe Apple sends an event and this seems to sometimes be interpreted by Apple Music (something I do not use and do not want...).When that happens I cannot select the correct audio device and I have to shutdown
spotify_player, return my headphones to their case, pull them back out, and then startspotify_player.Parse log for
ERRORandWARN(There only other error/warn messages in my log are a few more instances as the last line shown above)
System
spotify_player 0.20.4@aome510 commented on GitHub (May 10, 2025):
Thanks @stevenwalton for the detailed explanation of what might happen. I can confirm I also occasionally encounter the same thing on my end when using the app at work. Often, I will restart the app or the integrated client with
RestartIntegratedClient.That said, recently I couldn't find time to do deep dive into this problem or any related problems reported in https://github.com/aome510/spotify-player/issues. This kind of problem tends to be time-consuming to investigate cause it's less of
spotify_playerissue but more of how third-party library likelibrespothandles Spotify APIs.@aome510 commented on GitHub (May 10, 2025):
Maybe related to https://github.com/librespot-org/librespot/issues/1492
@georgev93 commented on GitHub (Oct 4, 2025):
In case this adds any context, I'm also having the same issue (except it stops after roughly every other song). I use a VPN with a ~350ms ping, so I've found weird issues in other software because of that. Perhaps it's related?
Logs:
EDIT: It's 350ms, but it's a stable 350ms. No, you never get used to it.