[GH-ISSUE #141] Seems like the API is not returning any of my playlists #104

Closed
opened 2026-02-27 22:08:02 +03:00 by kerem · 37 comments
Owner

Originally created by @bobvmierlo on GitHub (Jan 3, 2021).
Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/141

It seems like this API is not returning any of my playlists while being used within KoljaWindeler's custom integration for Home Assistant.
See issue here

Any chance you can figure out the problem?

Originally created by @bobvmierlo on GitHub (Jan 3, 2021). Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/141 It seems like this API is not returning any of my playlists while being used within [KoljaWindeler's custom integration](https://github.com/KoljaWindeler/ytube_music_player) for Home Assistant. See issue [here](https://github.com/KoljaWindeler/ytube_music_player/issues/37#issuecomment-753647208) Any chance you can figure out the problem?
kerem closed this issue 2026-02-27 22:08:03 +03:00
Author
Owner

@KoljaWindeler commented on GitHub (Jan 3, 2021):

FYI this is here github.com/KoljaWindeler/ytube_music_player@03f515d3d9/custom_components/ytube_music_player/media_player.py (L634)
Straight call with limit=99

<!-- gh-comment-id:753651652 --> @KoljaWindeler commented on GitHub (Jan 3, 2021): FYI this is here https://github.com/KoljaWindeler/ytube_music_player/blob/03f515d3d9bc45e3f0ec5477568942253c870f2c/custom_components/ytube_music_player/media_player.py#L634 Straight call with limit=99
Author
Owner

@sigma67 commented on GitHub (Jan 3, 2021):

Have you double checked that your credentials are correct? Can you interact with other library functionality, like liking songs, getting library artists etc.)?

<!-- gh-comment-id:753683235 --> @sigma67 commented on GitHub (Jan 3, 2021): Have you double checked that your credentials are correct? Can you interact with other library functionality, like liking songs, getting library artists etc.)?
Author
Owner

@bobvmierlo commented on GitHub (Jan 4, 2021):

When I hardcode the playlist ID in homeassistant it starts the playlist and also retrieves songtitle, artist and artwork.
It just seems like the API is not returning my list of playlists, but it does work when hardcoding the playlist ID.

Also to answer your first question, i've checked my credentials multiple times to rule this issue out.

Does this answer your question?

<!-- gh-comment-id:753991385 --> @bobvmierlo commented on GitHub (Jan 4, 2021): When I hardcode the playlist ID in homeassistant it starts the playlist and also retrieves songtitle, artist and artwork. It just seems like the API is not returning my list of playlists, but it does work when hardcoding the playlist ID. Also to answer your first question, i've checked my credentials multiple times to rule this issue out. Does this answer your question?
Author
Owner

@sigma67 commented on GitHub (Jan 4, 2021):

starts the playlist and also retrieves songtitle, artist and artwork.

That does not require authenticated credentials, unless the playlist is private.

Assuming the issue is not with the credentials, could you follow the instructions here and report back?

