mirror of
https://github.com/librespot-org/librespot.git
synced 2026-04-27 08:15:50 +03:00
[GH-ISSUE #1058] librespot cannot play user playlists (including daily mixes) #496
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#496
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 @jonotargett on GitHub (Sep 13, 2022).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/1058
Describe the bug
Librespot (as called via snapcast) is unable to play any user playlists. It appears that anything that would require permissions to access the private user is failing, as any publicly accessible playlists are still working correctly. Playing a track directly from an artist/album page also works with no issues. This affects my curated playlists, daily mixes, and ' Mix' playlists that spotify generates.
I have already found some workaround to this, but I feel like this is a hack which just sidesteps the actual bug. I have followed the discussion here and used the same resolution of manually remapping the domain to point to a different endpoint, which restores the functionality.
My hack/fix
Manually forcing librespot to use a different spotify endpoint resolves the issue. As per the method in the link above, my response from
apresolve.spotify.comis:My librespot seems to be defaulting to use the
ap-gae2.spotify.comendpoint, and according to the logs the alternative endpointap-gew4.spotify.comis blacklisted. However I can restore correct functionality by creating a local DNS record remappingap-gae2to34.158.253.218, which is the current IP address thatap-gew4.spotify.compoints to.Not sure why this endpoint blacklisted, or what blacklisting means, but redirecting my traffic to that means that my setup is working again. The non-blacklisted endpoint has been failing consistently - I can reproduce this issue every single attempt.
The other endpoints listed by apresolve don't seem to actually be available. If I remap to point to those, I get an error about connection issues and all playback fails.
To reproduce failure
librespotas part of the snapclient service.Host
I'm running librespot as part of my snapcast service in a docker container. Dockerfile is pretty basic:
Log
Note that this is a truncated log; I'm not going to share the full details as it exposes a lot of my home network information. This is the log from the docker container (snapcast-server process), without the hack DNS fix, limited to just the librespot output. The process crashes after the last line in this log.
@roderickvd commented on GitHub (Sep 13, 2022):
Thanks for the report. This is really strange, never heard of it before. Would you please recompile from the current
devand post the verbose logs. I don't mind at all if you anonymise it but we really need the extra log lines to understand what's happening here.Coincidentally
devno longer blacklists that access point, so your issues may just fade away.Still if you could be of service to also run vanilla
librespotv0.4.2 with verbose logs then we could actually have a throw at analysing and fixing the issue instead of just working around it. I don't mind if you anonymise the logs at all but I really need the extra log lines or I just can't debug.@jonotargett commented on GitHub (Sep 14, 2022):
Have flushed my DNS cache and gone back to using the original endpoint - and the issue doesn't seem to be present when librespot is called as a standalone process, instead of when using snapcast's
stream = ///librespot:/<etc>manner. I'm reproducing the same issue I had before using the snapcast container, but everything appears to be working fine with the following setup:Dockerfile
Note that this is the identical version/package that I'm using in the failing setup.
docker-compose.yml
Logs
I've tried and it doesn't look like I can pass through the
--verboseflag to librespot when called by snapcast easily. Looks like from now on I'll be running librespot in a separate container and piping the audio into snapcast that way. For any future readers: my hack fix ended up not being a good solution, the alternate endpoint worked for some playlists/tracks but failed again on others.If you don't mind, could you explain the meaning/reason behind blacklisting an access point? I'm curious why
ap-gae2would have been blacklisted in the first place.@kingosticks commented on GitHub (Sep 14, 2022):
Gew4 was blacklisted as per the first log. Gew2 shouldn't have been. It's because it was found to be broken for some users. See https://github.com/librespot-org/librespot/pull/1026
@kingosticks commented on GitHub (Sep 14, 2022):
And Gae1 is also blacklisted as per
github.com/librespot-org/librespot@87ea69b457, I missed that one. Gae2 is not blacklisted, assuming that's just your typo in the above comment.@jonotargett commented on GitHub (Sep 14, 2022):
Yep that was a typo, I meant
ap-gew4. Thanks for the commit link.I'll close this then, seems its not actually an issue with librespot but something do with snapcast + librespot.
@kingosticks commented on GitHub (Sep 14, 2022):
I think more likely something related to the container rather than using with snapcast, snapcast just runs the binary with a few options that should have not effect on this. Containers are always the problem!