Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spotifyd exits when other user in WiFi selects it as output device in spotify app #1036

Closed
1 of 6 tasks
achimkrause opened this issue Jan 12, 2022 · 4 comments · Fixed by #1059
Closed
1 of 6 tasks
Labels
bug A functionality or parts of a program that do not work as intended

Comments

@achimkrause
Copy link

achimkrause commented Jan 12, 2022

Description
My instance of spotifyd appears as selectable device in the spotify android app for other users in the same WiFi (not logged into my spotify account!). When selected as playback device, spotifyd on my machine terminates.
Selecting it as playback device from my phone (where the same spotify account is logged in) works fine.

To Reproduce

  1. Need 2 different spotify accounts, referred to below as account A and account B.
  2. Start spotifyd on one machine, setup with spotify account A.
  3. Open the spotify app on an android phone in the same WiFi, setup with spotify account B.
  4. When playing a song on the phone, the spotifyd instance can be selected in the "devices" overview.
  5. When selecting it as playback device on the phone, spotifyd on the first machine exits.

Expected behavior
I would expect spotifyd to just reject the request, certainly not crash.

Logs

Click to show logs
<!-- PLEASE PASTE YOUR LOGS BELOW THIS LINE WHEN REPORTING BUGS. Make sure to run spotifyd using the `--verbose` flag -->
Loading config from "/home/achim/.config/spotifyd/spotifyd.conf"
CliConfig { config_path: None, no_daemon: true, verbose: true, pid: None, shared_config: SharedConfigValues { username: Some("taken out for privacy"), username_cmd: None, password: None, password_cmd: None, use_keyring: true, use_mpris: None, on_song_change_hook: None, cache_path: None, no-audio-cache: false, backend: Some(PulseAudio), volume_controller: None, device: None, control: None, mixer: None, device_name: None, bitrate: None, initial_volume: None, volume_normalisation: false, normalisation_pregain: None, zeroconf_port: None, proxy: None, device_type: Some(Computer) } }
Found user shell: Some("/bin/bash")
No password specified. Checking password_cmd
No password_cmd specified
No proxy specified
registering event source with poller: token=Token(0), interests=READABLE | WRITABLE
Using software volume controller.
registering event source with poller: token=Token(1), interests=READABLE | WRITABLE
Zeroconf server listening on 0.0.0.0:37717
registering event source with poller: token=Token(2), interests=READABLE | WRITABLE
registering event source with poller: token=Token(3), interests=READABLE | WRITABLE
Checking keyring for password
found interface Interface { name: "wlp3s0", addr: V4(Ifv4Addr { ip: 192.168.0.8, netmask: 255.255.255.0, broadcast: Some(192.168.0.255) }) }
found interface Interface { name: "br-b2178398e9dc", addr: V4(Ifv4Addr { ip: 172.21.0.1, netmask: 255.255.0.0, broadcast: Some(172.21.255.255) }) }
found interface Interface { name: "docker0", addr: V4(Ifv4Addr { ip: 172.17.0.1, netmask: 255.255.0.0, broadcast: Some(172.17.255.255) }) }
found interface Interface { name: "tun0", addr: V4(Ifv4Addr { ip: 10.8.0.14, netmask: 255.255.255.255, broadcast: None }) }
found interface Interface { name: "wlp3s0", addr: V6(Ifv6Addr { ip: 2a02:908:d81:e040:aeed:5cff:fe71:93ff, netmask: ffff:ffff:ffff:ffff::, broadcast: None }) }
sending packet to 224.0.0.251:5353
found interface Interface { name: "wlp3s0", addr: V4(Ifv4Addr { ip: 192.168.0.8, netmask: 255.255.255.0, broadcast: Some(192.168.0.255) }) }
found interface Interface { name: "br-b2178398e9dc", addr: V4(Ifv4Addr { ip: 172.21.0.1, netmask: 255.255.0.0, broadcast: Some(172.21.255.255) }) }
found interface Interface { name: "docker0", addr: V4(Ifv4Addr { ip: 172.17.0.1, netmask: 255.255.0.0, broadcast: Some(172.17.255.255) }) }
found interface Interface { name: "tun0", addr: V4(Ifv4Addr { ip: 10.8.0.14, netmask: 255.255.255.255, broadcast: None }) }
found interface Interface { name: "wlp3s0", addr: V6(Ifv6Addr { ip: 2a02:908:d81:e040:aeed:5cff:fe71:93ff, netmask: ffff:ffff:ffff:ffff::, broadcast: None }) }
sending packet to [ff02::fb]:5353
received packet from 192.168.0.8:5353
received packet from 192.168.0.8:5353 with no query
received packet from [fe80::aeed:5cff:fe71:93ff%3]:5353
received packet from [fe80::aeed:5cff:fe71:93ff%3]:5353 with no query
Connecting to AP "ap.spotify.com:443"
registering event source with poller: token=Token(4), interests=READABLE | WRITABLE
flushing framed transport
writing; remaining=161
framed transport flushed
attempting to decode a frame
frame decoded from buffer
Authenticated as "zexp2flxvsi8valjmjqmlazg3" !
new Session[0]
flushing framed transport
framed transport flushed
attempting to decode a frame
frame decoded from buffer
Session[0] strong=4 weak=1
attempting to decode a frame
frame decoded from buffer
attempting to decode a frame
frame decoded from buffer
attempting to decode a frame
frame decoded from buffer
Country: "DE"
attempting to decode a frame
new Player[0]
Using PulseAudio sink with format: S16
new Spirc[0]
canonical_username: zexp2flxvsi8valjmjqmlazg3
new MercuryManager
frame decoded from buffer
attempting to decode a frame
frame decoded from buffer
attempting to decode a frame
frame decoded from buffer
attempting to decode a frame
input volume:65535 to mixer: 65535
flushing framed transport
writing; remaining=83
framed transport flushed
flushing framed transport
writing; remaining=378
framed transport flushed
command=AddEventSender
command=VolumeSet(65535)
flushing framed transport
writing; remaining=438
framed transport flushed
flushing framed transport
framed transport flushed
attempting to decode a frame
frame decoded from buffer
attempting to decode a frame
flushing framed transport
framed transport flushed
attempting to decode a frame
frame decoded from buffer
attempting to decode a frame
subscribed uri=hm://remote/user/zexp2flxvsi8valjmjqmlazg3/ count=0
flushing framed transport
framed transport flushed
attempting to decode a frame
frame decoded from buffer
attempting to decode a frame
flushing framed transport
framed transport flushed
attempting to decode a frame
attempting to decode a frame
frame decoded from buffer
attempting to decode a frame
registering event source with poller: token=Token(5), interests=READABLE
received packet from 192.168.0.244:5353
received question: IN {"nm":"Redmi 9","as":"[8193, 8194]","ip":"244"}._mi-connect._udp.local
received packet from [fe80::acc3:1c85:eb00:de1e%3]:5353
received question: IN {"nm":"Redmi 9","as":"[8193, 8194]","ip":"244"}._mi-connect._udp.local
received packet from 192.168.0.244:5353
received question: IN {"nm":"Redmi 9","as":"[8193, 8194]","ip":"244"}._mi-connect._udp.local
received packet from [fe80::acc3:1c85:eb00:de1e%3]:5353
received question: IN {"nm":"Redmi 9","as":"[8193, 8194]","ip":"244"}._mi-connect._udp.local
received packet from 192.168.0.244:5353
received question: IN {"nm":"Redmi 9","as":"[8193, 8194]","ip":"244"}._mi-connect._udp.local
received packet from [fe80::acc3:1c85:eb00:de1e%3]:5353
received question: IN {"nm":"Redmi 9","as":"[8193, 8194]","ip":"244"}._mi-connect._udp.local
received packet from 192.168.0.244:5353
received packet from 192.168.0.244:5353 with no query
received packet from [fe80::acc3:1c85:eb00:de1e%3]:5353
received packet from [fe80::acc3:1c85:eb00:de1e%3]:5353 with no query
received packet from 192.168.0.244:5353
received packet from 192.168.0.244:5353 with no query
received packet from [fe80::acc3:1c85:eb00:de1e%3]:5353
received packet from [fe80::acc3:1c85:eb00:de1e%3]:5353 with no query
received packet from 192.168.0.244:5353
received question: IN _spotify-connect._tcp.local
found interface Interface { name: "wlp3s0", addr: V4(Ifv4Addr { ip: 192.168.0.8, netmask: 255.255.255.0, broadcast: Some(192.168.0.255) }) }
found interface Interface { name: "br-b2178398e9dc", addr: V4(Ifv4Addr { ip: 172.21.0.1, netmask: 255.255.0.0, broadcast: Some(172.21.255.255) }) }
found interface Interface { name: "docker0", addr: V4(Ifv4Addr { ip: 172.17.0.1, netmask: 255.255.0.0, broadcast: Some(172.17.255.255) }) }
found interface Interface { name: "tun0", addr: V4(Ifv4Addr { ip: 10.8.0.14, netmask: 255.255.255.255, broadcast: None }) }
found interface Interface { name: "wlp3s0", addr: V6(Ifv6Addr { ip: 2a02:908:d81:e040:aeed:5cff:fe71:93ff, netmask: ffff:ffff:ffff:ffff::, broadcast: None }) }
sending packet to 224.0.0.251:5353
received packet from [fe80::acc3:1c85:eb00:de1e%3]:5353
received question: IN _spotify-connect._tcp.local
found interface Interface { name: "wlp3s0", addr: V4(Ifv4Addr { ip: 192.168.0.8, netmask: 255.255.255.0, broadcast: Some(192.168.0.255) }) }
found interface Interface { name: "br-b2178398e9dc", addr: V4(Ifv4Addr { ip: 172.21.0.1, netmask: 255.255.0.0, broadcast: Some(172.21.255.255) }) }
found interface Interface { name: "docker0", addr: V4(Ifv4Addr { ip: 172.17.0.1, netmask: 255.255.0.0, broadcast: Some(172.17.255.255) }) }
found interface Interface { name: "tun0", addr: V4(Ifv4Addr { ip: 10.8.0.14, netmask: 255.255.255.255, broadcast: None }) }
found interface Interface { name: "wlp3s0", addr: V6(Ifv6Addr { ip: 2a02:908:d81:e040:aeed:5cff:fe71:93ff, netmask: ffff:ffff:ffff:ffff::, broadcast: None }) }
sending packet to [ff02::fb]:5353
received packet from 192.168.0.8:5353
received packet from 192.168.0.8:5353 with no query
received packet from [fe80::aeed:5cff:fe71:93ff%3]:5353
received packet from [fe80::aeed:5cff:fe71:93ff%3]:5353 with no query
received packet from 192.168.0.244:5353
received question: IN _spotify-connect._tcp.local
found interface Interface { name: "wlp3s0", addr: V4(Ifv4Addr { ip: 192.168.0.8, netmask: 255.255.255.0, broadcast: Some(192.168.0.255) }) }
found interface Interface { name: "br-b2178398e9dc", addr: V4(Ifv4Addr { ip: 172.21.0.1, netmask: 255.255.0.0, broadcast: Some(172.21.255.255) }) }
found interface Interface { name: "docker0", addr: V4(Ifv4Addr { ip: 172.17.0.1, netmask: 255.255.0.0, broadcast: Some(172.17.255.255) }) }
found interface Interface { name: "tun0", addr: V4(Ifv4Addr { ip: 10.8.0.14, netmask: 255.255.255.255, broadcast: None }) }
found interface Interface { name: "wlp3s0", addr: V6(Ifv6Addr { ip: 2a02:908:d81:e040:aeed:5cff:fe71:93ff, netmask: ffff:ffff:ffff:ffff::, broadcast: None }) }
sending packet to 224.0.0.251:5353
received packet from [fe80::acc3:1c85:eb00:de1e%3]:5353
received question: IN _spotify-connect._tcp.local
found interface Interface { name: "wlp3s0", addr: V4(Ifv4Addr { ip: 192.168.0.8, netmask: 255.255.255.0, broadcast: Some(192.168.0.255) }) }
found interface Interface { name: "br-b2178398e9dc", addr: V4(Ifv4Addr { ip: 172.21.0.1, netmask: 255.255.0.0, broadcast: Some(172.21.255.255) }) }
found interface Interface { name: "docker0", addr: V4(Ifv4Addr { ip: 172.17.0.1, netmask: 255.255.0.0, broadcast: Some(172.17.255.255) }) }
found interface Interface { name: "tun0", addr: V4(Ifv4Addr { ip: 10.8.0.14, netmask: 255.255.255.255, broadcast: None }) }
found interface Interface { name: "wlp3s0", addr: V6(Ifv6Addr { ip: 2a02:908:d81:e040:aeed:5cff:fe71:93ff, netmask: ffff:ffff:ffff:ffff::, broadcast: None }) }
sending packet to [ff02::fb]:5353
received packet from 192.168.0.8:5353
received packet from 192.168.0.8:5353 with no query
received packet from [fe80::aeed:5cff:fe71:93ff%3]:5353
received packet from [fe80::aeed:5cff:fe71:93ff%3]:5353 with no query
registering event source with poller: token=Token(6), interests=READABLE | WRITABLE
deregistering event source from poller
received packet from 192.168.0.244:5353
received question: IN _CC1AD845._sub._googlecast._tcp.local
received question: IN _CC32E753._sub._googlecast._tcp.local
received question: IN _googlecast._tcp.local
received packet from 192.168.0.244:5353
received question: IN _CC1AD845._sub._googlecast._tcp.local
received question: IN _CC32E753._sub._googlecast._tcp.local
received question: IN _googlecast._tcp.local
received packet from 192.168.0.244:5353
received question: IN _spotify-connect._tcp.local
found interface Interface { name: "wlp3s0", addr: V4(Ifv4Addr { ip: 192.168.0.8, netmask: 255.255.255.0, broadcast: Some(192.168.0.255) }) }
found interface Interface { name: "br-b2178398e9dc", addr: V4(Ifv4Addr { ip: 172.21.0.1, netmask: 255.255.0.0, broadcast: Some(172.21.255.255) }) }
found interface Interface { name: "docker0", addr: V4(Ifv4Addr { ip: 172.17.0.1, netmask: 255.255.0.0, broadcast: Some(172.17.255.255) }) }
found interface Interface { name: "tun0", addr: V4(Ifv4Addr { ip: 10.8.0.14, netmask: 255.255.255.255, broadcast: None }) }
found interface Interface { name: "wlp3s0", addr: V6(Ifv6Addr { ip: 2a02:908:d81:e040:aeed:5cff:fe71:93ff, netmask: ffff:ffff:ffff:ffff::, broadcast: None }) }
sending packet to 224.0.0.251:5353
received packet from [fe80::acc3:1c85:eb00:de1e%3]:5353
received question: IN _spotify-connect._tcp.local
found interface Interface { name: "wlp3s0", addr: V4(Ifv4Addr { ip: 192.168.0.8, netmask: 255.255.255.0, broadcast: Some(192.168.0.255) }) }
found interface Interface { name: "br-b2178398e9dc", addr: V4(Ifv4Addr { ip: 172.21.0.1, netmask: 255.255.0.0, broadcast: Some(172.21.255.255) }) }
found interface Interface { name: "docker0", addr: V4(Ifv4Addr { ip: 172.17.0.1, netmask: 255.255.0.0, broadcast: Some(172.17.255.255) }) }
found interface Interface { name: "tun0", addr: V4(Ifv4Addr { ip: 10.8.0.14, netmask: 255.255.255.255, broadcast: None }) }
found interface Interface { name: "wlp3s0", addr: V6(Ifv6Addr { ip: 2a02:908:d81:e040:aeed:5cff:fe71:93ff, netmask: ffff:ffff:ffff:ffff::, broadcast: None }) }
sending packet to [ff02::fb]:5353
received packet from 192.168.0.8:5353
received packet from 192.168.0.8:5353 with no query
received packet from [fe80::aeed:5cff:fe71:93ff%3]:5353
received packet from [fe80::aeed:5cff:fe71:93ff%3]:5353 with no query
received packet from 192.168.0.244:5353
received question: IN _spotify-connect._tcp.local
found interface Interface { name: "wlp3s0", addr: V4(Ifv4Addr { ip: 192.168.0.8, netmask: 255.255.255.0, broadcast: Some(192.168.0.255) }) }
found interface Interface { name: "br-b2178398e9dc", addr: V4(Ifv4Addr { ip: 172.21.0.1, netmask: 255.255.0.0, broadcast: Some(172.21.255.255) }) }
found interface Interface { name: "docker0", addr: V4(Ifv4Addr { ip: 172.17.0.1, netmask: 255.255.0.0, broadcast: Some(172.17.255.255) }) }
found interface Interface { name: "tun0", addr: V4(Ifv4Addr { ip: 10.8.0.14, netmask: 255.255.255.255, broadcast: None }) }
found interface Interface { name: "wlp3s0", addr: V6(Ifv6Addr { ip: 2a02:908:d81:e040:aeed:5cff:fe71:93ff, netmask: ffff:ffff:ffff:ffff::, broadcast: None }) }
sending packet to 224.0.0.251:5353
received packet from [fe80::acc3:1c85:eb00:de1e%3]:5353
received question: IN _spotify-connect._tcp.local
found interface Interface { name: "wlp3s0", addr: V4(Ifv4Addr { ip: 192.168.0.8, netmask: 255.255.255.0, broadcast: Some(192.168.0.255) }) }
found interface Interface { name: "br-b2178398e9dc", addr: V4(Ifv4Addr { ip: 172.21.0.1, netmask: 255.255.0.0, broadcast: Some(172.21.255.255) }) }
found interface Interface { name: "docker0", addr: V4(Ifv4Addr { ip: 172.17.0.1, netmask: 255.255.0.0, broadcast: Some(172.17.255.255) }) }
found interface Interface { name: "tun0", addr: V4(Ifv4Addr { ip: 10.8.0.14, netmask: 255.255.255.255, broadcast: None }) }
found interface Interface { name: "wlp3s0", addr: V6(Ifv6Addr { ip: 2a02:908:d81:e040:aeed:5cff:fe71:93ff, netmask: ffff:ffff:ffff:ffff::, broadcast: None }) }
sending packet to [ff02::fb]:5353
received packet from 192.168.0.8:5353
received packet from 192.168.0.8:5353 with no query
received packet from [fe80::aeed:5cff:fe71:93ff%3]:5353
received packet from [fe80::aeed:5cff:fe71:93ff%3]:5353 with no query
registering event source with poller: token=Token(16777222), interests=READABLE | WRITABLE
deregistering event source from poller
received packet from 192.168.0.244:5353
received question: IN _CC1AD845._sub._googlecast._tcp.local
received question: IN _CC32E753._sub._googlecast._tcp.local
received question: IN _googlecast._tcp.local
received packet from 192.168.0.244:5353
received packet from 192.168.0.244:5353 with no query
received packet from [fe80::acc3:1c85:eb00:de1e%3]:5353
received packet from [fe80::acc3:1c85:eb00:de1e%3]:5353 with no query
registering event source with poller: token=Token(33554438), interests=READABLE | WRITABLE
received packet from 192.168.0.244:5353
received question: IN _CC1AD845._sub._googlecast._tcp.local
received question: IN _CC32E753._sub._googlecast._tcp.local
received question: IN _googlecast._tcp.local
deregistering event source from poller
received packet from 192.168.0.244:5353
received question: IN _spotify-connect._tcp.local
found interface Interface { name: "wlp3s0", addr: V4(Ifv4Addr { ip: 192.168.0.8, netmask: 255.255.255.0, broadcast: Some(192.168.0.255) }) }
found interface Interface { name: "br-b2178398e9dc", addr: V4(Ifv4Addr { ip: 172.21.0.1, netmask: 255.255.0.0, broadcast: Some(172.21.255.255) }) }
found interface Interface { name: "docker0", addr: V4(Ifv4Addr { ip: 172.17.0.1, netmask: 255.255.0.0, broadcast: Some(172.17.255.255) }) }
found interface Interface { name: "tun0", addr: V4(Ifv4Addr { ip: 10.8.0.14, netmask: 255.255.255.255, broadcast: None }) }
found interface Interface { name: "wlp3s0", addr: V6(Ifv6Addr { ip: 2a02:908:d81:e040:aeed:5cff:fe71:93ff, netmask: ffff:ffff:ffff:ffff::, broadcast: None }) }
sending packet to 224.0.0.251:5353
received packet from [fe80::acc3:1c85:eb00:de1e%3]:5353
received question: IN _spotify-connect._tcp.local
found interface Interface { name: "wlp3s0", addr: V4(Ifv4Addr { ip: 192.168.0.8, netmask: 255.255.255.0, broadcast: Some(192.168.0.255) }) }
found interface Interface { name: "br-b2178398e9dc", addr: V4(Ifv4Addr { ip: 172.21.0.1, netmask: 255.255.0.0, broadcast: Some(172.21.255.255) }) }
found interface Interface { name: "docker0", addr: V4(Ifv4Addr { ip: 172.17.0.1, netmask: 255.255.0.0, broadcast: Some(172.17.255.255) }) }
found interface Interface { name: "tun0", addr: V4(Ifv4Addr { ip: 10.8.0.14, netmask: 255.255.255.255, broadcast: None }) }
found interface Interface { name: "wlp3s0", addr: V6(Ifv6Addr { ip: 2a02:908:d81:e040:aeed:5cff:fe71:93ff, netmask: ffff:ffff:ffff:ffff::, broadcast: None }) }
sending packet to [ff02::fb]:5353
received packet from 192.168.0.8:5353
received packet from 192.168.0.8:5353 with no query
received packet from [fe80::aeed:5cff:fe71:93ff%3]:5353
received packet from [fe80::aeed:5cff:fe71:93ff%3]:5353 with no query
registering event source with poller: token=Token(50331654), interests=READABLE | WRITABLE
deregistering event source from poller
registering event source with poller: token=Token(67108870), interests=READABLE | WRITABLE
POST "/" {}
Connecting to AP "ap.spotify.com:443"
registering event source with poller: token=Token(7), interests=READABLE | WRITABLE
flushing framed transport
writing; remaining=378
framed transport flushed
deregistering event source from poller
registering event source with poller: token=Token(83886086), interests=READABLE | WRITABLE
deregistering event source from poller
flushing framed transport
framed transport flushed
attempting to decode a frame
frame decoded from buffer
attempting to decode a frame
drop Spirc[0]
Shutting down player thread ...
drop PlayerInternal[0]
PlayerInternal thread finished.
deregistering event source from poller
drop Session[0]
drop MercuryManager
deregistering event source from poller
drop Dispatch
deregistering event source from poller
deregistering event source from poller
deregistering event source from poller
deregistering event source from poller
<!-- They have to be betwenn the `/summary` and the `/details` HTML tags, and inside the backticks '`' -->  

Compilation flags

  • dbus_mpris
  • dbus_keyring
  • alsa_backend
  • portaudio_backend
  • pulseaudio_backend
  • rodio_backend

Versions (please complete the following information):

  • OS: 5.15.13-arch1-1
  • Spotifyd: 0.3.3
  • cargo: cargo 1.53.0 (4369396ce 2021-04-27)
@achimkrause achimkrause added the bug A functionality or parts of a program that do not work as intended label Jan 12, 2022
@JojiiOfficial
Copy link
Member

It seems like there are parts from the log missing. Could you paste a bit more? (Including your config with the credentials being removed)

@achimkrause
Copy link
Author

I edited the original post to include a full log.

@eladyn
Copy link
Member

eladyn commented Jan 13, 2022

This is probably related to #902 (and maybe #181?) and may have been fixed in librespot since some time.

@ckcr4lyf
Copy link

Facing same issue

$ spotifyd -V
spotifyd 0.3.3

From what I remember there is a flag to make it non discoverable? Can't find it in docs now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A functionality or parts of a program that do not work as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants