mirror of
https://github.com/devgianlu/go-librespot.git
synced 2026-04-26 05:15:49 +03:00
[GH-ISSUE #161] go-librespot spotify connect doesn't accept connection and then crashes #101
Labels
No labels
bug
enhancement
pull-request
spotify-side
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/go-librespot#101
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 @FrancisHGR on GitHub (Jan 15, 2025).
Original GitHub issue: https://github.com/devgianlu/go-librespot/issues/161
So I have build / compiled go-librespot from source (Commit
4af7200) in order to pipe music to fifo for owntone. I have setup everything according to my understanding correctly. However, once I try to connect to my go-librespot spotify connect device "spotify-smart-home" via my phone, the connection is rejected and the whole spotify connect device is not even reachable anymore, not being listed under the spotify connect devices in my spotify app. Connection try happens after the line "DEBU[0001] put connect state because VOLUME_CHANGED "My config.yml is below.
Any ideas based on the log?
and so on...
config.yml
@devgianlu commented on GitHub (Jan 16, 2025):
That's strange, do you have an unstable network connection? Does this happen even when using the alsa/pulseaudio backend?
Can you reproduce the issue and then send a
SIGABRT(kill -6 $(pidof go-librespot)) so that it dumps the goroutines and post the logs here?@FrancisHGR commented on GitHub (Jan 16, 2025):
Hope I made it right:
Here is Alsa, only difference to pipe is that it fails because I have no sound device in my LXC container. However after it fails, I can still reconnect to the spotify connect device, in comparison to pipe where it is not reachable / viewable anymore in spotify.
@devgianlu commented on GitHub (Jan 16, 2025):
It seems that the issue is:
Calling open a pipe will block until it is opened on the other side too. Have you tried starting owntone first?
@FrancisHGR commented on GitHub (Jan 16, 2025):
Good idea, I verified owntone and its running and other side of fifo connection should be setup...
@FrancisHGR commented on GitHub (Jan 17, 2025):
Okay it is working now for me. I have built another version, this time via a docker container (golang:1.23.5-bookworm), no Debian lxc that I had before. I can't explain why this version runs and the other one not.
What I can confirm that I got an error related to the fifo when trying to access the other lxc go-librespot player via the docker golang-bookworm one. So your analysis was spot on, even though I can't explain what the difference is. I have of course recreated the fifo on the other build multiple times.
Without understanding the root cause I can say that I have a working version.
I want to extend my warmest gratitude to not only this great piece of software, but also to your amazingly fast responsiveness and help. Mille graze @devgianlu !
@devgianlu commented on GitHub (Jan 18, 2025):
That's great! I'll close this, but keep us updated if you eventually figure out what was the cause.
@josephjmay commented on GitHub (Jan 23, 2025):
fwiw...I had the same issue using the prepackaged release binaries in go-librespot_linux_x86_64.tar.gz on Debian Bullseye x64.
I installed Go, cloned the repo, and launched go-librespot with
go run ./cmd/daemonand it works without issue@devgianlu commented on GitHub (Jan 23, 2025):
@josephjmay I haven't made a new release since the addition of the pipe output, but I will in the next couple of days.
@FrancisHGR commented on GitHub (Jan 23, 2025):
I can add that the problem is constantly coming back. Sometimes it’s working and sometimes it crashes like described above.
I didn’t have a chance to investigate the background why it crashes.
Looking forward to a new release.
@devgianlu commented on GitHub (Jan 24, 2025):
I have released v0.2.0
@josephjmay commented on GitHub (Jan 24, 2025):
Thanks for the update! I installed the 0.2.0 binary, and the new pipe feature is working.
Please consider adding a log event in the future to note when go-librespot is waiting for a program to read the pipe. Likely that will be a common, if obvious, misstep.
@FrancisHGR commented on GitHub (Jan 27, 2025):
Thanks, works spot on! Metadata pipe https://github.com/devgianlu/go-librespot/issues/157#issue-2768127385 would be icing on cake, though super happy about this program!