-
Notifications
You must be signed in to change notification settings - Fork 217
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
Raspotify only shows in device list via API after Spotify App selects it #663
Comments
This issue has been marked as stale. It will closed in 7 days if there is no activity. |
Please try the latest release and see if it fixes your problem. |
Same issue here. Also on version 0.44.0. Spotify API only lists the device if I first used it via the official mobile app. However I only see the device in the spotify app if I'm connected to the same wifi as the raspotify device. If I use LTE I don't see it in the spotify app. Not sure if this was to be expected. Maybe this helps or anybody can tell me what might be the problem. |
Not sure what causes this, but I would check if mDNS is working properly. Is |
I'm almost certain that you must be on the same network as Raspotify to see the device unless you have used it quite recently (or it is logged in). |
I get this on my rpi:
dont know where the first hostname conflict comes from and if it has something to do with my problem. I connect my rpi with raspotify to the same wifi as my laptop. If I use the spotify app on my laptop i see the raspotify device and can select it. However the flutter app running on the same rpi doesn't get the device listed via spotify api request initially. Only after I first selected it from my laptop then its possible for the flutter app to get it listed via spotify api request. If I request the devices from my laptop using postman and this api https://developer.spotify.com/documentation/web-api/reference/get-a-users-available-devices then I only see my laptop listed although the spotify app on the same laptop using the same user credentials lists the raspotify device also. If I then quickly select the device in the spotify app I also get it with the request. And I still get it if I select the laptop again as my playing device. |
To the best of my knowledge, there are two ways that Spotify clients may see available devices:
You can check if the service is discoverable by running:
|
I get
I still dont get why the laptop in the same network is able to "see" it when using the official app but not when using the web api. And why it needs this initial selection. I dont know the details but my guess is that the official app is either using a different API and/or somehow authorizing the raspotify device when it selects it. Is there a possibility to log/debug the raspotify service in detail. I would like to know if there is anything special happening when I initially select it by the official app. Or do you have another Idea what I can check? |
This is my understanding of how it works: Spotify's Web API doesn't know about your device because yet because the device is not logged in to Spotify with your user credentials. The official app uses auto-discovery (through avahi) to find devices on the local network, and merges the list of local devices with the list of devices it got from the Web API. However, when you connect to a device, the device info gets sent to Spotify servers, and during the time that device is "active" you can also access it through the Web API. |
So if I understand correctly, a device is not visible (recognized by the Spotify servers) before this step. Only the official app or the device itself, when it logs in, can add the device to the servers. I assume the device can only log in using the credentials defined here? These would be the credentials LIBRESPOT_USERNAME and LIBRESPOT_PASSWORD that need to be added to the etc/raspotify/conf file, correct? However, I always get an error stating that the password couldn't be set when I try to create one. Which brings me to the next point: Unfortunately, it seems like Spotify has disabled the option to use credentials. There are other issues related to this (Spotifyd/spotifyd#1293) where they mention that this might be the case. Do you know any details and/or can confirm that? |
I believe so.
Yes, and also third party apps will do this.
See #675 for the credentials issue. |
I'm going to close this issue, feel free to comment and/or re-open if you have any other questions. |
Compatible Device
Are you sure?
Compatible OS
Compatible Configuration
Latest Version
Are you sure?
Due Diligence
What happened?
When using the Spotify Web API, Raspotify is not in the device list via API.
However, it IS showing in the spotify mac app
Once I choose Raspotify in the Spotify Mac App, then the Spotify Web Api will return the device and can be used.
Do we have any idea why the Mac App has to first choose Raspotify before it can be a visible device in the API? I've made the API calls using Postman, to rule out any possible issue with Spotipy.
Relevant log output and/or the contents of /etc/raspotify/crash_report if any ( sudo journalctl -u raspotify -b and sudo cat /etc/raspotify/crash_report )
The text was updated successfully, but these errors were encountered: