YouTube downloads fail: no JavaScript runtime for yt-dlp in the api image

Abierto Apto para principiantes
#53 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
77/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
docker, php
Área
backend, devops

Línea de trabajo

Empieza por la etapa frankenphp_upstream de api/Dockerfile, donde se instala yt-dlp. Añade allí un entorno de ejecución de JavaScript y, si eliges Node, comprueba después la configuración generada de yt-dlp en YoutubeDlCliDownloader::getConfigFileContents(). Verifica que yt-dlp --verbose indique un entorno de ejecución en el contenedor api y que la URL de YouTube proporcionada se pueda simular y descargar.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

bug dependencies

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 node in 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 --verbose in the api container shows a JS runtime instead of none.
  • A YouTube URL can be simulated and downloaded, e.g. https://www.youtube.com/watch?v=jNQXAC9IVRw.
Lenguaje dominante
PHP
Estrellas
1
Forks
0
Merge medio
3 d 50 min
PR fusionados (30 d)
9

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de FetchDock/fetchdock-server

Todos los issues de FetchDock/fetchdock-server

Issues similares

Más issues de PHP

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.