-
-
Notifications
You must be signed in to change notification settings - Fork 53
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
YouTube Music Plugin Error: "Unable to fetch PO Token for web_music client" and "No audio was received" #3531
Comments
I see the same on stable, except that restarting MA server disabled the YT provider with the above mentioned errors repeated evey two minutes:
I see in pytubefix project fixes related PO token and botdetection: |
WARNING: [youtube] Unable to fetch PO Token for web_music client: Missing required Data Sync ID for account. You may need to pass a Data Sync ID with --extractor-args "youtube:data_sync_id=XXX" Same issue, hope this gets fixed asap as it is unusable right now. |
Was not able to reproduce this issue, but got hit with this this morning. It seems this is a very misleading message that occurs when your cookie has expired. For me, obtaining and configuring a fresh cookie fixed it. Can you confirm this works for you, then we will add this to the FAQ. |
Sorry, I ditched YT Music as they clearly don't want the money of people using opensource tools to use their platform. I switched to Deezer for it being a European company and having clear API docs, hoping for less problems with it in open source software. For now MA works great with it. |
Sorry to hear that, however, It happens much less when the CPU is below 20% constant usage. When even slightly congested the behaviour is much more obvious. I think using the latest versions of python with the efficiency/multi threading optimizations might help. |
@tibrezus you did not answer @MarvinSchenkel ’s question. Does refreshing the cookie fix the problem? |
Refreshing the cookie does not solve the issue, after refreshing the cookie and trying to play again the CPU will go 100% on one thread and remain there, the search and metadata works correctly but when trying to play a song it will visually start playing with the progression bar looping between 0 and about 10 seconds with no audio. This however did not happen on all versions, in the versions between 2.4.0RC0 and RC7 the player worked fine, RC8 broke it again. The 2.5.0RC0 seems to work fine again. Yet I am not sure if this is due to YouTube messing up the backend or due to changes in Music Assistant. When the issue happen logs will output this: WARNING: [youtube] Unable to fetch PO Token for web_music client: Missing required Data Sync ID for account. You may need to pass a Data Sync ID with --extractor-args "youtube:data_sync_id=XXX"
2025-02-26 10:33:58.655 ERROR (MainThread) [music_assistant.audio.media_stream] Error while streaming ytmusic://track/sNaQBEcUqsI: No audio was received
2025-02-26 10:33:58.680 ERROR (MainThread) [music_assistant.streams] Error streaming QueueItem French 79 & Sarah Rebecca - Diamond Veins (ytmusic://track/sNaQBEcUqsI) to piCorePlayer
2025-02-26 10:33:59.515 INFO (MainThread) [music_assistant.streams] Start serving audio stream for QueueItem Monolink - Reflections (ytmusic://track/kKYYydqWHz4) to piCorePlayer
WARNING: [youtube] Unable to fetch PO Token for web_music client: Missing required Data Sync ID for account. You may need to pass a Data Sync ID with --extractor-args "youtube:data_sync_id=XXX"
2025-02-26 10:34:25.850 ERROR (MainThread) [music_assistant.audio.media_stream] Error while streaming ytmusic://track/kKYYydqWHz4: No audio was received
2025-02-26 10:34:25.875 ERROR (MainThread) [music_assistant.streams] Error streaming QueueItem Monolink - Reflections (ytmusic://track/kKYYydqWHz4) to piCorePlayer
2025-02-26 10:34:26.822 INFO (MainThread) [music_assistant.streams] Start serving audio stream for QueueItem Mason - Exceeder (ytmusic://track/kl-x-D882XQ) to piCorePlayer
WARNING: [youtube] Unable to fetch PO Token for web_music client: Missing required Data Sync ID for account. You may need to pass a Data Sync ID with --extractor-args "youtube:data_sync_id=XXX"
2025-02-26 10:34:44.900 INFO (MainThread) [music_assistant.player_queues] Fetching tracks to play for artist Vitalic
WARNING: [youtube] Unable to fetch PO Token for web_music client: Missing required Data Sync ID for account. You may need to pass a Data Sync ID with --extractor-args "youtube:data_sync_id=XXX"
2025-02-26 10:34:53.577 ERROR (MainThread) [music_assistant.audio.media_stream] Error while streaming ytmusic://track/kl-x-D882XQ: No audio was received
2025-02-26 10:34:53.718 ERROR (MainThread) [music_assistant.streams] Error streaming QueueItem Mason - Exceeder (ytmusic://track/kl-x-D882XQ) to piCorePlayer
2025-02-26 10:34:54.872 ERROR (MainThread) [aioslimproto.client.piCorePlayer] Server responds with status 404 Unknown Queue item: 929b4048fef14a80b53b9005c1a78dd7
2025-02-26 10:34:57.273 INFO (MainThread) [music_assistant.streams] Start serving audio stream for QueueItem NTO/Vitalic - Cœur Noir (library://track/955) to piCorePlayer
WARNING: [youtube] Unable to fetch PO Token for web_music client: Missing required Data Sync ID for account. You may need to pass a Data Sync ID with --extractor-args "youtube:data_sync_id=XXX"
2025-02-26 10:35:23.598 ERROR (MainThread) [music_assistant.audio.media_stream] Error while streaming ytmusic://track/dOLEf-MhdgU: No audio was received
2025-02-26 10:35:23.627 ERROR (MainThread) [music_assistant.streams] Error streaming QueueItem NTO/Vitalic - Cœur Noir (library://track/955) to piCorePlayer
2025-02-26 10:35:24.575 INFO (MainThread) [music_assistant.streams] Start serving audio stream for QueueItem Vitalic - Poison Lips (ytmusic://track/JCJtCeDmTlI) to piCorePlayer
WARNING: [youtube] Unable to fetch PO Token for web_music client: Missing required Data Sync ID for account. You may need to pass a Data Sync ID with --extractor-args "youtube:data_sync_id=XXX" |
So to summarize: Refreshing a cookie solves this issue on the latest version of MA (2.4.0 stable or 2.5.0B0)? Please note that cookies will expire faster when you are using the same account as the one on the YTM web app / mobile app. |
It is not the cookie refresh that solves the issue, when the issue happens cookie refresh makes no difference. When the cookies expires on a working version I know it because the search funcionality does not work, and as soon as I add a new one everything works as expected. |
@MarvinSchenkel I have an update, it happened a few times that when the issue above happens and I restart the the music_assistant process without updating the cookie, this results expired. Updating it solves the issue. The issue is, after a while music_assitant will stop playing songs from the youtube provider, and changing the cookie itself will not solve the issue; the player will loop on the first seconds of a song with no audio output. On the current version (2.5.0b5) when the same issue happens, if I restart the process, the cookie will result as expired, and changing it will fix the issue. I think a good fix for this would be to know if the cookie is expired and replacement should work without the need of the process restart. |
What version of Music Assistant has the issue?
2.4.0b23
Have you tried everything in the Troubleshooting FAQ and reviewed the Open and Closed Issues and Discussions to resolve this yourself?
The problem
After successfully registering with the YouTube Music plugin using my cookie and user ID, playback works as expected for about 30 minutes. However, after this period, I encounter the following errors:
This warning appears repeatedly in the logs, suggesting an issue with authentication or session management, what ID should I use? Right now I use my email address
The issue disrupts playback by looping the track playback start without any audio being heard, and requires manual intervention which implies restarting the music assistant service.
How to reproduce
Music Providers
YouTube Music
Player Providers
Slimproto (Squeezebox Players)
Full log output
d5369777_music_assistant_beta_2025-02-03T12-01-31.342Z.log
Additional information
This happens with all the musicassistant versions, stable beta and dev, I'm fighting with it for months now.
I run the music assistant plugin on a raspberry pi 4 8GB RAM, While looping in the playback process with no audio the CPU goes to 100% on one thread, memory is also quite high reachine over 1GB based on the usage I make.
Other providers work just fine.
What version of Home Assistant Core are your running
2025.1.4
What type of installation are you running?
Home Assistant OS
On what type of hardware are you running?
Raspberry Pi
The text was updated successfully, but these errors were encountered: