KoljaWindeler / ytube_music_player

YouTube music player for homeassistant
345 stars 53 forks source link

Error on music start #325

Closed justinmyersm closed 7 months ago

justinmyersm commented 7 months ago

DEBUG Output

From an unsuccessful play:

2024-04-12 14:12:48.443 ERROR (MainThread) [custom_components.ytube_music_player.media_player] set_shuffle: True
2024-04-12 14:12:48.443 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [S] _tracks_to_attribute
2024-04-12 14:12:48.443 DEBUG (MainThread) [custom_components.ytube_music_player.sensor] updating ytube sensor
2024-04-12 14:12:48.444 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [S] async_update_extra_sensor [E]
2024-04-12 14:12:48.444 DEBUG (MainThread) [custom_components.ytube_music_player.sensor] updating ytube sensor
2024-04-12 14:12:48.444 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [S] async_update_extra_sensor [E]
2024-04-12 14:12:48.444 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [E] _tracks_to_attribute
2024-04-12 14:12:48.447 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [S] play_media, media_type: playlist, media_id: RDTMAK5uy_nYTyd_QBEr9hZMySccZk73KDoBrDPrpGw
2024-04-12 14:12:48.447 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [S] async_prepare_play
2024-04-12 14:12:48.447 DEBUG (MainThread) [custom_components.ytube_music_player.const] - login without brand ID and credential at path /config/.storage/ytube_header.json
2024-04-12 14:12:49.249 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [S] async_check_api ... - no valid API, try to login ... YouTube Api initialized ok, version: 1.6.0 [E]
2024-04-12 14:12:49.249 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [S] async_update_remote_player(Input / current media_player.home_group) [E]
2024-04-12 14:12:49.249 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [S] async_turn_on_media_player [E]
2024-04-12 14:12:49.892 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [S] async_get_cipher [E]
2024-04-12 14:12:49.892 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [E] async_prepare_play
2024-04-12 14:12:50.772 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [S] async_sync_player ... media_player.home_group: off -> idle ... not playing [E]
2024-04-12 14:12:50.805 ERROR (MainThread) [custom_components.ytube_music_player.media_player] get_playlist(playlistId=RDTMAK5uy_nYTyd_QBEr9hZMySccZk73KDoBrDPrpGw)
2024-04-12 14:12:50.805 ERROR (MainThread) [custom_components.ytube_music_player.media_player]
== == == == == == = ytube_music_player Integration Error == == == == == == == ==
2024-04-12 14:12:50.805 ERROR (MainThread) [custom_components.ytube_music_player.media_player] unfortunately we hit an error, please open a ticket at
2024-04-12 14:12:50.805 ERROR (MainThread) [custom_components.ytube_music_player.media_player] https://github.com/KoljaWindeler/ytube_music_player/issues
2024-04-12 14:12:50.805 ERROR (MainThread) [custom_components.ytube_music_player.media_player] and paste the following output:
2024-04-12 14:12:50.806 ERROR (MainThread) [custom_components.ytube_music_player.media_player] Traceback (most recent call last):
File "/config/custom_components/ytube_music_player/media_player.py", line 1607, in async_play_media
File "/config/custom_components/ytube_music_player/media_player.py", line 1607, in <lambda>
2024-04-12 14:12:50.806 ERROR (MainThread) [custom_components.ytube_music_player.media_player]
2024-04-12 14:12:50.806 ERROR (MainThread) [custom_components.ytube_music_player.media_player] == == == == == == = ytube_music_player Integration Error == == == == == == == ==
2024-04-12 14:12:50.807 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [S] async_turn_off_media_player [E]

From a successful play:

