Open cherryocola opened 2 weeks ago
yeah mine has stopped working after yesterdays update - I have not tried to trouble shoot or reauthenticate or anything, just acknowledging that it stopped.
Same here. Server: 2.4.0b4 Integration: 2024.11.1
even reverting back to 2.3.0rc2 or reauthentication didn't fix it.
People are finding a solution is to create another brand account. https://sproutsocial.com/glossary/youtube-brand-account/
People are finding a solution is to create another brand account. https://sproutsocial.com/glossary/youtube-brand-account/
ah that does seem to work, although now my playlists need to be moved over, bit annoying LOL, I understand YT Music is best efforts, so just happy to have it working again! thanks.
Our best guess is YouTube is doing something deliberate to deny access.
Our best guess is YouTube is doing something deliberate to deny access.
all the more reason to work towards not being dependent on them, and google in general - that's my home lab driver at the moment..
I'm having the same issue, e.g. ERROR: [youtube+yt_access_token]...
I can't connect my Youtube (personal) account with Music Assistance any more, that was previously working.
@Dion-HA read this issue for the workaround….
@Dion-HA read this issue for the workaround….
@OzGav read what for a workaround?
I looked at the Youtube brand accounts, we should not need to create a new Youtube brand account, just to link Youtube Music with Music Assistant, it was working previously.
I also tried using my business Gmail account to link Youtube Music with Music Assistant and got this error message instead: User does not have Youtube Music Premium.
I then tried linking Spotify and that worked without any issues, but I don't use Spotify. I ony use Youtube Music Premium with my personal Gmail account.
@Dion-HA Do you understand this is Google's doing? Please contact them with your frustrations.
Sigh... looks like I have to go back to ytubemediaplayer
@cherryocola So the workaround is not working for you?
@cherryocola So the workaround is not working for you?
Apologies, I havent tried it I am sure it works, I just didnt want another google account. thanks.
@cherryocola It isn't another Google account. It is a "brand" within your Google account.
@cherryocola It isn't another Google account. It is a "brand" within your Google account.
So I started my channel and branding but still get the error message, any ideas? thanks
@cherryocola Not at this time. You are the first person to say they tried creating a brand account and it didn't work...
edit: Keep an eye on things as sometimes Google reverts these changes and everything just starts working again...
@cherryocola Not at this time. You are the first person to say they tried creating a brand account and it didn't work...
edit: Keep an eye on things as sometimes Google reverts these changes and everything just starts working again...
maybe because I always had a channel and I only added a branding? I probably need another account.
Mine just stopped working with the same error
yt-dlp is having the same issue: https://github.com/yt-dlp/yt-dlp/issues/11503
Creating a Youtube brand account to add Youtube Music as a Music Provider for Music Assistant fixes this issue.
I just created a Youtube brand account for my persoal Google account and can confirm that this now works and all my previous playlists, artist, etc are still available using the new Youtube brand account to authenticate with Music Assistant :)
I just tried the workaround but I get the same error. The workaround seems not to work anymore. I get the same HTTP400 error with the new "brand account"
Any other solutions other than brand account?
From the yt-dlp thread it seems like the real fix is to store a cookie to use for Auth. Unfortunately this will require rewriting the music-assistant YouTube auth code and a much more complicated user flow involving extracting cookies from a browser
Linked my brand account and there is different music on it, no playlists, no library. Are there any suggestions?
I already had a brand account. But I created another one to try the solution above. And I got the same error.
It appears that OAUTH support has been removed. An alternate method of logging in is being investigated. This will take some time.
My Youtube Music is still working with Music Assistant since I set in up yesterday using the Youtube Brand account work around with my existing personal Google account, I'm reluctant to remove this connection and set it up again as it's still working for me now :)
I doubt it adds any value to resolving this issue but I'm curious if anyone else is experiencing numerous Home Assistant failed login attempts from Google datacenters since the YouTube Music issue started in Music Assistant. Here is an example: Login attempt failed Login attempt or request with invalid authentication from 51.150.48.34.bc.googleusercontent.com (34.48.150.51). See the log for details.
What surprises me is that this has continued even after I removed YouTube Music as a provider in Music Assistant. Oh well.
You can contact google about this and give them your thoughts here https://support.google.com/youtube/gethelp
Sigh... looks like I have to go back to ytubemediaplayer
that doesn't work for me either :(
I created the Brand account (multiple accounts, in fact), but I'm still encountering the same error message: "ERROR: [youtube+yt_access_token] dQw4w9WgXcQ: Unable to download API page: HTTP Error 400: Bad Request (caused by <HTTPError 400: Bad Request>)" when I try to save the YouTube Music Provider after successfully authenticating and granting permission with the Brand account.
Same issue here. Adding a Brand account won't work.
ERROR: [youtube+yt_access_token] dQw4w9WgXcQ: Unable to download API page: HTTP Error 400: Bad Request (caused by <HTTPError 400: Bad Request>)
So, everything was working perfectly fine for me until last night when I updated the HA Integration (not the add-on). Suddenly, both MA AND my YT Music app on my phone started throwing a ton of errors. On the YTM app, it would just keep skipping through tracks as unavailable until hitting the end of the queue. During this period, I saw various errors on MA about unavailable/invalid tokens, API availability, etc.
Hours later, YTM app slowly regained the ability to start playing tracks again, albeit with some random track skips, until it finally regained full function this morning. YTM now can play music again, but even after fully removing and trying to re-add YTM to MA, I get the following errors:
WARNING: [youtube+yt_access_token] Incomplete data received in embedded initial data; re-fetching using API.
WARNING: [youtube+yt_access_token] YouTube said: ERROR - Request contains an invalid argument.
WARNING: [youtube+yt_access_token] HTTP Error 400: Bad Request. Retrying (1/3)...
WARNING: [youtube+yt_access_token] YouTube said: ERROR - Request contains an invalid argument.
WARNING: [youtube+yt_access_token] HTTP Error 400: Bad Request. Retrying (2/3)...
WARNING: [youtube+yt_access_token] YouTube said: ERROR - Request contains an invalid argument.
WARNING: [youtube+yt_access_token] HTTP Error 400: Bad Request. Retrying (3/3)...
WARNING: [youtube+yt_access_token] YouTube said: ERROR - Request contains an invalid argument.
ERROR: [youtube+yt_access_token] dQw4w9WgXcQ: Unable to download API page: HTTP Error 400: Bad Request (caused by <HTTPError 400: Bad Request>)
2024-11-14 11:58:16.256 ERROR (MainThread) [music_assistant.webserver] Error handling message: config/providers/save: ERROR: [youtube+yt_access_token] dQw4w9WgXcQ: Unable to download API page: HTTP Error 400: Bad Request (caused by <HTTPError 400: Bad Request>)
To be clear, I already have multiple brand accounts on my main account and none of them work. So, I have two theories at this time:
Let me know if there is any testing I can help perform from my end.
I'm not sure if it helps, or if this wouldn't work with MA, but the HA-Google-Home uses Google Authentication Tokens for access to Google accounts, and that add-on is still working for me.
There are tons of forum posts about folks having issues with using the tokens, so they can be a bit fiddly, but once I got it working for the HA-Google-Home add-on, it's been solid for months now.
Same issue at me :(
I'm not sure if it helps, or if this wouldn't work with MA, but the HA-Google-Home uses Google Authentication Tokens for access to Google accounts, and that add-on is still working for me.
There are tons of forum posts about folks having issues with using the tokens, so they can be a bit fiddly, but once I got it working for the HA-Google-Home add-on, it's been solid for months now.
I don't think it's the tokens themselves in this case. I think the change is in how the API is parsing requests against YTM. Perhaps a slow server-side rollout across all YTM accounts, which would explain why it has seemingly affected us in waves over the last week or so. Mine worked flawlessly until last night while some have been having the issue for a week or more.
Brand account alternative solution failed to resolve the issue here.
Brand account alternative solution failed to work for me as well.
Brand account failed for me too
Brand account failed for me as well
Just for clarity for anyone that created a brand account as a solution, are you supposed to somehow authenticate with that account? I just created the brand account but authenticated with my normal account as the brand account required no kind of password or authentication settings. How would the brand account authentication work exactly?
When you sign in on Google, it should ask you which sub-account you want to use - your primary or a brand account. If it doesn't, try creating a PL on YTM under that brand account and sign in on MA again.
I created a new brand account on the old account, even created a completely new google account. But it seems nothing has changed. Still ERROR 400 when Add Youtube Music
I'm not sure if it helps, or if this wouldn't work with MA, but the HA-Google-Home uses Google Authentication Tokens for access to Google accounts, and that add-on is still working for me. There are tons of forum posts about folks having issues with using the tokens, so they can be a bit fiddly, but once I got it working for the HA-Google-Home add-on, it's been solid for months now.
I don't think it's the tokens themselves in this case. I think the change is in how the API is parsing requests against YTM. Perhaps a slow server-side rollout across all YTM accounts, which would explain why it has seemingly affected us in waves over the last week or so. Mine worked flawlessly until last night while some have been having the issue for a week or more.
I'm now having the same issue using the YT Brand account to authenticate with MA, e.g. ERROR: [youtube+yt_access_token] dQw4w9WgXcQ: Unable to download API page: HTTP Error 400: Bad Request (caused by <HTTPError 400: Bad Request>)
I'm now having the same issue using the YT Brand account to authenticate with MA, e.g. ERROR: [youtube+yt_access_token] dQw4w9WgXcQ: Unable to download API page: HTTP Error 400: Bad Request (caused by <HTTPError 400: Bad Request>)
It's almost certainly an API change and this means we'd have to wait for the maintainer of the Python library MA is depending on (yt-dlp) to find and correct accordingly. This will take time. I'm lowkey sad that every time I get used to using YTM again, it breaks again.
Youtube "dropped" support (more like prevented misuse) for OAuth as described in yt-dlp comment here. Music assistant needs to rework the login to intercept user cookies instead, which is painful, but is the only way forward.
Yt-dlp already works with cookies.
The reason on why the workaround with brand accounts worked is that google applies changes in "waves" until is fully applied to everyone. It's unlikely that OAuth "method" will ever work again, as google needs to rollback the change
Progress has been made. Expect more info in the next couple of days,
The documentation page provides instructions for heading down the "cookie path", yet the UI does not provide the option to paste the cookie info. I can only take the "token path" using the UI. Is there a manual way to enter the cookie data?
Expect more info in the next couple of days.
Thanks for the UI update! I can play music now, though uploaded music is not working.
What version of Music Assistant has the issue?
2.3.2
What version of the Home Assistant Integration have you got installed?
2024.11.1
Have you tried everything in the Troubleshooting FAQ and reviewed the Open and Closed Issues and Discussions to resolve this yourself?
The problem
When authenticating Youtube music and saving the token generated, the following error was produced
ERROR: [youtube+yt_access_token] dQw4w9WgXcQ: Unable to download API page: HTTP Error 400: Bad Request (caused by <HTTPError 400: Bad Request>)
How to reproduce
Music Providers
Ytube Music
Player Providers
Google Cast
Full log output
music-assistant.log
Additional information
No response
What version of Home Assistant Core are your running
2024.10.4
What type of installation are you running?
Home Assistant OS
On what type of hardware are you running?
Raspberry Pi