librespot-org / librespot

Open Source Spotify client library
MIT License
4.46k stars 540 forks source link

Librespot instance not shown in latest android/web spotify app #1253

Open xhpohanka opened 4 months ago

xhpohanka commented 4 months ago

Describe the bug I'm not sure when it started, but my librespot instance is not visible anymore in spotify application. The only solution I found is to use -u and -p and let the librespot log in with my credentials.

Spotify application on my linux box in version 1.2.26.1187.g36b715a1 is still able to show and connect to librespot even without login.

Is this behavior documented somewhere?

kingosticks commented 4 months ago

Librespot running on what platform?

xhpohanka commented 4 months ago

I first noticed it on my RPi box running libreelec. I can reproduce it on my workstation with up to date Arch linux.

Update: android spotify 8.9.12.599 works 8.9.14.543 does not...

gianklug commented 4 months ago

Can reproduce as well, -u and -p works.

noahhaon commented 4 months ago

Yes, this has been the case for some time. The issue is that the app must be running on a mobile device on the same network as librespot for discovery and credential sharing to work. Librespot will seem flaky if it restarts and the mobile app discovery stuff isn't visible to it. It will fail to connect and will no longer be visible through through the web API.

You can use the web API directly to help diagnose this:

https://api.spotify.com/v1/me/player/devices

xhpohanka commented 3 months ago

All this seems strange to me I have found that librespot without specified username works fine for my wife using Samsung S24 and Spotify 8.9.20.574, my Xperia with same Spotify version does not see the instance at all. When I use the username then my wife's phone is not able to connect (we don't have a family account). The web API behaves the same as my phone.