Suddenly from nowhere (?) I have been running into issues with devices (especially iPhones) not keeping their connection to Spotify.
After making sure that the Spotify app have been started/activated on the iPhone, I call SpotifyApi.player.devices() from my app. The iPhone is then one of the devices that is returned in the list.
After a few seconds when calling SpotifyApi.player.startOrResume(...) to play a track on the specific device id, the API returns the call with 404 Device not found or just 404 not found.
Checking the active devices through SpotifyApi.player.devices(), the iPhone device is no longer in the list...
Having googled for this, it seems like a fairly common issue and something that seems to pop up now and then? This issue does not happen with my laptop, as it is "always" in the list of available devices and also possible to target as device for playing a track - no matter how long time has passed.
Anyone with any idea(s) of how to solve this?
On a separate note, and more specifically related to this library... In the scenario above (trying to play a track on an unavailable device) I get the below unhandled exception. Seems like the following call to PlayerEndpoint.playbackState returns an empty string that isn't handled by the library:
Suddenly from nowhere (?) I have been running into issues with devices (especially iPhones) not keeping their connection to Spotify.
After making sure that the Spotify app have been started/activated on the iPhone, I call
SpotifyApi.player.devices()
from my app. The iPhone is then one of the devices that is returned in the list. After a few seconds when callingSpotifyApi.player.startOrResume(...)
to play a track on the specific device id, the API returns the call with404 Device not found
or just404 not found
. Checking the active devices throughSpotifyApi.player.devices()
, the iPhone device is no longer in the list...Having googled for this, it seems like a fairly common issue and something that seems to pop up now and then? This issue does not happen with my laptop, as it is "always" in the list of available devices and also possible to target as device for playing a track - no matter how long time has passed. Anyone with any idea(s) of how to solve this?
On a separate note, and more specifically related to this library... In the scenario above (trying to play a track on an unavailable device) I get the below unhandled exception. Seems like the following call to PlayerEndpoint.playbackState returns an empty string that isn't handled by the library:
Thanks!