spotifyd icon indicating copy to clipboard operation
spotifyd copied to clipboard

Connecting to VPN breaks spotifyd since last update

Open arc-d3v opened this issue 1 month ago • 5 comments

Description

Since the last update I get this error : Image

It successfully authenticate though. The new version of librespot works well with ncspot but something broke with spotifyd. Note that I use a I use a vpn. I already tried to build from source, same issue

To Reproduce Steps to reproduce the behavior:

  1. Install spotifyd
  2. Start the service or do a spotifyd --no-daemon
  3. Spotifyd can't create the backend
  4. See error in debug

Expected behavior

Logs

Click to show logs
[INFO] Country: "FR"
[ERROR] starting dealer failed: Invalid state { Websocket couldn't be started because: Service unavailable { Connection refused (os error 111) } }
[INFO] Converting with ditherer: tpdf

Compilation flags

  • [x] dbus_mpris
  • [ ] alsa_backend
  • [ ] portaudio_backend
  • [x] pulseaudio_backend
  • [ ] rodio_backend

Versions (please complete the following information):

  • OS: Arch Linux 6.17.8
  • Spotifyd: 0.4.2
  • cargo: 1.88.0

arc-d3v avatar Nov 22 '25 02:11 arc-d3v

Following that it's indeed the vpn that causes the issue. But works with other apps using librespot.

arc-d3v avatar Nov 22 '25 02:11 arc-d3v

Thank you for the report! Unfortunately, I cannot reproduce this with any of my VPNs. Would you be able to paste --verbose logs? Not sure that these will provide new information, but it won't hurt.

eladyn avatar Nov 23 '25 10:11 eladyn

Thank you for the report! Unfortunately, I cannot reproduce this with any of my VPNs. Would you be able to paste --verbose logs? Not sure that these will provide new information, but it won't hurt.

Here is the log in verbose

Image

Looks like the problem might be from librespot-connect.

I use mullvad vpn as vpn, I tried many servers and options but no luck and when I use mullvad-exclude spotifyd --no-daemon --verbose to add spotifyd to split tunneling, it works well.

arc-d3v avatar Nov 23 '25 11:11 arc-d3v

Thank you! I did some debugging myself, and it seems like it is an IPv6 problem. Mullvad VPN currently doesn't seem to tunnel IPv6 by default, although you can enable it in the settings. You can try curl https://gew4-dealer.spotify.com and curl -6 https://gew4-dealer.spotify.com, the first should succeed and the latter should fail without IPv6 support in Mullvad.

I still think that librespot shouldn't handle IPv6 not being available more gracefully and try also with IPv4, I will create a PR for that.

And finally, I think the reason for ncspot working is that they do not use Spirc (the inter-device communication protocol of Spotify, making spotifyd visible in clients) and thus never try to start the dealer.

Hope this helps, if anything in my analysis doesn't seem right, let me know!

eladyn avatar Nov 23 '25 13:11 eladyn

It was IPv6! I tried many options in mullvad gui but missed enabling IPv6. It works well now with the option enabled.

Thank you for your help and opening a PR to solve IPv4 issue. 👍

arc-d3v avatar Nov 23 '25 14:11 arc-d3v