<!-- gh-comment-id:754026353 --> @sigma67 commented on GitHub (Jan 4, 2021): > starts the playlist and also retrieves songtitle, artist and artwork. That does not require authenticated credentials, unless the playlist is private. Assuming the issue is not with the credentials, could you follow the instructions [here ](https://github.com/sigma67/ytmusicapi/issues/119#issuecomment-752910980)and report back?
Author
Owner

@KoljaWindeler commented on GitHub (Jan 4, 2021):

Hmm maybe. Is there a way to test if a "login" worked out?

My code runs a lib function call right after login (self._api.get_library_songs()) that usually throws a exception if something isn't correct with the cookie . That didn't happen here.
Kolja

<!-- gh-comment-id:754031554 --> @KoljaWindeler commented on GitHub (Jan 4, 2021): Hmm maybe. Is there a way to test if a "login" worked out? My code runs a lib function call right after login (self._api.get_library_songs()) that usually throws a exception if something isn't correct with the cookie . That didn't happen here. Kolja
Author
Owner

@sigma67 commented on GitHub (Jan 4, 2021):

Ah that's good to know. But then the playlists should be returned as well, unless he has a brand account with no playlists or an error is thrown.

<!-- gh-comment-id:754050684 --> @sigma67 commented on GitHub (Jan 4, 2021): Ah that's good to know. But then the playlists should be returned as well, unless he has a brand account with no playlists or an error is thrown.
Author
Owner

@bobvmierlo commented on GitHub (Jan 4, 2021):

I retried configuring with the instructions you linked above:

Assuming the issue is not with the credentials, could you follow the instructions here and report back?

Still no playlist titles though.

My playlists are all public, and I'm not sure what you mean by a brand account. My account is a old personal gmail account from way back when youtube started.

<!-- gh-comment-id:754102533 --> @bobvmierlo commented on GitHub (Jan 4, 2021): I retried configuring with the instructions you linked above: > Assuming the issue is not with the credentials, could you follow the instructions [here ](https://github.com/sigma67/ytmusicapi/issues/119#issuecomment-752910980)and report back? Still no playlist titles though. My playlists are all public, and I'm not sure what you mean by a brand account. My account is a old personal gmail account from way back when youtube started.
Author
Owner

@sigma67 commented on GitHub (Jan 4, 2021):

Sorry if I wasn't clear, could you upload the response that you copied in the instructions to Pastebin or post it here? Just so I can see what is being returned and why it isn't being processed. The assumption is that there is an error parsing your playlists due to some special playlists you might have.

<!-- gh-comment-id:754104998 --> @sigma67 commented on GitHub (Jan 4, 2021): Sorry if I wasn't clear, could you upload the response that you copied in the instructions to Pastebin or post it here? Just so I can see what is being returned and why it isn't being processed. The assumption is that there is an error parsing your playlists due to some special playlists you might have.
Author
Owner

@KoljaWindeler commented on GitHub (Jan 4, 2021):

And just to make sure: you do have a youtube music premium subscription, right?

<!-- gh-comment-id:754108516 --> @KoljaWindeler commented on GitHub (Jan 4, 2021): And just to make sure: you do have a youtube music premium subscription, right?
Author
Owner

@bobvmierlo commented on GitHub (Jan 4, 2021):

I can paste the request header response, though I would like to leave some info out. Are there any fielda you specifically need for troubleshooting?

Also @KoljaWindeler: Yes I do have premium, it does not say anywhere in your repository that this is mandatory though..

<!-- gh-comment-id:754116329 --> @bobvmierlo commented on GitHub (Jan 4, 2021): I can paste the request header response, though I would like to leave some info out. Are there any fielda you specifically need for troubleshooting? Also @KoljaWindeler: Yes I do have premium, it does not say anywhere in your repository that this is mandatory though..
Author
Owner

@KoljaWindeler commented on GitHub (Jan 4, 2021):

True, added to readme just now .. i've never assumed that this would be the root-cause, just wanted to make sure

<!-- gh-comment-id:754123722 --> @KoljaWindeler commented on GitHub (Jan 4, 2021): True, added to readme just now .. i've never assumed that this would be the root-cause, just wanted to make sure
Author
Owner

@sigma67 commented on GitHub (Jan 5, 2021):

All that's needed is the response, containing the playlists themselves (playlist titles, song counts). Feel free to redact playlist titles, I don't think that should be the cause (unless they're empty titles or something odd like that).

<!-- gh-comment-id:754511156 --> @sigma67 commented on GitHub (Jan 5, 2021): All that's needed is the response, containing the playlists themselves (playlist titles, song counts). Feel free to redact playlist titles, I don't think that should be the cause (unless they're empty titles or something odd like that).
Author
Owner

@bobvmierlo commented on GitHub (Jan 5, 2021):

This is what you're looking for probably: link

<!-- gh-comment-id:754515143 --> @bobvmierlo commented on GitHub (Jan 5, 2021): This is what you're looking for probably: [link](https://pastebin.com/Lq4Cghdm)
Author
Owner

@bobvmierlo commented on GitHub (Jan 5, 2021):

And this is the reponse when opening a playlist: link

<!-- gh-comment-id:754516709 --> @bobvmierlo commented on GitHub (Jan 5, 2021): And this is the reponse when opening a playlist: [link](https://pastebin.com/6b2UemZf)
Author
Owner

@sigma67 commented on GitHub (Jan 5, 2021):

Nothing unusual about those playlists, it parses just fine for me. It must be an issue with your credential setup. Sorry.

<!-- gh-comment-id:754784737 --> @sigma67 commented on GitHub (Jan 5, 2021): Nothing unusual about those playlists, it parses just fine for me. It must be an issue with your credential setup. Sorry.
Author
Owner

@KoljaWindeler commented on GitHub (Jan 5, 2021):

Actually the most common problem the user are facing. Only strange that the unit didn't threw an exception right?

Is there something like a check_login() method? That returns a bool ?

<!-- gh-comment-id:754786729 --> @KoljaWindeler commented on GitHub (Jan 5, 2021): Actually the most common problem the user are facing. Only strange that the unit didn't threw an exception right? Is there something like a check_login() method? That returns a bool ?
Author
Owner

@sigma67 commented on GitHub (Jan 5, 2021):

That is actually performed every time you create an instance of YTMusic, by sending a request to /guide. I'm not sure what the root of the issue is here, unfortunately. It must be something common to these users' accounts or how they set up the credentials. Obviously it works fine for us and most others using the project.

<!-- gh-comment-id:754834568 --> @sigma67 commented on GitHub (Jan 5, 2021): That is actually performed every time you create an instance of YTMusic, by sending a request to `/guide`. I'm not sure what the root of the issue is here, unfortunately. It must be something common to these users' accounts or how they set up the credentials. Obviously it works fine for us and most others using the project.
Author
Owner

@KoljaWindeler commented on GitHub (Jan 5, 2021):

Right.
So just to make sure: once an object ist created and can't login .. will it throw an exception or return false silently?

I'm trying to improve the login check
Currently this Is what I'm doing github.com/KoljaWindeler/ytube_music_player@ef9ebb8550/custom_components/ytube_music_player/media_player.py (L120)

<!-- gh-comment-id:754838265 --> @KoljaWindeler commented on GitHub (Jan 5, 2021): Right. So just to make sure: once an object ist created and can't login .. will it throw an exception or return false silently? I'm trying to improve the login check Currently this Is what I'm doing https://github.com/KoljaWindeler/ytube_music_player/blob/ef9ebb855009e7b254ddfb07989759ba7e3e0a1c/custom_components/ytube_music_player/media_player.py#L120
Author
Owner

@sigma67 commented on GitHub (Jan 5, 2021):

For me, if I provide invalid credentials, it raises an Exception. If you could demonstrate a case with invalid credentials where that doesn't happen that would be very helpful.

github.com/sigma67/ytmusicapi@af6aed7314/ytmusicapi/ytmusic.py (L95-L101)

<!-- gh-comment-id:754845792 --> @sigma67 commented on GitHub (Jan 5, 2021): For me, if I provide invalid credentials, it raises an Exception. If you could demonstrate a case with invalid credentials where that doesn't happen that would be very helpful. https://github.com/sigma67/ytmusicapi/blob/af6aed731483e7a9dbef9f80f04304aeaddf65be/ytmusicapi/ytmusic.py#L95-L101
Author
Owner

@KoljaWindeler commented on GitHub (Jan 5, 2021):

Just tried multiple versions, always get the exception.
But the super ultra strange case is the reason for this ticket. No error but still no valid data ;)
Not sure if @bobvmierlo wants to share his cookie data with you ;P

<!-- gh-comment-id:754846973 --> @KoljaWindeler commented on GitHub (Jan 5, 2021): Just tried multiple versions, always get the exception. But the super ultra strange case is the reason for this ticket. No error but still no valid data ;) Not sure if @bobvmierlo wants to share his cookie data with you ;P
Author
Owner

@sigma67 commented on GitHub (Jan 5, 2021):

I would like to avoid that if possible. I also think this is the same issue as #136, I just haven't been able to reproduce it. harrytouche mentioned that the response contains a 403 error code. If I could get my hands on a response object with this error I could implement a proper exception.

Perhaps we can provide a modified version of ytmusicapi to the user that dumps the response to some place where the user can easily access it and post it here. The relevant code would go here:

github.com/sigma67/ytmusicapi@a8ac347100/ytmusicapi/mixins/library.py (L27-L29)

<!-- gh-comment-id:754854655 --> @sigma67 commented on GitHub (Jan 5, 2021): I would like to avoid that if possible. I also think this is the same issue as #136, I just haven't been able to reproduce it. harrytouche mentioned that the response contains a 403 error code. If I could get my hands on a response object with this error I could implement a proper exception. Perhaps we can provide a modified version of ytmusicapi to the user that dumps the response to some place where the user can easily access it and post it here. The relevant code would go here: https://github.com/sigma67/ytmusicapi/blob/a8ac34710012ab948dc2d9581c9c04ff96c9b5d3/ytmusicapi/mixins/library.py#L27-L29
Author
Owner

@KoljaWindeler commented on GitHub (Jan 6, 2021):

Alright, so I guess you need the repose printed out?
@bobvmierlo I've created a modified version of my code that includes the lib from @sigma67

could you download the zip from https://drive.google.com/file/d/1-qZ84oKzJuVI6vm---zeUdrCBbjeHA1A/view?usp=sharing
and replace your ytube_music_player folder in custom_components with this one?

That should return an error entry into the homeassistant log that contains the response @sigma67 is looking for.
For me it starts like:

021-01-06T10:51:33.364133940Z 2021-01-06 11:51:33 ERROR (SyncWorker_11) [custom_components.ytube_music_player.ytmusicapi.ytmusic] {'responseContext': {'visitorData': 'CgtW_________FUYyi0rNb_BQ%3D%3D', 'maxAgeSeconds': 0, 'serviceTrackingParams': [{'service': 'GFEEDB

@sigma67 could you advice which of those field should be removed/masked before posting it here?

<!-- gh-comment-id:755232322 --> @KoljaWindeler commented on GitHub (Jan 6, 2021): Alright, so I guess you need the repose printed out? @bobvmierlo I've created a modified version of my code that includes the lib from @sigma67 could you download the zip from https://drive.google.com/file/d/1-qZ84oKzJuVI6vm---zeUdrCBbjeHA1A/view?usp=sharing and replace your ytube_music_player folder in custom_components with this one? That should return an error entry into the homeassistant log that contains the response @sigma67 is looking for. For me it starts like: 021-01-06T10:51:33.364133940Z 2021-01-06 11:51:33 ERROR (SyncWorker_11) [custom_components.ytube_music_player.ytmusicapi.ytmusic] {'responseContext': {'visitorData': 'CgtW_________FUYyi0rNb_BQ%3D%3D', 'maxAgeSeconds': 0, 'serviceTrackingParams': [{'service': 'GFEEDB @sigma67 could you advice which of those field should be removed/masked before posting it here?
Author
Owner

@sigma67 commented on GitHub (Jan 6, 2021):

Thanks for your support. I'm mainly looking for an 'error' key in the JSON. Although the response shouldn't contain anything confidential that hasn't already been posted further up in this issue.

<!-- gh-comment-id:755247266 --> @sigma67 commented on GitHub (Jan 6, 2021): Thanks for your support. I'm mainly looking for an 'error' key in the JSON. Although the response shouldn't contain anything confidential that hasn't already been posted further up in this issue.
Author
Owner

@bobvmierlo commented on GitHub (Jan 6, 2021):

The error response below:

Logger: custom_components.ytube_music_player.ytmusicapi.ytmusic
Source: custom_components/ytube_music_player/ytmusicapi/mixins/library.py:31
Integration: YouTube Music Player (documentation)
First occurred: 19:51:37 (1 occurrences)
Last logged: 19:51:37

{'responseContext': {'visitorData': 'CgtWaTB2WWRDeEFUYyi5jdj_BQ%3D%3D', 'maxAgeSeconds': 0, 'serviceTrackingParams': [{'service': 'GFEEDBACK', 'params': [{'key': 'browse_id', 'value': 'FEmusic_liked_playlists'}, {'key': 'logged_in', 'value': '1'}, {'key': 'e', 'value': '23961732,23948841,23934970,23969934,23976578,23891344,23965962,23968386,23972240,23970974,23744176,23951620,23918597,23974595,23981908,23944779,1714250,23839597,23858058,23983732,23940247,23857949,23973542,23882502,23884386,23932523,23911055,23804281,23950597,23969486,23942633,23946420,23975726,23973496'}]}, {'service': 'CSI', 'params': [{'key': 'c', 'value': 'WEB_REMIX'}, {'key': 'cver', 'value': '0.1'}, {'key': 'yt_li', 'value': '1'}, {'key': 'GetBrowsePlaylistsPage_rid', 'value': '0xa0998279c5ee2550'}]}, {'service': 'ECATCHER', 'params': [{'key': 'client.version', 'value': '0.1'}, {'key': 'client.name', 'value': 'WEB_REMIX'}]}]}, 'trackingParams': 'CAAQhGciEwjLqfqA_YfuAhXCQnoFHY3_CVE=', 'contents': {'singleColumnBrowseResultsRenderer': {'tabs': [{'tabRenderer': {'selected': True, 'content': {'sectionListRenderer': {'contents': [{'itemSectionRenderer': {'contents': [{'gridRenderer': {'items': [{'musicTwoRowItemRenderer': {'thumbnailRenderer': {'musicThumbnailRenderer': {'thumbnail': {'thumbnails': [{'url': 'https://www.gstatic.com/youtube/media/ytm/images/pbg/create-playlist-@210.png', 'width': 210, 'height': 210}]}, 'thumbnailCrop': 'MUSIC_THUMBNAIL_CROP_UNSPECIFIED', 'thumbnailScale': 'MUSIC_THUMBNAIL_SCALE_ASPECT_FILL', 'trackingParams': 'CAwQhL8CIhMIy6n6gP2H7gIVwkJ6BR2N_wlR'}}, 'aspectRatio': 'MUSIC_TWO_ROW_ITEM_THUMBNAIL_ASPECT_RATIO_SQUARE', 'title': {'runs': [{'text': 'New playlist', 'navigationEndpoint': {'clickTrackingParams': 'CAsQoLMCGAAiEwjLqfqA_YfuAhXCQnoFHY3_CVE=', 'createPlaylistEndpoint': {'hack': True}}}]}, 'navigationEndpoint': {'clickTrackingParams': 'CAsQoLMCGAAiEwjLqfqA_YfuAhXCQnoFHY3_CVE=', 'createPlaylistEndpoint': {'hack': True}}, 'trackingParams': 'CAsQoLMCGAAiEwjLqfqA_YfuAhXCQnoFHY3_CVE='}}], 'trackingParams': 'CAoQ6IsCGAAiEwjLqfqA_YfuAhXCQnoFHY3_CVE=', 'itemSize': 'COLLECTION_STYLE_ITEM_SIZE_SMALL'}}], 'trackingParams': 'CAMQuy8YACITCMup-oD9h-4CFcJCegUdjf8JUQ==', 'header': {'itemSectionTabbedHeaderRenderer': {'tabs': [{'itemSectionTabRenderer': {'title': {'runs': [{'text': 'Playlists'}]}, 'endpoint': {'clickTrackingParams': 'CAkQ1uICGAAiEwjLqfqA_YfuAhXCQnoFHY3_CVE=', 'browseEndpoint': {'browseId': 'FEmusic_liked_playlists'}}, 'selected': True, 'trackingParams': 'CAkQ1uICGAAiEwjLqfqA_YfuAhXCQnoFHY3_CVE=', 'targetId': 'music-library-playlists-shelf'}}, {'itemSectionTabRenderer': {'title': {'runs': [{'text': 'Albums'}]}, 'endpoint': {'clickTrackingParams': 'CAgQ1uICGAEiEwjLqfqA_YfuAhXCQnoFHY3_CVE=', 'browseEndpoint': {'browseId': 'FEmusic_liked_albums'}}, 'selected': False, 'trackingParams': 'CAgQ1uICGAEiEwjLqfqA_YfuAhXCQnoFHY3_CVE='}}, {'itemSectionTabRenderer': {'title': {'runs': [{'text': 'Songs'}]}, 'endpoint': {'clickTrackingParams': 'CAcQ1uICGAIiEwjLqfqA_YfuAhXCQnoFHY3_CVE=', 'browseEndpoint': {'browseId': 'FEmusic_liked_videos'}}, 'selected': False, 'trackingParams': 'CAcQ1uICGAIiEwjLqfqA_YfuAhXCQnoFHY3_CVE='}}, {'itemSectionTabRenderer': {'title': {'runs': [{'text': 'Artists'}]}, 'endpoint': {'clickTrackingParams': 'CAYQ1uICGAMiEwjLqfqA_YfuAhXCQnoFHY3_CVE=', 'browseEndpoint': {'browseId': 'FEmusic_library_corpus_track_artists'}}, 'selected': False, 'trackingParams': 'CAYQ1uICGAMiEwjLqfqA_YfuAhXCQnoFHY3_CVE='}}, {'itemSectionTabRenderer': {'title': {'runs': [{'text': 'Subscriptions'}]}, 'endpoint': {'clickTrackingParams': 'CAUQ1uICGAQiEwjLqfqA_YfuAhXCQnoFHY3_CVE=', 'browseEndpoint': {'browseId': 'FEmusic_library_corpus_artists'}}, 'selected': False, 'trackingParams': 'CAUQ1uICGAQiEwjLqfqA_YfuAhXCQnoFHY3_CVE='}}], 'trackingParams': 'CAQQ1-ICIhMIy6n6gP2H7gIVwkJ6BR2N_wlR'}}}}], 'trackingParams': 'CAIQui8iEwjLqfqA_YfuAhXCQnoFHY3_CVE='}}, 'tabIdentifier': 'FEmusic_liked_playlists', 'trackingParams': 'CAEQ8JMBGAAiEwjLqfqA_YfuAhXCQnoFHY3_CVE='}}]}}}
<!-- gh-comment-id:755512839 --> @bobvmierlo commented on GitHub (Jan 6, 2021): The error response below: ``` Logger: custom_components.ytube_music_player.ytmusicapi.ytmusic Source: custom_components/ytube_music_player/ytmusicapi/mixins/library.py:31 Integration: YouTube Music Player (documentation) First occurred: 19:51:37 (1 occurrences) Last logged: 19:51:37 {'responseContext': {'visitorData': 'CgtWaTB2WWRDeEFUYyi5jdj_BQ%3D%3D', 'maxAgeSeconds': 0, 'serviceTrackingParams': [{'service': 'GFEEDBACK', 'params': [{'key': 'browse_id', 'value': 'FEmusic_liked_playlists'}, {'key': 'logged_in', 'value': '1'}, {'key': 'e', 'value': '23961732,23948841,23934970,23969934,23976578,23891344,23965962,23968386,23972240,23970974,23744176,23951620,23918597,23974595,23981908,23944779,1714250,23839597,23858058,23983732,23940247,23857949,23973542,23882502,23884386,23932523,23911055,23804281,23950597,23969486,23942633,23946420,23975726,23973496'}]}, {'service': 'CSI', 'params': [{'key': 'c', 'value': 'WEB_REMIX'}, {'key': 'cver', 'value': '0.1'}, {'key': 'yt_li', 'value': '1'}, {'key': 'GetBrowsePlaylistsPage_rid', 'value': '0xa0998279c5ee2550'}]}, {'service': 'ECATCHER', 'params': [{'key': 'client.version', 'value': '0.1'}, {'key': 'client.name', 'value': 'WEB_REMIX'}]}]}, 'trackingParams': 'CAAQhGciEwjLqfqA_YfuAhXCQnoFHY3_CVE=', 'contents': {'singleColumnBrowseResultsRenderer': {'tabs': [{'tabRenderer': {'selected': True, 'content': {'sectionListRenderer': {'contents': [{'itemSectionRenderer': {'contents': [{'gridRenderer': {'items': [{'musicTwoRowItemRenderer': {'thumbnailRenderer': {'musicThumbnailRenderer': {'thumbnail': {'thumbnails': [{'url': 'https://www.gstatic.com/youtube/media/ytm/images/pbg/create-playlist-@210.png', 'width': 210, 'height': 210}]}, 'thumbnailCrop': 'MUSIC_THUMBNAIL_CROP_UNSPECIFIED', 'thumbnailScale': 'MUSIC_THUMBNAIL_SCALE_ASPECT_FILL', 'trackingParams': 'CAwQhL8CIhMIy6n6gP2H7gIVwkJ6BR2N_wlR'}}, 'aspectRatio': 'MUSIC_TWO_ROW_ITEM_THUMBNAIL_ASPECT_RATIO_SQUARE', 'title': {'runs': [{'text': 'New playlist', 'navigationEndpoint': {'clickTrackingParams': 'CAsQoLMCGAAiEwjLqfqA_YfuAhXCQnoFHY3_CVE=', 'createPlaylistEndpoint': {'hack': True}}}]}, 'navigationEndpoint': {'clickTrackingParams': 'CAsQoLMCGAAiEwjLqfqA_YfuAhXCQnoFHY3_CVE=', 'createPlaylistEndpoint': {'hack': True}}, 'trackingParams': 'CAsQoLMCGAAiEwjLqfqA_YfuAhXCQnoFHY3_CVE='}}], 'trackingParams': 'CAoQ6IsCGAAiEwjLqfqA_YfuAhXCQnoFHY3_CVE=', 'itemSize': 'COLLECTION_STYLE_ITEM_SIZE_SMALL'}}], 'trackingParams': 'CAMQuy8YACITCMup-oD9h-4CFcJCegUdjf8JUQ==', 'header': {'itemSectionTabbedHeaderRenderer': {'tabs': [{'itemSectionTabRenderer': {'title': {'runs': [{'text': 'Playlists'}]}, 'endpoint': {'clickTrackingParams': 'CAkQ1uICGAAiEwjLqfqA_YfuAhXCQnoFHY3_CVE=', 'browseEndpoint': {'browseId': 'FEmusic_liked_playlists'}}, 'selected': True, 'trackingParams': 'CAkQ1uICGAAiEwjLqfqA_YfuAhXCQnoFHY3_CVE=', 'targetId': 'music-library-playlists-shelf'}}, {'itemSectionTabRenderer': {'title': {'runs': [{'text': 'Albums'}]}, 'endpoint': {'clickTrackingParams': 'CAgQ1uICGAEiEwjLqfqA_YfuAhXCQnoFHY3_CVE=', 'browseEndpoint': {'browseId': 'FEmusic_liked_albums'}}, 'selected': False, 'trackingParams': 'CAgQ1uICGAEiEwjLqfqA_YfuAhXCQnoFHY3_CVE='}}, {'itemSectionTabRenderer': {'title': {'runs': [{'text': 'Songs'}]}, 'endpoint': {'clickTrackingParams': 'CAcQ1uICGAIiEwjLqfqA_YfuAhXCQnoFHY3_CVE=', 'browseEndpoint': {'browseId': 'FEmusic_liked_videos'}}, 'selected': False, 'trackingParams': 'CAcQ1uICGAIiEwjLqfqA_YfuAhXCQnoFHY3_CVE='}}, {'itemSectionTabRenderer': {'title': {'runs': [{'text': 'Artists'}]}, 'endpoint': {'clickTrackingParams': 'CAYQ1uICGAMiEwjLqfqA_YfuAhXCQnoFHY3_CVE=', 'browseEndpoint': {'browseId': 'FEmusic_library_corpus_track_artists'}}, 'selected': False, 'trackingParams': 'CAYQ1uICGAMiEwjLqfqA_YfuAhXCQnoFHY3_CVE='}}, {'itemSectionTabRenderer': {'title': {'runs': [{'text': 'Subscriptions'}]}, 'endpoint': {'clickTrackingParams': 'CAUQ1uICGAQiEwjLqfqA_YfuAhXCQnoFHY3_CVE=', 'browseEndpoint': {'browseId': 'FEmusic_library_corpus_artists'}}, 'selected': False, 'trackingParams': 'CAUQ1uICGAQiEwjLqfqA_YfuAhXCQnoFHY3_CVE='}}], 'trackingParams': 'CAQQ1-ICIhMIy6n6gP2H7gIVwkJ6BR2N_wlR'}}}}], 'trackingParams': 'CAIQui8iEwjLqfqA_YfuAhXCQnoFHY3_CVE='}}, 'tabIdentifier': 'FEmusic_liked_playlists', 'trackingParams': 'CAEQ8JMBGAAiEwjLqfqA_YfuAhXCQnoFHY3_CVE='}}]}}} ```
Author
Owner

@sigma67 commented on GitHub (Jan 6, 2021):

Thanks for helping, again. Unfortunately I forgot that only the response text is returned to the callee of _send_request. So the status code is not contained in the response above. I created a new branch 4xx where an exception is raised on 4xx errors. That should result in a proper error message.

Unfortunately if we find that indeed 403 is returned, this still doesn't solve the root of the issue: Why are the credentials not working?

<!-- gh-comment-id:755734949 --> @sigma67 commented on GitHub (Jan 6, 2021): Thanks for helping, again. Unfortunately I forgot that only the response text is returned to the callee of _send_request. So the status code is not contained in the response above. I created a new branch 4xx where an exception is raised on 4xx errors. That should result in a proper error message. Unfortunately if we find that indeed 403 is returned, this still doesn't solve the root of the issue: Why are the credentials not working?
Author
Owner

@sigma67 commented on GitHub (Jan 8, 2021):

Perhaps you could try again with the 4xx branch of ytmusicapi? I would go ahead and merge that if it correctly raises the exception for you.

<!-- gh-comment-id:756832978 --> @sigma67 commented on GitHub (Jan 8, 2021): Perhaps you could try again with the 4xx branch of ytmusicapi? I would go ahead and merge that if it correctly raises the exception for you.
Author
Owner

@KoljaWindeler commented on GitHub (Jan 8, 2021):

I can create another package for @bobvmierlo .. if you @bobvmierlo haven't reached your frustration level ;)

Alternative approach: since the cookie data aren't working anyway: would it be an option that @bobvmierlo shares his cookie data with @sigma67 ?

<!-- gh-comment-id:756959225 --> @KoljaWindeler commented on GitHub (Jan 8, 2021): I can create another package for @bobvmierlo .. if you @bobvmierlo haven't reached your frustration level ;) Alternative approach: since the cookie data aren't working anyway: would it be an option that @bobvmierlo shares his cookie data with @sigma67 ?
Author
Owner

@bobvmierlo commented on GitHub (Jan 8, 2021):

I'd like to get this working, so i'm happy to help you guys out anyway I can.

Also I can share my cookie info with @sigma67 if that helps him. I'd like to do it privately though.

<!-- gh-comment-id:756960463 --> @bobvmierlo commented on GitHub (Jan 8, 2021): I'd like to get this working, so i'm happy to help you guys out anyway I can. Also I can share my cookie info with @sigma67 if that helps him. I'd like to do it privately though.
Author
Owner

@KoljaWindeler commented on GitHub (Jan 8, 2021):

To be honest: I'd bet that you could simply create a new cookie by opening youtube music via incognito mode. But your current cookie is quite valuable. You don't get an exception during login but still no playlist. I guess there is something special going on.

<!-- gh-comment-id:756962606 --> @KoljaWindeler commented on GitHub (Jan 8, 2021): To be honest: I'd bet that you could simply create a new cookie by opening youtube music via incognito mode. But your current cookie is quite valuable. You don't get an exception during login but still no playlist. I guess there is something special going on.
Author
Owner

@sigma67 commented on GitHub (Jan 9, 2021):

That would be quite helpful. You can send me an email with the info to ytmusicapi@gmail.com

<!-- gh-comment-id:757127197 --> @sigma67 commented on GitHub (Jan 9, 2021): That would be quite helpful. You can send me an email with the info to ytmusicapi@gmail.com
Author
Owner

@bobvmierlo commented on GitHub (Jan 10, 2021):

I emailed @sigma67 my cookie yesterday, let's hope he can figure something out with my info.

<!-- gh-comment-id:757544122 --> @bobvmierlo commented on GitHub (Jan 10, 2021): I emailed @sigma67 my cookie yesterday, let's hope he can figure something out with my info.
Author
Owner

@bobvmierlo commented on GitHub (Jan 10, 2021):

@KoljaWindeler: I just noticed this error in the debug logs. Not sure if it means anything regarding this issue?

2021-01-10 22:06:23 DEBUG (SyncWorker_10) [custom_components.ytube_music_player.media_player] _get_cipher
2021-01-10 22:06:23 DEBUG (SyncWorker_5) [custom_components.ytube_music_player.media_player] _get_cipher
2021-01-10 22:06:23 DEBUG (SyncWorker_10) [custom_components.ytube_music_player.media_player] check_api
2021-01-10 22:06:23 DEBUG (SyncWorker_10) [custom_components.ytube_music_player.media_player] - no valid API, try to login
2021-01-10 22:06:23 DEBUG (SyncWorker_10) [custom_components.ytube_music_player.media_player] - YouTube Api version: 0.12.2
2021-01-10 22:06:24 DEBUG (SyncWorker_5) [custom_components.ytube_music_player.media_player] check_api
2021-01-10 22:06:24 DEBUG (SyncWorker_5) [custom_components.ytube_music_player.media_player] - no valid API, try to login
2021-01-10 22:06:24 DEBUG (SyncWorker_10) [custom_components.ytube_music_player.media_player] _update_selects
2021-01-10 22:06:24 DEBUG (SyncWorker_10) [custom_components.ytube_music_player.media_player] _update_playlists
<!-- gh-comment-id:757544466 --> @bobvmierlo commented on GitHub (Jan 10, 2021): @KoljaWindeler: I just noticed this error in the debug logs. Not sure if it means anything regarding this issue? ``` 2021-01-10 22:06:23 DEBUG (SyncWorker_10) [custom_components.ytube_music_player.media_player] _get_cipher 2021-01-10 22:06:23 DEBUG (SyncWorker_5) [custom_components.ytube_music_player.media_player] _get_cipher 2021-01-10 22:06:23 DEBUG (SyncWorker_10) [custom_components.ytube_music_player.media_player] check_api 2021-01-10 22:06:23 DEBUG (SyncWorker_10) [custom_components.ytube_music_player.media_player] - no valid API, try to login 2021-01-10 22:06:23 DEBUG (SyncWorker_10) [custom_components.ytube_music_player.media_player] - YouTube Api version: 0.12.2 2021-01-10 22:06:24 DEBUG (SyncWorker_5) [custom_components.ytube_music_player.media_player] check_api 2021-01-10 22:06:24 DEBUG (SyncWorker_5) [custom_components.ytube_music_player.media_player] - no valid API, try to login 2021-01-10 22:06:24 DEBUG (SyncWorker_10) [custom_components.ytube_music_player.media_player] _update_selects 2021-01-10 22:06:24 DEBUG (SyncWorker_10) [custom_components.ytube_music_player.media_player] _update_playlists ```
Author
Owner

@KoljaWindeler commented on GitHub (Jan 10, 2021):

Hmm I think we're still facing the same error. You shouldn't see the 12.2 version string if your cookie is bad, but if the cookie is good you should get your playlists ...

<!-- gh-comment-id:757546791 --> @KoljaWindeler commented on GitHub (Jan 10, 2021): Hmm I think we're still facing the same error. You shouldn't see the 12.2 version string if your cookie is bad, but if the cookie is good you should get your playlists ...
Author
Owner

@sigma67 commented on GitHub (Jan 10, 2021):

The cookie is alright, no errors found. I can even like songs on his behalf. But the associated library is empty. No playlists, no liked songs. Except the one that I just liked, which is now showing up.

So the sign-in credentials are valid and no issue with ytmusicapi so far. I'm fairly certain @bobvmierlo is signed in with multiple accounts/brand accounts, else I can't really explain this

<!-- gh-comment-id:757547330 --> @sigma67 commented on GitHub (Jan 10, 2021): The cookie is alright, no errors found. I can even like songs on his behalf. But the associated library is empty. No playlists, no liked songs. Except the one that I just liked, which is now showing up. So the sign-in credentials are valid and no issue with ytmusicapi so far. I'm fairly certain @bobvmierlo is signed in with multiple accounts/brand accounts, else I can't really explain this
Author
Owner

@bobvmierlo commented on GitHub (Jan 10, 2021):

Okay, so after your last email I did some more digging. Eventually I found that I have some strange linked account to my main account that was marked as a brand account.
Apparently Google marked your account as a brand account if you've claimed a bussiness on Google Maps before 2007. Which apparently I did, after I'd deleted that weird account the playlists popped up.
Problem solved!

<!-- gh-comment-id:757552965 --> @bobvmierlo commented on GitHub (Jan 10, 2021): Okay, so after your last email I did some more digging. Eventually I found that I have some strange linked account to my main account that **was** marked as a brand account. Apparently Google marked your account as a brand account if you've claimed a bussiness on Google Maps before 2007. Which apparently I did, after I'd deleted that weird account the playlists popped up. Problem solved!
Author
Owner

@sigma67 commented on GitHub (Jan 10, 2021):

Glad to hear! Don't forget to sign out and back in again to invalidate the credentials you sent me

<!-- gh-comment-id:757555502 --> @sigma67 commented on GitHub (Jan 10, 2021): Glad to hear! Don't forget to sign out and back in again to invalidate the credentials you sent me
Author
Owner

@KoljaWindeler commented on GitHub (Jan 11, 2021):

thanks for your great support @sigma67 !!

<!-- gh-comment-id:757932492 --> @KoljaWindeler commented on GitHub (Jan 11, 2021): thanks for your great support @sigma67 !!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ytmusicapi#104
No description provided.