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

Playlist always shows loading #366

Open
rugal7699 opened this issue Nov 9, 2024 · 7 comments
Open

Playlist always shows loading #366

rugal7699 opened this issue Nov 9, 2024 · 7 comments

Comments

@rugal7699
Copy link

Is anyone else experiencing an issue where their playlist always shows ‘loading’? Any suggestions or insights would be appreciated!

Log:
File "/config/custom_components/ytube_music_player/media_player.py", line 1136, in async_update_playlists self._playlists = await self.hass.async_add_executor_job(lambda: self._api.get_library_playlists(limit=self._trackLimit)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/ytube_music_player/media_player.py", line 1136, in self._playlists = await self.hass.async_add_executor_job(lambda: self._api.get_library_playlists(limit=self._trackLimit)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/ytmusicapi/mixins/library.py", line 33, in get_library_playlists response = self._send_request(endpoint, body) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/ytmusicapi/ytmusic.py", line 242, in _send_request raise YTMusicServerError(message + error) ytmusicapi.exceptions.YTMusicServerError: Server returned HTTP 400: Bad Request. Request contains an invalid argument.

@wtaferner
Copy link

Yes, there seems to be a new issue. Not sure why, as I have registered two users/devices and it only happens with one and even when I delete it and recreate and restart. I checked the config file and the authentication seems fine (at least I have all the tokens needed). But most likely the other one is still using some kind of cache, otherwise it would not make sense at all.

A different request but the same issue I would say.

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 28, in _handle_async_response
    await func(hass, connection, msg)
  File "/usr/src/homeassistant/homeassistant/components/media_player/__init__.py", line 1316, in websocket_browse_media
    payload = await player.async_browse_media(media_content_type, media_content_id)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/ytube_music_player/media_player.py", line 2155, in async_browse_media
    response = await build_item_response(self, payload)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/ytube_music_player/browse_media.py", line 93, in build_item_response
    media = await hass.async_add_executor_job(media_library.get_home, 20)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/ytmusicapi/mixins/browsing.py", line 115, in get_home
    response = self._send_request(endpoint, body)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/ytmusicapi/ytmusic.py", line 242, in _send_request
    raise YTMusicServerError(message + error)
ytmusicapi.exceptions.YTMusicServerError: Server returned HTTP 400: Bad Request.
Request contains an invalid argument.

@wtaferner
Copy link

Ok, duplicate of #364 and the reasoning sounds legit. New encryption which is not yet applied to all users.

@Yonny24
Copy link

Yonny24 commented Nov 26, 2024

Tried the new version with the old token method. It accepts the token but still does not load any media sadly.
Will try a few tokens later

@supremelucifer
Copy link

Remeber you have to see the browse token header. I got a browse without the token and i didnt see any playlist. Klikt on a song, got a new browse section with a toke id, paste it in and it worked

@Yonny24
Copy link

Yonny24 commented Nov 27, 2024

Remeber you have to see the browse token header. I got a browse without the token and i didnt see any playlist. Klikt on a song, got a new browse section with a toke id, paste it in and it worked

thanks - back in business!

@GyHUN95
Copy link

GyHUN95 commented Dec 1, 2024

Actually, the tokens woks for a while, but every HA restart kills it and always show up the loading again, and nowadays it's pretty dead, cause after accept the token infos, nothing changes.

Traceback (most recent call last): File "/config/custom_components/ytube_music_player/media_player.py", line 1136, in async_update_playlists self._playlists = await self.hass.async_add_executor_job(lambda: self._api.get_library_playlists(limit=self._trackLimit)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) File "/config/custom_components/ytube_music_player/media_player.py", line 1136, in self._playlists = await self.hass.async_add_executor_job(lambda: self._api.get_library_playlists(limit=self._trackLimit)) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.13/site-packages/ytmusicapi/mixins/library.py", line 33, in get_library_playlists response = self._send_request(endpoint, body) File "/usr/local/lib/python3.13/site-packages/ytmusicapi/ytmusic.py", line 242, in _send_request raise YTMusicServerError(message + error) ytmusicapi.exceptions.YTMusicServerError: Server returned HTTP 401: Unauthorized. You must be signed in to perform this operation.

@patrikvodak
Copy link

I have the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants