YouTube downloads fail: no JavaScript runtime for yt-dlp in the api image
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
从安装 yt-dlp 的api/Dockerfile中的frankenphp_upstream阶段开始。在那里添加 JavaScript 运行时;如果选择 Node,随后检查YoutubeDlCliDownloader::getConfigFileContents()中生成的 yt-dlp 配置。验证yt-dlp --verbose在 api 容器中报告了运行时,并且提供的 YouTube URL 可以模拟并下载。
由索引模型根据 Issue 内容生成。
描述
Problem
yt-dlp now needs a JavaScript runtime for YouTube extraction. The api image has none, so YouTube downloads fail. Found while testing #46 / #52.
From yt-dlp --verbose in the api container (yt-dlp 2026.10.26):
[debug] JS runtimes: none
WARNING: [youtube] No supported JavaScript runtime could be found. Only deno is enabled by default; to use another runtime add --js-runtimes RUNTIME[:PATH] to your command/config. YouTube extraction without a JS runtime has been deprecated, and some formats may be missing.
ERROR: [youtube] jNQXAC9IVRw: Requested format is not available. Use --list-formats for a list of available formats
The frankenphp_dev and frankenphp_prod stages both build on frankenphp_upstream, where yt-dlp is installed (api/Dockerfile), so production is affected as well. Because supportsDownloadJob() runs yt-dlp --simulate, YouTube URLs probably can't even be matched to the yt-dlp downloader anymore.
Proposed fix
Install a JavaScript runtime in the frankenphp_upstream stage:
- deno (enabled by default in yt-dlp, no config change needed), or
- node plus
--js-runtimes nodein the generated yt-dlp config (YoutubeDlCliDownloader::getConfigFileContents()).
yt-dlp[default] already pulls in yt_dlp_ejs (listed in the debug output), so only the runtime is missing.
Verification
yt-dlp --verbosein the api container shows a JS runtime instead ofnone.- A YouTube URL can be simulated and downloaded, e.g.
https://www.youtube.com/watch?v=jNQXAC9IVRw.
- 主要语言
- PHP
- 星标
- 1
- 派生
- 0
- 平均合并
- 3 天 50 分钟
- 30 天内合并 PR
- 9
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
FetchDock/fetchdock-server 的其他 Issue
-
bug good first issue
难度 2/5 1-3 小时 新手友好度 69/100
FetchDock/fetchdock-server#54 ·
维护者通常 1 天内回复
-
enhancement
难度 5/5 一周以上 新手友好度 24/100
FetchDock/fetchdock-server#55 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 45/100
FetchDock/fetchdock-server#23 · 1 条评论 ·
维护者通常 1 天内回复
-
enhancement
难度 5/5 一周以上 新手友好度 25/100
FetchDock/fetchdock-server#22 ·
维护者通常 1 天内回复
-
enhancement
难度 4/5 3-5 天 新手友好度 38/100
FetchDock/fetchdock-server#21 ·
维护者通常 1 天内回复
查看 FetchDock/fetchdock-server 的全部 Issue
相似的 Issue
-
AI effort: [XS] priority: medium severity: minor type: bug
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
Exclude module `require-dev` and `autoload-dev` from the generated `composer.json`可能已有人在做 @keiserjb 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
-
bug
难度 2/5 1-3 小时 新手友好度 68/100
mailcow/mailcow-dockerized#7677 · 1 条评论 ·
维护者通常 1 天内回复