mirror of
https://github.com/aome510/spotify-player.git
synced 2026-04-26 09:25:49 +03:00
[GH-ISSUE #705] spotify-player device disappears after some time #417
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#417
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 @contonice on GitHub (Apr 5, 2025).
Original GitHub issue: https://github.com/aome510/spotify-player/issues/705
Describe the bug
I'm trying to use this app as a backend for a smart speaker.
My setup: raspberry pi with wired internet, usb sound card and speakers.
I am running the application in daemon mode using -d flag and systemd. Then, when I want to listen to music, I open spotify on my phone and use spotify connect to turn on the track on raspberry. This works immediately after running the script. But if a certain amount of time passes (one night for example), the spotify-player device will disappear. However, the application does not die, the process remains run in the system.
To Reproduce
Optional:
7) Kill the player process and launch it again (or use systemctl restart).
8) Open spotify on your phone.
9) spotify-player is working again.
Expected behaviour
As long as application working, there is spotify-player on phone.
Log and backtrace
Backtrace is empty.
Here is log:
https://drive.google.com/file/d/1AnGfBljq5IlkNGm4FwOR0mpmsixZhcmY/view
Environment
Linux rpi 6.6.74+rpt-rpi-2712 #1 SMP PREEMPT Debian 1:6.6.74-1+rpt1 (2025-01-27) aarch64 GNU/Linux)0.20.4cargo install spotify_player --features daemonAdditional context
My systemctl config:
@arc-d3v commented on GitHub (Apr 24, 2025):
I was going to create an issue about this, it's true that when you go idle for 5-10 minutes, the streaming pauses.
Though I think the problem is not from spotify-player but librespot, but that makes spotify-player daemon, not really a daemon.
Another solution is to disable the streaming on spotify-player and use spotifyd instead. Spotifyd never dies idle and has a service for systemd.
You can use spotify-player using spotifyd as a device but it's not necessary but you'll likely need a spotify connect API for spotify-player (to make the device showing on the list of devices).
@aome510 commented on GitHub (May 10, 2025):
Weird cause
spotifydalso useslibrespotunder the hood, so the same thing should happen unless the version oflibrespotis different betweenspotify_playerandspotifyd.Looking into the logs, this seems to be the problem
so it's
librespotissue but I don't know why it happened@arc-d3v commented on GitHub (May 10, 2025):
This error is only showing only with spotify-player though. When I use spotify_connect with spotifyd, I don't get a 502 when I use a device other than spotify-player.
You can reproduce it pretty easily, connect spotify-player (streaming off) to spotify connect, and spotifyd to spotify connect, start any song with spotify-player while connected to spotifyd as a device, then you'll see the error. Do the same thing with but start the song with any backend device (phone or official app) and you get no error.
There are a lot of sync issue as well with spotify-connect connected in another backed device through spotify-connect, but that's another issue.
Though the error is showing at start, it doesn't cut the stream, the stream is cut off randomly after a few hours of use.
Seems it's related to #710 .
@arc-d3v commented on GitHub (May 31, 2025):
So after some test, I discovered that it happens with spotifyd as well but less often.
It happens when a tiny disconnection or a change on the network happens, librespot doesn't have anything to reconnect to spotify connect so the playback stops.
So you were right, it's only a librespot issue, not spotify player or spotifyd.
@glima commented on GitHub (Sep 22, 2025):
For me it's been a while no devices show up, regardless. It plays on my computer if I start afresh, but never showing anything in the devices bar. Give it some pauses and context switching and back, then playing on my laptop (Linux) does not work anymore, unless starting afresh: