Skip to content
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

After trying to play some particular songs, nothing happens, and no other Spotify content can be played #397

Open
V69dxz opened this issue Jul 22, 2023 · 7 comments
Assignees
Labels
bug Something isn't working v5 Will be worked on in v5

Comments

@V69dxz
Copy link

V69dxz commented Jul 22, 2023

Bug Ticket

Describe the bug

Thank you for this integration!

After clicking certain particular songs or playlists on Spotify in the mediaplayer, Spotcast crashes (?) and I am unable to select and play other songs and playlists. When I restart Home Assistant everything works again as expected. (NB. I also had this error once after I tried to play a radio station from the radio integration that was no longer available / IP address was unavailable).

Troubleshooting

Make sure to validate all the elements before submitting the ticket (Exception to the steps marked as optional)

Troubleshooting

Make sure to validate all the elements before submitting the ticket (Exception to the steps marked as optional)

[x ] Using latest version of spotcast
[x ] Using latest stable version of Home Assistant
[x ] I have setup the Spotify integration in Home Assistant
[ x ] I have renewed my sp_dc and sp_key values and restarted Home Assistant (see README)
[ x] (optional) I have Spotify Premium
(optional) I am using multiple accounts
(optional) I'm attaching relevant logs with level debug for component spotcast (see README)
(optional) I'm using entity_id in the service call and have tried device_name but the issue remains
Environment

Installation type: [HA_OS|Container|Supervised|Core]
HA version: [2023.7 ]

Logs

  • normal|debug
No new error logs seem to be created after a crash.

<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: 18:27:31 (1 occurrences) 
Last logged: 18:27:31

Error executing service: <ServiceCall spotcast.start (c:01H5Z6TV9F9R8VMM0NMTQTNM2V): entity_id=media_player.nest_mini_room, uri=spotify:track:3NFnEfVZrBP2ergaV6zibG, random_song=False, start_volume=101, limit=20, repeat=off, force_playback=False, shuffle=False, offset=0, ignore_fully_played=False>
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/core.py", line 1983, in catch_exceptions
    await coro_or_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 2013, in _execute_service
    return await self._hass.async_add_executor_job(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/spotcast/__init__.py", line 221, in start_casting
    spotify_device_id = spotcast_controller.get_spotify_device_id(
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/spotcast/spotcast_controller.py", line 250, 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>

Additional context

@V69dxz V69dxz added the bug Something isn't working label Jul 22, 2023
@V69dxz V69dxz changed the title After trying to play some songs, nothing happens, and no other Spotify content can’t be played After trying to play some songs, nothing happens, and no other Spotify content can be played Jul 22, 2023
@V69dxz V69dxz changed the title After trying to play some songs, nothing happens, and no other Spotify content can be played After trying to play some particular songs, nothing happens, and no other Spotify content can be played Jul 22, 2023
@easterapps
Copy link

Hi, i had a similar issue. Please check the keys (sp_key and sp_dc) and also check the app in spotify developer.

@V69dxz
Copy link
Author

V69dxz commented Jul 31, 2023

Ok, thanks. Good suggestions. I will double check the app in Spotify developer. (I already renewed the key and dc.)

@ste-ta
Copy link

ste-ta commented Aug 1, 2023

I am having the Same issues since a Couplet of days. Starting Playlists and Albums works a coupel of tmes and suddenly stops. Afterwards I need to restart HA and it works again.

Logger: homeassistant.core
Source: custom_components/spotcast/spotify_controller.py:104
Integration: Spotcast (documentation, issues)
First occurred: 09:33:22 (2 occurrences)
Last logged: 10:00:09

Error executing service: <ServiceCall spotcast.start (c:01H6R07ZKJZEZ636C2CE6PMDP9): entity_id=media_player.lg_dsn8yg_0981, uri=spotify:album:7a0cCpsKO6Uux6eFFZns9S, repeat=off, shuffle=False, start_volume=101, force_playback=False, limit=20, offset=0, ignore_fully_played=False, random_song=False>
Error executing service: <ServiceCall spotcast.start (c:01H6R1S0SD3G5E99MT4BAJN159): entity_id=media_player.lg_dsn8yg_0981, uri=spotify:album:5BCDZehG1Ir8cokNvw6Lio, repeat=off, shuffle=False, start_volume=101, force_playback=False, limit=20, offset=0, ignore_fully_played=False, random_song=False>
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/core.py", line 1983, in catch_exceptions
    await coro_or_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 2013, in _execute_service
    return await self._hass.async_add_executor_job(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/spotcast/__init__.py", line 221, in start_casting
    spotify_device_id = spotcast_controller.get_spotify_device_id(
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/spotcast/spotcast_controller.py", line 250, 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

@oshriphoto
Copy link

It seems that this is a problem that appears to many users, does anyone have a solution to this problem? Is the developer of the plugin in the group and reading the errors? Maybe he can respond and say if it is in treatment or not?

@V69dxz
Copy link
Author

V69dxz commented Aug 31, 2023

I confirm that I still have this problem.

A working hypothesis: does this happen when/after I open my Spotify account on another device confusing Spotify?

@fcusson
Copy link
Collaborator

fcusson commented Dec 5, 2024

@pmkruyen, @easterapps, @oshriphoto has anyone been able to test with the new beta if this issue is resolved. I implemented a much better way handling closing and opening the Spotify app on Chromecast in this iteration

@fcusson fcusson added the v5 Will be worked on in v5 label Dec 10, 2024
@michi1g
Copy link

michi1g commented Dec 31, 2024

I was running into the same issue. Tried the latest beta and it is working now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working v5 Will be worked on in v5
Projects
None yet
Development

No branches or pull requests

6 participants