mirror of
https://github.com/librespot-org/librespot.git
synced 2026-04-27 08:15:50 +03:00
[GH-ISSUE #1313] Discovery server immediately shuts down after starting, no visible error #600
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#600
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 @Pierric82 on GitHub (Aug 22, 2024).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/1313
Hi!
This may not be a bug, and may be a user problem... but I'm at a loss. I will follow the bug template to be as thorough as I can.
Describe the bug
I'm using librespot via raspotify. I was previously using authentication with username and password, but as discussed in another thread on this repo (which I am very thankful for as it finally confirmed what was happening), I need to switch to discovery via mDNS. Now, for context, I was never able to make this work in the past. But the error I'm getting now is different from what I saw in the past.
Basically, now, I see that librespot starts the discovery service successfully on a random port, then immediately shuts it down, with no further information (see logs below).
I've tried to follow through the code to see if anything would give me a hint, but even though I have basics in rust I'm not sure about the tokio select! structure used in discovery/src/server.rs. Line 309 seems to be the one, and to my naive reading it looks like we shut down immediately upon starting due to the way the async expression is used, but that must be incorrect, otherwise this wouldn't work for anybody. So bottom line, I don't understand the code :)
I run this on raspberry pi running raspberry pi OS 12. I have tried with both avahi-daemon started, and stopped, it doesn't change what I see. I will add that I never understood how something like librespot and avahi/mDNS are supposed to work together, which makes it even harder for me to understand the problem. If there is any useful resource on this I'd love to read it, I couldn't find anything at the right level of vulgarization for me.
To reproduce
Steps to reproduce the behavior:
Log
Host (what you are running
librespoton):Additional context
As mentioned I run this via raspotify, but I'm thinking the librespot project is a better place to ask this, as raspotify is just acting as a wrapper here. I hope the logs are enough to explain my setup, but I'm happy to share other things such as the raspotify config if it can be useful.
Thank you!
EDIT: I realised after writing this that raspotify is based on a fork of librespot, I didn't know this :( I compiled librespot from source and I'm not getting that problem yet. However I still can't see the device from a Spotify client.
This is what I now see when starting librespot:
@Pierric82 commented on GitHub (Aug 23, 2024):
I found out about the discussions, and I suppose mine is a user/machine issue, so I will close this issue and open a new discussion with fresh info.