2024-04-12 14:16:13.408 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [S] play_media, media_type: playlist, media_id: PL8wcZcV6ZXY-CTVyL6CPlvsKztW8EjdXh
2024-04-12 14:16:13.408 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [S] async_prepare_play
2024-04-12 14:16:13.410 DEBUG (MainThread) [custom_components.ytube_music_player.const] - login without brand ID and credential at path /config/.storage/ytube_header.json
2024-04-12 14:16:14.255 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [S] async_check_api ... - no valid API, try to login ... YouTube Api initialized ok, version: 1.6.0 [E]
2024-04-12 14:16:14.255 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [S] async_update_remote_player(Input / current media_player.home_group) [E]
2024-04-12 14:16:14.255 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [S] async_turn_on_media_player [E]
2024-04-12 14:16:15.231 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [S] async_get_cipher [E]
2024-04-12 14:16:15.231 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [E] async_prepare_play
2024-04-12 14:16:15.562 ERROR (MainThread) [custom_components.ytube_music_player.media_player] get_playlist(playlistId=PL8wcZcV6ZXY-CTVyL6CPlvsKztW8EjdXh)
2024-04-12 14:16:15.562 ERROR (MainThread) [custom_components.ytube_music_player.media_player] - shuffle new tracklist
2024-04-12 14:16:15.562 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [S] _tracks_to_attribute
2024-04-12 14:16:15.562 DEBUG (MainThread) [custom_components.ytube_music_player.sensor] updating ytube sensor
2024-04-12 14:16:15.563 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [S] async_update_extra_sensor [E]
2024-04-12 14:16:15.563 DEBUG (MainThread) [custom_components.ytube_music_player.sensor] updating ytube sensor
2024-04-12 14:16:15.563 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [S] async_update_extra_sensor [E]
2024-04-12 14:16:15.564 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [E] _tracks_to_attribute
2024-04-12 14:16:15.564 ERROR (MainThread) [custom_components.ytube_music_player.media_player] _play
2024-04-12 14:16:15.564 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [S] async_get_track
2024-04-12 14:16:15.564 ERROR (MainThread) [custom_components.ytube_music_player.media_player] - Playing track nr 1 / 25
2024-04-12 14:16:15.564 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [S] async_get_url
2024-04-12 14:16:15.564 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [S] async_get_url_self
2024-04-12 14:16:15.564 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [S] async_check_api [E]
2024-04-12 14:16:15.565 ERROR (MainThread) [custom_components.ytube_music_player.media_player] - try to find URL on our own
2024-04-12 14:16:15.853 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [S] async_sync_player ... media_player.home_group: off -> idle ... not playing [E]
2024-04-12 14:16:15.861 ERROR (MainThread) [custom_components.ytube_music_player.media_player] found 6 streams
2024-04-12 14:16:15.861 ERROR (MainThread) [custom_components.ytube_music_player.media_player] - removed stream with too high bitrate of 259348
2024-04-12 14:16:15.861 ERROR (MainThread) [custom_components.ytube_music_player.media_player] - removed stream with too high bitrate of 141088
2024-04-12 14:16:15.861 ERROR (MainThread) [custom_components.ytube_music_player.media_player] Using stream 0/4, bitrate:150546
2024-04-12 14:16:15.862 ERROR (MainThread) [custom_components.ytube_music_player.media_player] signature not found, decoding
2024-04-12 14:16:15.862 ERROR (MainThread) [custom_components.ytube_music_player.media_player] - self decoded URL via cipher
2024-04-12 14:16:15.862 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [E] async_get_url
2024-04-12 14:16:15.901 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [S] async_sync_player ... media_player.home_group: idle -> idle ... not playing [E]
2024-04-12 14:16:15.945 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [S] async_sync_player ... media_player.home_group: idle -> idle ... not playing [E]
2024-04-12 14:16:16.211 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [E] async_get_url
2024-04-12 14:16:16.211 ERROR (MainThread) [custom_components.ytube_music_player.media_player] - forwarding url to player media_player.home_group
2024-04-12 14:16:16.212 DEBUG (MainThread) [custom_components.ytube_music_player.sensor] updating ytube sensor
2024-04-12 14:16:16.212 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [S] async_update_extra_sensor [E]
2024-04-12 14:16:16.327 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [S] async_sync_player ... media_player.home_group: idle -> idle
2024-04-12 14:16:16.327 ERROR (MainThread) [custom_components.ytube_music_player.media_player] detected app _id, CC1AD845
2024-04-12 14:16:16.328 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [E] async_sync_player
2024-04-12 14:16:17.276 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [S] async_sync_player ... media_player.home_group: idle -> buffering [E]
2024-04-12 14:16:17.622 DEBUG (MainThread) [custom_components.ytube_music_player.sensor] updating ytube sensor
2024-04-12 14:16:17.623 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [S] async_update_extra_sensor [E]
2024-04-12 14:16:17.623 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [E] async_get_track
2024-04-12 14:16:17.624 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [E] play_media
2024-04-12 14:16:19.045 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [S] async_sync_player ... media_player.home_group: buffering -> playing [E]
2024-04-12 14:16:20.022 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [S] async_sync_player ... media_player.home_group: playing -> playing [E]

