Pychromcast launch error
jsv93 opened this issue · comments
I have had spotcast working perfectly for the past few weeks but randomly today it stopped working. When using automations to trigger playback the device activates with a tone, turns blue on the dashboard but never starts palying. If I play from Spotify Card then the device will start playing but as far as the card is concerned its not playing at all. The error I get is a follows:
Logger: homeassistant.core
Source: custom_components/spotcast/spotify_controller.py:104
Integration: Spotcast ([documentation](https://github.com/fondberg/spotcast), [issues](https://github.com/fondberg/spotcast/issues))
First occurred: 1:19:56 AM (1 occurrences)
Last logged: 1:19:56 AM
Error executing service: <ServiceCall spotcast.start (c:01GJWTRFM2GS8ZX1XXWY7DENRM): entity_id=media_player.nestmini6848, uri=spotify:playlist:1VUHrlqej8RaZ28YgWgFOx, force_playback=False, random_song=False, start_volume=101, ignore_fully_played=False, limit=20, repeat=off, shuffle=False, offset=0>
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/core.py", line 1762, in catch_exceptions
await coro_or_task
File "/usr/src/homeassistant/homeassistant/core.py", line 1787, in _execute_service
await self._hass.async_add_executor_job(
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/spotcast/__init__.py", line 190, in start_casting
spotify_device_id = spotcast_controller.get_spotify_device_id(
File "/config/custom_components/spotcast/spotcast_controller.py", line 240, in get_spotify_device_id
spotify_cast_device.startSpotifyController(access_token, expires)
File "/config/custom_components/spotcast/spotcast_controller.py", line 95, in startSpotifyController
sp.launch_app()
File "/config/custom_components/spotcast/spotify_controller.py", line 104, in launch_app
raise LaunchError(
pychromecast.error.LaunchError: Timeout when waiting for status response from Spotify app
I have, installed (and re-installed) spotcast, updated the sp_dc and sp_keys, removed the original spotify integrations and re-added them but nothing seems to work. Any help would be greatly appreciated.
EDIT: Calling the spotcast service when using the Friendly Name results in activation but no playback, calling the service a second time via the friendly name begins playback. Reporting to HA is hit and miss though and doesnt always report back that it is playing. Calling the spotcast service using either device name or ID results in activation but no palyback and calling a seccond time results in an "unknown error"
Fixed as per fondberg/spotcast#365