Connecting to VPN breaks spotifyd since last update
Description
Since the last update I get this error :
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:
- Install spotifyd
- Start the service or do a spotifyd --no-daemon
- Spotifyd can't create the backend
- 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
Following that it's indeed the vpn that causes the issue. But works with other apps using librespot.
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.
Thank you for the report! Unfortunately, I cannot reproduce this with any of my VPNs. Would you be able to paste
--verboselogs? Not sure that these will provide new information, but it won't hurt.
Here is the log in verbose
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.
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!
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. 👍