Skip to content

Conversation

@Dnny44
Copy link
Contributor

@Dnny44 Dnny44 commented Nov 13, 2025

A JavaScript runtime is now required for the Youtube Music provider to work, deno is the recommended and the default setting on yt-dlp: https://github.com/yt-dlp/yt-dlp/wiki/EJS

This fixes music-assistant/support#4348

There is another Pull Request [https://github.com//pull/2634] for this as well but based on @MarvinSchenkel commit history I think this is the preferred method of adding the dependency.

@MarvinSchenkel
Copy link
Contributor

Could you remove the entry of uv.lock in the gitignore? This contains a snapshot of the dependencies we use, so it makes sense it changes if you add deno.

@RomuloVitoi
Copy link

I've closed my MR In favor of this. Tested and works fine: [youtube] [jsc:deno] Solving JS challenges using deno

@Dnny44
Copy link
Contributor Author

Dnny44 commented Nov 13, 2025

Thanks for the guidance Marvin and thanks for testing the fix Romulo! I have made the uv.lock commit so hopefully that wraps this up nicely.

@MarvinSchenkel MarvinSchenkel enabled auto-merge (squash) November 13, 2025 17:32
@MarvinSchenkel
Copy link
Contributor

Thanks @Dnny44

@MarvinSchenkel MarvinSchenkel merged commit 80fc4a1 into music-assistant:dev Nov 13, 2025
6 checks passed
@Dnny44 Dnny44 deleted the fix/Add-Javascript-runtime branch November 13, 2025 18:13
MarvinSchenkel pushed a commit that referenced this pull request Nov 14, 2025
* Added deno for YTMusic Provider

* Commiting uv lock
@Kenneth-Audenaert
Copy link

not sure if I'm doing something wrong.

I just downloaded the stable MA add-on update 2.6.3 through the HA updater
and tried the yt provider again with my cookie, which results in the same error as before

I tried removing and re-installing the YT Music PO Token Generator add-on
restarted YT Music PO Token Generator add-on
restarted MA add-on
tried adding the YT provider, but still the same error:

2025-11-14 16:35:03.914 INFO (MainThread) [music_assistant] Starting Music Assistant Server (ee8c9386d73e4148b6d826955d42f95f) version 2.6.3 - HA add-on: True - Safe mode: False
2025-11-14 16:35:03.919 INFO (MainThread) [music_assistant.cache] Initializing cache controller...
2025-11-14 16:35:03.931 INFO (MainThread) [ffmpeg] Detected ffmpeg version 7.1.1 with libsoxr support
2025-11-14 16:35:03.936 INFO (MainThread) [music_assistant.streams] 
################################################################################
Starting streamserver on  ********:8097
This is the IP address that is communicated to players.
If this is incorrect, audio will not play!
See the documentation how to configure the publish IP for the Streamserver
in Settings --> Core modules --> Streamserver
################################################################################
2025-11-14 16:35:04.125 INFO (MainThread) [music_assistant.music] Using a sync interval of 720 minutes.
2025-11-14 16:35:04.154 INFO (MainThread) [music_assistant.webserver] Starting webserver on  0.0.0.0:8095 - base url: http://192.168.1.17:8095
#
2025-11-14 16:35:04.950 INFO (MainThread) [music_assistant] Loaded metadata provider fanart.tv Metadata provider
2025-11-14 16:35:04.950 INFO (MainThread) [music_assistant] Loaded music provider Music Assistant
2025-11-14 16:35:04.950 WARNING (MainThread) [music_assistant.tunein] Email address detected instead of username, it is advised to use the tunein username instead of email.
2025-11-14 16:35:04.950 INFO (MainThread) [music_assistant] Loaded music provider Tune-In Radio
2025-11-14 16:35:04.950 INFO (MainThread) [music_assistant] Loaded metadata provider TheAudioDB Metadata provider
2025-11-14 16:35:04.950 INFO (MainThread) [music_assistant] Loaded metadata provider LRCLIB
2025-11-14 16:35:04.951 INFO (MainThread) [music_assistant] Loaded player provider Playergroup
2025-11-14 16:35:04.951 INFO (MainThread) [music_assistant] Loaded metadata provider MusicBrainz Metadata provider
2025-11-14 16:35:04.951 INFO (MainThread) [music_assistant] Loaded player provider Music Assistant
2025-11-14 16:35:04.959 INFO (MainThread) [music_assistant] Loaded player provider Chromecast
2025-11-14 16:35:04.974 INFO (MainThread) [music_assistant] Loaded music provider Filesystem (local disk)
2025-11-14 16:35:04.978 INFO (MainThread) [music_assistant] Loaded music provider Plex Media Server Library
2025-11-14 16:35:04.979 INFO (MainThread) [music_assistant] Loaded plugin provider Home Assistant
2025-11-14 16:35:05.064 INFO (MainThread) [music_assistant] Loaded music provider Filesystem (remote share)
2025-11-14 16:35:05.443 INFO (MainThread) [music_assistant.players] Player registered: 42c43e67-07f3-7f32-61c5-60db340a1c6f/****
2025-11-14 16:35:05.542 INFO (MainThread) [music_assistant.players] Player registered: 08cf2b4f-35eb-589a-496b-87d95474ea04/****
2025-11-14 16:35:05.633 INFO (MainThread) [music_assistant.players] Player registered: 82841961-c461-4b2c-8d78-ad68ee8f266c/****
2025-11-14 16:35:05.727 INFO (MainThread) [music_assistant.players] Player registered: 4bdc9a09-9a48-d4c9-5cdf-8fe0a4f35ef7/****
2025-11-14 16:35:05.825 INFO (MainThread) [music_assistant.players] Player registered: dbdcee97-09a0-2f49-442b-fb717e5e67ea/****
2025-11-14 16:35:05.918 INFO (MainThread) [music_assistant.players] Player registered: 2aa17cfa-e38e-5cf1-2ec6-17373e5b847c/****
2025-11-14 16:35:06.015 INFO (MainThread) [music_assistant.players] Player registered: 673645ed-f077-a285-0759-06e915650b13/****
2025-11-14 16:35:06.294 INFO (MainThread) [music_assistant.players] Player registered: 4b3346eb-4591-ec97-f688-17930d98fa82/****
2025-11-14 16:35:06.392 INFO (MainThread) [music_assistant.players] Player registered: df5f1459-2283-b41f-9baa-399adbeded58/****
2025-11-14 16:35:06.616 INFO (MainThread) [music_assistant.players] Player registered: 0a1f5781-3863-d046-1e8e-fcc6bc390f1b/****
2025-11-14 16:35:06.764 INFO (MainThread) [music_assistant.players] Player registered: 33a4c611-1cbf-43b6-9536-4072fede37db/****
2025-11-14 16:35:06.911 INFO (MainThread) [music_assistant.players] Player registered: fe4812fa-074a-0e1e-9781-3fa3f909f488/****
2025-11-14 16:35:07.096 INFO (MainThread) [music_assistant.players] Player registered: 232b2922-11eb-1a84-570e-5d672ea04930/****
2025-11-14 16:37:19.251 INFO (MainThread) [music_assistant.players] Player registered: ma_xba7mmmp32/This Device
WARNING: [youtube] dQw4w9WgXcQ: Signature solving failed: Some formats may be missing. Ensure you have a supported JavaScript runtime and challenge solver script distribution installed. Review any warnings presented before this message. For more details, refer to  https://github.com/yt-dlp/yt-dlp/wiki/EJS
WARNING: [youtube] dQw4w9WgXcQ: n challenge solving failed: Some formats may be missing. Ensure you have a supported JavaScript runtime and challenge solver script distribution installed. Review any warnings presented before this message. For more details, refer to  https://github.com/yt-dlp/yt-dlp/wiki/EJS
WARNING: Only images are available for download. use --list-formats to see them
ERROR: [youtube] dQw4w9WgXcQ: Requested format is not available. Use --list-formats for a list of available formats
2025-11-14 16:37:49.790 ERROR (MainThread) [music_assistant.webserver] Error handling message: config/providers/save: ERROR: [youtube] dQw4w9WgXcQ: Requested format is not available. Use --list-formats for a list of available formats
2025-11-14 16:39:46.901 ERROR (Thread-15) [pychromecast.socket_client] [****(****):8009] Failed to connect to service MDNSServiceInfo(name='Nest-Audio-df5f14592283b41f9baa399adbeded58._googlecast._tcp.local.'), retrying in 5.0s
WARNING: [youtube] dQw4w9WgXcQ: Signature solving failed: Some formats may be missing. Ensure you have a supported JavaScript runtime and challenge solver script distribution installed. Review any warnings presented before this message. For more details, refer to  https://github.com/yt-dlp/yt-dlp/wiki/EJS
WARNING: [youtube] dQw4w9WgXcQ: n challenge solving failed: Some formats may be missing. Ensure you have a supported JavaScript runtime and challenge solver script distribution installed. Review any warnings presented before this message. For more details, refer to  https://github.com/yt-dlp/yt-dlp/wiki/EJS
WARNING: Only images are available for download. use --list-formats to see them
ERROR: [youtube] dQw4w9WgXcQ: Requested format is not available. Use --list-formats for a list of available formats
2025-11-14 16:42:53.545 ERROR (MainThread) [music_assistant.webserver] Error handling message: config/providers/save: ERROR: [youtube] dQw4w9WgXcQ: Requested format is not available. Use --list-formats for a list of available formats
2025-11-14 16:43:33.632 ERROR (MainThread) [music_assistant.webserver] Error handling message: config/providers/save: ERROR: [youtube] dQw4w9WgXcQ: Requested format is not available. Use --list-formats for a list of available formats
2025-11-14 16:43:34.423 ERROR (MainThread) [music_assistant.metadata] Error while updating metadata for library://artist/1494: [Errno 104] Connection reset by peer
WARNING: [youtube] dQw4w9WgXcQ: Signature solving failed: Some formats may be missing. Ensure you have a supported JavaScript runtime and challenge solver script distribution installed. Review any warnings presented before this message. For more details, refer to  https://github.com/yt-dlp/yt-dlp/wiki/EJS
WARNING: [youtube] dQw4w9WgXcQ: n challenge solving failed: Some formats may be missing. Ensure you have a supported JavaScript runtime and challenge solver script distribution installed. Review any warnings presented before this message. For more details, refer to  https://github.com/yt-dlp/yt-dlp/wiki/EJS
WARNING: Only images are available for download. use --list-formats to see them
ERROR: [youtube] dQw4w9WgXcQ: Requested format is not available. Use --list-formats for a list of available formats
2025-11-14 16:45:46.616 ERROR (MainThread) [music_assistant.webserver] Error handling message: config/providers/save: ERROR: [youtube] dQw4w9WgXcQ: Requested format is not available. Use --list-formats for a list of available formats
WARNING: [youtube] dQw4w9WgXcQ: Signature solving failed: Some formats may be missing. Ensure you have a supported JavaScript runtime and challenge solver script distribution installed. Review any warnings presented before this message. For more details, refer to  https://github.com/yt-dlp/yt-dlp/wiki/EJS
WARNING: [youtube] dQw4w9WgXcQ: n challenge solving failed: Some formats may be missing. Ensure you have a supported JavaScript runtime and challenge solver script distribution installed. Review any warnings presented before this message. For more details, refer to  https://github.com/yt-dlp/yt-dlp/wiki/EJS
WARNING: Only images are available for download. use --list-formats to see them
ERROR: [youtube] dQw4w9WgXcQ: Requested format is not available. Use --list-formats for a list of available formats
2025-11-14 16:48:30.912 ERROR (MainThread) [music_assistant.webserver] Error handling message: config/providers/save: ERROR: [youtube] dQw4w9WgXcQ: Requested format is not available. Use --list-formats for a list of available formats
WARNING: [youtube] dQw4w9WgXcQ: Signature solving failed: Some formats may be missing. Ensure you have a supported JavaScript runtime and challenge solver script distribution installed. Review any warnings presented before this message. For more details, refer to  https://github.com/yt-dlp/yt-dlp/wiki/EJS
WARNING: [youtube] dQw4w9WgXcQ: n challenge solving failed: Some formats may be missing. Ensure you have a supported JavaScript runtime and challenge solver script distribution installed. Review any warnings presented before this message. For more details, refer to  https://github.com/yt-dlp/yt-dlp/wiki/EJS
WARNING: Only images are available for download. use --list-formats to see them
ERROR: [youtube] dQw4w9WgXcQ: Requested format is not available. Use --list-formats for a list of available formats
2025-11-14 16:49:40.333 INFO (MainThread) [music_assistant.players] Player registered: ma_h5drp3mgvp/This Device
WARNING: [youtube] dQw4w9WgXcQ: Signature solving failed: Some formats may be missing. Ensure you have a supported JavaScript runtime and challenge solver script distribution installed. Review any warnings presented before this message. For more details, refer to  https://github.com/yt-dlp/yt-dlp/wiki/EJS
WARNING: [youtube] dQw4w9WgXcQ: n challenge solving failed: Some formats may be missing. Ensure you have a supported JavaScript runtime and challenge solver script distribution installed. Review any warnings presented before this message. For more details, refer to  https://github.com/yt-dlp/yt-dlp/wiki/EJS
WARNING: Only images are available for download. use --list-formats to see them
ERROR: [youtube] dQw4w9WgXcQ: Requested format is not available. Use --list-formats for a list of available formats
2025-11-14 16:49:53.196 ERROR (MainThread) [music_assistant.webserver] Error handling message: config/providers/save: ERROR: [youtube] dQw4w9WgXcQ: Requested format is not available. Use --list-formats for a list of available formats
WARNING: [youtube] dQw4w9WgXcQ: Signature solving failed: Some formats may be missing. Ensure you have a supported JavaScript runtime and challenge solver script distribution installed. Review any warnings presented before this message. For more details, refer to  https://github.com/yt-dlp/yt-dlp/wiki/EJS
WARNING: [youtube] dQw4w9WgXcQ: n challenge solving failed: Some formats may be missing. Ensure you have a supported JavaScript runtime and challenge solver script distribution installed. Review any warnings presented before this message. For more details, refer to  https://github.com/yt-dlp/yt-dlp/wiki/EJS
WARNING: Only images are available for download. use --list-formats to see them
ERROR: [youtube] dQw4w9WgXcQ: Requested format is not available. Use --list-formats for a list of available formats
2025-11-14 16:50:15.772 ERROR (MainThread) [music_assistant.webserver] Error handling message: config/providers/save: ERROR: [youtube] dQw4w9WgXcQ: Requested format is not available. Use --list-formats for a list of available formats
WARNING: [youtube] dQw4w9WgXcQ: Signature solving failed: Some formats may be missing. Ensure you have a supported JavaScript runtime and challenge solver script distribution installed. Review any warnings presented before this message. For more details, refer to  https://github.com/yt-dlp/yt-dlp/wiki/EJS
WARNING: [youtube] dQw4w9WgXcQ: n challenge solving failed: Some formats may be missing. Ensure you have a supported JavaScript runtime and challenge solver script distribution installed. Review any warnings presented before this message. For more details, refer to  https://github.com/yt-dlp/yt-dlp/wiki/EJS
WARNING: Only images are available for download. use --list-formats to see them
ERROR: [youtube] dQw4w9WgXcQ: Requested format is not available. Use --list-formats for a list of available formats
2025-11-14 16:50:32.760 ERROR (MainThread) [music_assistant.webserver] Error handling message: config/providers/save: ERROR: [youtube] dQw4w9WgXcQ: Requested format is not available. Use --list-formats for a list of available formats
2025-11-14 16:50:47.693 DEBUG (MainThread) [music_assistant.ytmusic] Log level configured to VERBOSE
2025-11-14 16:50:47.794 DEBUG (MainThread) [music_assistant.ytmusic] PO Token server responded with 200
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8 (No ANSI), error utf-8 (No ANSI), screen utf-8 (No ANSI)
[debug] yt-dlp version [email protected] from yt-dlp/yt-dlp [335653be8] (pip) API
[debug] params: {'quiet': False, 'verbose': True, 'cookiefile': <_io.StringIO object at 0x7efc7bb82bc0>, 'extractor_args': {'youtubepot-bgutilhttp': {'base_url': ['http://127.0.0.1:4416'], 'disable_innertube': '1'}, 'youtube': {'skip': ['translated_subs', 'dash'], 'player_client': ['web_music'], 'player_skip': ['webpage']}}, 'js_runtimes': {'deno': {}}, 'remote_components': set(), 'compat_opts': set(), 'http_headers': {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'Accept-Language': 'en-us,en;q=0.5', 'Sec-Fetch-Mode': 'navigate'}}
[debug] Python 3.13.6 (CPython x86_64 64bit) - Linux-6.12.51-haos-x86_64-with (OpenSSL 3.3.4 1 Jul 2025)
[debug] exe versions: ffmpeg 7.1.1 (setts), ffprobe 7.1.1
[debug] Optional libraries: Cryptodome-3.23.0, brotli-1.2.0, certifi-2025.07.14, mutagen-1.47.0, requests-2.32.5, sqlite3-3.48.0, urllib3-2.5.0, websockets-15.0.1, yt_dlp_ejs-0.3.1
[debug] JS runtimes: none
[debug] Proxy map: {}
[debug] Request Handlers: urllib, requests, websockets
[debug] Plugin directories: /app/venv/lib/python3.13/site-packages/yt_dlp_plugins
[debug] Loaded 1844 extractors
[debug] [youtube] Found YouTube account cookies
[debug] [youtube] [pot:bgutil:script] No script path passed, defaulting to /root/bgutil-ytdlp-pot-provider/server/build/generate_once.js
[debug] [youtube] [pot:bgutil:script] Script path doesn't exist: /root/bgutil-ytdlp-pot-provider/server/build/generate_once.js
[debug] [youtube] [pot] PO Token Providers: bgutil:http-1.2.2 (external), bgutil:script-1.2.2 (external, unavailable)
[debug] [youtube] [pot] PO Token Cache Providers: memory
[debug] [youtube] [pot] PO Token Cache Spec Providers: webpo
[debug] [youtube] [jsc] JS Challenge Providers: bun (unavailable), deno (unavailable), node (unavailable), quickjs (unavailable)
[youtube] Extracting URL: https://music.youtube.com/watch?v=dQw4w9WgXcQ
[youtube] dQw4w9WgXcQ: Downloading initial data API JSON
[debug] [youtube] Detected YouTube Premium subscription
[youtube] dQw4w9WgXcQ: Downloading web music client config
[debug] [youtube] dQw4w9WgXcQ: Detected experiment to bind GVS PO Token to video id.
[youtube] dQw4w9WgXcQ: Downloading player ef5f17ca-main
[youtube] dQw4w9WgXcQ: Downloading web music player API JSON
[debug] [youtube] dQw4w9WgXcQ: Retrieved a gvs PO Token for web_music client
WARNING: [youtube] dQw4w9WgXcQ: Signature solving failed: Some formats may be missing. Ensure you have a supported JavaScript runtime and challenge solver script distribution installed. Review any warnings presented before this message. For more details, refer to  https://github.com/yt-dlp/yt-dlp/wiki/EJS
WARNING: [youtube] dQw4w9WgXcQ: n challenge solving failed: Some formats may be missing. Ensure you have a supported JavaScript runtime and challenge solver script distribution installed. Review any warnings presented before this message. For more details, refer to  https://github.com/yt-dlp/yt-dlp/wiki/EJS
WARNING: Only images are available for download. use --list-formats to see them
[debug] Sort order given by extractor: quality, res, fps, hdr:12, source, vcodec, channels, acodec, lang, proto
[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, hdr:12(7), source, vcodec, channels, acodec, lang, proto, size, br, asr, vext, aext, hasaud, id
[debug] Default format spec: bestvideo*+bestaudio/best
ERROR: [youtube] dQw4w9WgXcQ: Requested format is not available. Use --list-formats for a list of available formats
Traceback (most recent call last):
  File "/app/venv/lib/python3.13/site-packages/yt_dlp/YoutubeDL.py", line 1696, in wrapper
    return func(self, *args, **kwargs)
  File "/app/venv/lib/python3.13/site-packages/yt_dlp/YoutubeDL.py", line 1852, in __extract_info
    return self.process_ie_result(ie_result, download, extra_info)
           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/venv/lib/python3.13/site-packages/yt_dlp/YoutubeDL.py", line 1911, in process_ie_result
    ie_result = self.process_video_result(ie_result, download=download)
  File "/app/venv/lib/python3.13/site-packages/yt_dlp/YoutubeDL.py", line 3051, in process_video_result
    raise ExtractorError(
        'Requested format is not available. Use --list-formats for a list of available formats',
        expected=True, video_id=info_dict['id'], ie=info_dict['extractor'])
yt_dlp.utils.ExtractorError: [youtube] dQw4w9WgXcQ: Requested format is not available. Use --list-formats for a list of available formats
2025-11-14 16:50:50.676 ERROR (MainThread) [music_assistant.webserver] Error handling message: config/providers/save: ERROR: [youtube] dQw4w9WgXcQ: Requested format is not available. Use --list-formats for a list of available formats

@MarvinSchenkel
Copy link
Contributor

UPDATE REGARDING YT MUSIC:

We just released 2.6.3 with the fixes for YT Music. However, the required JS runtime that is used to solve JS challenges for YTM does NOT work with the architecture we use for stable. As of 2.7.0, Music Assistant will use a new base image architecture that does support this. This unfortuantely means that YTM cannot be fixed in the stable channel for now and will only work again starting 2.7.0. YT Music currently only works in the beta releases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Youtube Music status: 🔴2.6 Stable

4 participants