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

Aperta Adatta ai principianti
#53 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
77/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
docker, php
Ambito
backend, devops

Direzione di ricerca

Inizia con la fase frankenphp_upstream in api/Dockerfile, dove viene installato yt-dlp. Aggiungi lì un runtime JavaScript, quindi controlla la configurazione yt-dlp generata in YoutubeDlCliDownloader::getConfigFileContents() se scegli Node. Verifica che yt-dlp --verbose segnali un runtime nel container api e che l’URL YouTube fornito possa essere simulato e scaricato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.
Lingua principale
PHP
Stelle
1
Fork
0
Merge medio
3g 50m
PR unite (30g)
9

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di FetchDock/fetchdock-server

Tutte le issue di FetchDock/fetchdock-server

Issue simili

Altre issue su PHP

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.