mirror of
https://github.com/librespot-org/librespot.git
synced 2026-04-27 00:05:55 +03:00
[GH-ISSUE #1574] Features List for Discovery #717
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#717
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 @sethtroisi on GitHub (Sep 6, 2025).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/1574
Description
BL;UF: I didn't know about the settings in
Cargo.tomlmaybe they should be mentioned in the cross-compiling guide. Or maybe this is just me not being aI managed to cross-compile librespot (#1573) but then I struggled for 30 minutes with this generic error related to not having enabled discovery.
I searched issues,
-h, and tried googling it. The best I've found is the Options Page which not very helpfully says "DiscoverySelect the librespot instance from within Spotify's client to authenticate via Spotify Connect." Great how do I enable that?
Eventually I grepped the source and found the flags that i didn't complie with in
src/main.rswhich pointed me at the list of options inCargo.tomlwhich I didn't know about as a non rust person.This is so people can google for the same error.
Version
0.7.1
How to reproduce
Steps to reproduce the behavior in librespot e.g.
librespotwith any combination of settingsLog
@roderickvd commented on GitHub (Sep 6, 2025):
Don’t compile without default features unless you’re sure that’s what you want.
@kingosticks commented on GitHub (Sep 6, 2025):
Can you think of a short improvement to add to the wiki that would help? The existing compiling page does already list the available features, and show how to enable them, and the compiling page seems like a sensible place to put this.
Software feature flags are not a rust-specific practice, and we provide examples of how to do it, but I guess it's not enough. So from your point of view, how could we improve the existing documentation?
@sethtroisi commented on GitHub (Sep 9, 2025):
@kingosticks thanks for the empathetic response.
The project has a great links that could have helped me fix this if I had RTFM better, there's instructions in your README.md and on the wiki for how to fix this. I was skimming and frustrated at the point I get here because I was >2 hour into trying to fix my music box when I got to compiling from source.
I think the error message ("Credentials are required if discovery and oauth login are disabled.") was confusing to me. I had assumed "discovery is disabled" meant I needed to pass some
--enable-zeroconfflag to the binary, not that I needed to go back and compile with different flags.I see there are two different
Somemessages for the two different cases at main.rs#l1233 Maybe you should print the message in the exit(1) case on 1244. Seeing "librespot compiled without zeroconf backend" would have pointed me in the right direct.For the wiki my small suggestion would be adding [feature-flags] to the docker command like this
or possibly adding the bold text here
"If only one architecture is desired or you need to configure features cargo can be invoked directly with the appropriate options"
@kingosticks commented on GitHub (Sep 9, 2025):
I think I was responsible for that terse error message so I felt guilty! I agree with what you say, that it's unclear what's compile-time feature and run-time option here. I'll submit something that makes it clearer based on your feedback.
I've been thinking we should print out the enabled features on startup. That would help us better debug the log file we get (for those people that bother to provide them). I think we already do error out for all incompatible cases but maybe we could also warn/log the suspect cases. In this case it's a little more complex because you can still login without either discovery or oauth, if you have a pre-existing credentials state file. But that doesn't prevent us improving this error message.