Another unsuccessful play:

2024-04-12 14:18:53.155 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [S] play_media, media_type: playlist, media_id: RDTMAK5uy_mZtXeU08kxXJOUhL0ETdAuZTh1z7aAFAo
2024-04-12 14:18:53.155 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [S] async_prepare_play
2024-04-12 14:18:53.155 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [S] async_check_api [E]
2024-04-12 14:18:53.155 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [S] async_update_remote_player(Input / current media_player.home_group) [E]
2024-04-12 14:18:53.155 ERROR (MainThread) [custom_components.ytube_music_player.media_player] async_media_stop
2024-04-12 14:18:53.156 ERROR (MainThread) [custom_components.ytube_music_player.media_player] - async_media_stop -> media_player.home_group
2024-04-12 14:18:53.224 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [S] async_get_cipher
2024-04-12 14:18:53.224 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [S] async_sync_player ... media_player.home_group: playing -> idle ... not playing [E]
2024-04-12 14:18:54.115 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [E] async_get_cipher
2024-04-12 14:18:54.115 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [E] async_prepare_play
2024-04-12 14:18:54.350 ERROR (MainThread) [custom_components.ytube_music_player.media_player] get_playlist(playlistId=RDTMAK5uy_mZtXeU08kxXJOUhL0ETdAuZTh1z7aAFAo)
2024-04-12 14:18:54.350 ERROR (MainThread) [custom_components.ytube_music_player.media_player]
== == == == == == = ytube_music_player Integration Error == == == == == == == ==
2024-04-12 14:18:54.350 ERROR (MainThread) [custom_components.ytube_music_player.media_player] unfortunately we hit an error, please open a ticket at
2024-04-12 14:18:54.350 ERROR (MainThread) [custom_components.ytube_music_player.media_player] https://github.com/KoljaWindeler/ytube_music_player/issues
2024-04-12 14:18:54.350 ERROR (MainThread) [custom_components.ytube_music_player.media_player] and paste the following output:
2024-04-12 14:18:54.351 ERROR (MainThread) [custom_components.ytube_music_player.media_player] Traceback (most recent call last):
File "/config/custom_components/ytube_music_player/media_player.py", line 1607, in async_play_media
File "/config/custom_components/ytube_music_player/media_player.py", line 1607, in <lambda>
2024-04-12 14:18:54.352 ERROR (MainThread) [custom_components.ytube_music_player.media_player]
2024-04-12 14:18:54.352 ERROR (MainThread) [custom_components.ytube_music_player.media_player] == == == == == == = ytube_music_player Integration Error == == == == == == == ==
2024-04-12 14:18:54.353 ERROR (MainThread) [custom_components.ytube_music_player.media_player] [S] async_turn_off_media_player [E]

Describe the bug The bug causes YouTube Music to frequently produce an error when attempting to play music. The issue occurs when selecting a playlist; the music tries to start but then abruptly stops. This problem also arises while already listening to music, where playback attempts to continue but then halts. Occasionally, music playback works without issues.

Version 20240404.01

To Reproduce Steps to reproduce the behavior:

  1. Try to play music.

Additional context It seems random when it happens, and I am not able to pinpoint a certain speaker group or playlist that causes the issue.

Thanks

justinmyersm commented 7 months ago

Removed and reauthorized the integration. Much nicer sign-in process! It appears things are back in working order and other features have appeared. Could never get the track limits to work, but now a whole new dialog box pops up with those and other additions. Apologies for the bug report!