mirror of
https://github.com/librespot-org/librespot.git
synced 2026-04-27 08:15:50 +03:00
[GH-ISSUE #1481] Client cannot connect to librespot #667
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#667
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 @tonabnehmer on GitHub (Mar 31, 2025).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/1481
Description
Can't connect to librespot. "spirc dealer" (librespot_core::dealer::manager] Launching dealer) seems stuck. resulting in an endless loop of re-connection attempts.
Version
What version(s) of librespot does this problem exist in?
librespot 0.6.0-dev
837b3e6(Built on 2025-03-31, Build ID: jRXFNQEP, Profile: release)build for raspberry pi 2
How to reproduce
Steps to reproduce the behavior in librespot e.g.
librespotwith system/systemd service: "/usr/bin/librespot --v --cache /var/lib/private/librespot --name raspberry --device sysdefault:CARD=sndrphifiberry --bitrate 320"Log
https://pastebin.com/rrgtCScv
Host (what you are running
librespoton):Additional context
Retried with clean cache, retried oauth
@photovoltex commented on GitHub (Mar 31, 2025):
Just to clear some things up, we are talking about an unauthenticated
librespot"device" which we then transfer the playback to via an official client or api, right?Could you also try to run
librespotas cli application, not as systemd service, and see if that makes a difference?@tonabnehmer commented on GitHub (Mar 31, 2025):
No, it's authenticated with Oauth. I'm sorry if I was unclear. I tried running it from cli as well. Same results. But if you want, I can upload those logs as well. They look similar to me.
@photovoltex commented on GitHub (Mar 31, 2025):
I'm just trying to understand the situation a bit more clearly to get all the info's we might need to reproduce, fix it or help you resolve it.
For myself it seems to work fine. I tried
zeroconf,oauthandcachedlogin/startup and all seem to be fine.Have you used
librespotbefore and if yes, did this just happened recently? Do you have a special network setup? How did you compile your binary? And do you have a different device to maybe check if it would work there?Thanks in advance for all the info^^
@tonabnehmer commented on GitHub (Mar 31, 2025):
Sure, here is some more information,
hope this helps.
@tonabnehmer commented on GitHub (Apr 2, 2025):
So this is getting weird, after leaving it unattended for a couple of days, the 'dealer' seems to be able to start:
(grep for
librespot_connect::spirc)Restarting works as well.
I have not changed anything since I created the ticket. Any idea how to further debug this?
@pkantor commented on GitHub (Apr 2, 2025):
Yesterday I had the same (probably) issue. RPI was visible as an external speaker but I could not connect to it. Today everything works fine...
The only thing that was strange to me was that yesterday I could not ping spotify.com from my RPI using IPv4 (only with IPv6), today both pings are working.
@photovoltex commented on GitHub (Apr 3, 2025):
Hmm, how did both of you compile the binary? There was a similarly sounding issue here which was related to the compiler/system #1437. So maybe that might be related?
@kingosticks commented on GitHub (Apr 3, 2025):
I don't think this looks like that armlogic compiler issue, things are getting much further and they're using different hardware and different OS. This looks more like a transient network problem to me.
@pkantor commented on GitHub (Apr 3, 2025):
cat /proc/version
Linux version 6.6.28+rpt-rpi-v8 (debian-kernel@lists.debian.org) (gcc-12 (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #1 SMP PREEMPT Debian 1:6.6.28-1+rpt1 (2024-04-22)uname -m
Linux raspberrypi 6.6.28+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.28-1+rpt1 (2024-04-22) aarch64 GNU/LinuxI build with
cargo install --git https://github.com/librespot-org/librespot --branch dev --no-default-features --features alsa-backend,with-libmdns --target-dir /home/user/librespot/compiled --root /home/user/librespot/rootThen i run as service
/usr/bin/librespot -n "MySpeaker" -b 320 --enable-volume-normalisation --normalisation-pregain 0 --initial-volume 69 --autoplay on@tonabnehmer commented on GitHub (Apr 3, 2025):
Network problems on the machine itself? Or handling within librespot? I can say that I noticed some IPv4/6 problems with my system as well, but have not checked for spotify.com connectivity. Will monitor.
For good measure, I build with cross-compile docker on my Fedora 41 machine:
@kingosticks commented on GitHub (Apr 3, 2025):
I don't know, I would guess problems with Spotify's network given that you changed nothing to make it work.
@sierra-alpha commented on GitHub (Apr 5, 2025):
For some further examples, I'm seeing a similar thing in my setup which has been successfully long running, although I did reboot the machine yesterday, and add pulseaudio back to the system, however I think these are unrelated. I am using librespot through snapcast, I am using it like
I've tried CLI direct calling librespot, running as different users, and different cache settings. Interestingly I could get CLI to stdout to work running as root for a time but it isn't as of typing this, So I initially assumed that there was something wrong with my set up to do with running as a service or as the
snapcastuser. But I think given this thread that it's maybe at the spotify end, I also see the AP timeouts similar to those mentioned by issue https://github.com/librespot-org/librespot/issues/1477.As per this issue I've made sure to force ipv4 connections and will monitor over the next few days hoping to see it come right. I guess all this suggests something changing on the Spotify side (perhaps related to something they're doing around this https://github.com/librespot-org/librespot/issues/1465).
@sierra-alpha commented on GitHub (May 3, 2025):
Mine never managed to reconnect but I did find this issue (https://github.com/librespot-org/librespot/issues/1490 added after my comment above) is exactly my problem.
@VoidAny commented on GitHub (Nov 12, 2025):
I encountered the same error of:
The issue was with my networking setup. My computer is on an ipv6 network, but I am using wireguard to vpn into a network that only supports ipv4. For some reason, my dns is resolved the ipv6 address for spotify.com when I tried pinging, meaning I am not able to access it. The problem disappeared after disconnecting my VPN, as I was able to access the ipv6 internet again.
tldr: it seems to be caused by spotify.com not being accessible over the network