yt-dlp: Hanging after "Native nsig extraction failed: Trying with PhantomJS"

DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

  • I understand that I will be blocked if I remove or skip any mandatory* field

Checklist

  • I’m reporting a bug unrelated to a specific site
  • I’ve verified that I’m running yt-dlp version 2022.08.19 (update instructions) or later (specify commit)
  • I’ve checked that all provided URLs are playable in a browser with the same IP and same login details
  • I’ve checked that all URLs and arguments with special characters are properly quoted or escaped
  • I’ve searched the bugtracker for similar issues including closed ones. DO NOT post duplicates
  • I’ve read the guidelines for opening an issue

Provide a description that is worded well enough to be understood

Hi last days i see Error and yt-dlp stop work. Some Videos work… other stop with error and we Quit with strg+c we cant found other Bug Report for “Native nsig extraction failed”

we use in script yt-dlp -U yt-dlp -civw --write-description --write-info-json --write-annotations --write-thumbnail --all-subs --sub-langs de,en,de-en*,live_chat --write-subs -o “%(channel)s/%(upload_date)s %(title)s/%(title)s.%(ext)s” --live-from-start --write-comments -v “https://www.youtube.com/watch?v=DebytkImQrw

Provide verbose output that clearly demonstrates the problem

  • Run your yt-dlp command with -vU flag added (yt-dlp -vU <your command line>)
  • Copy the WHOLE output (starting with [debug] Command-line config) and insert it below

Complete Verbose Output

yt-dlp -vU
[debug] Command-line config: ['-vU']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out UTF-8, error UTF-8, screen UTF-8
[debug] yt-dlp version 2022.08.19 [48c88e0] (zip)
[debug] Python 3.7.3 (CPython 64bit) - Linux-4.19.0-21-amd64-x86_64-with-debian-10.12 (glibc 2.28)
[debug] Checking exe version: ffmpeg -bsfs
[debug] Checking exe version: ffprobe -bsfs
[debug] exe versions: ffmpeg 4.1.9-0, ffprobe 4.1.9-0, phantomjs 1000, rtmpdump 2.4
[debug] Optional libraries: certifi-2018.08.24, pyxattr-0.6.1, sqlite3-2.6.0
[debug] Proxy map: {}
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: 2022.08.19, Current version: 2022.08.19
yt-dlp is up to date (2022.08.19)



yt-dlp -civw --write-description --write-info-json --write-annotations --write-thumbnail --all-subs --sub-langs de,en,de-en*,live_chat --write-subs -o "%(channel)s/%(upload_date)s %(title)s/%(title)s.%(ext)s" --live-from-start --write-comments -v "https://www.youtube.com/watch?v=DebytkImQrw"
[debug] Command-line config: ['-civw', '--write-description', '--write-info-json', '--write-annotations', '--write-thumbnail', '--all-subs', '--sub-langs', 'de,en,de-en*,live_chat', '--write-subs', '-o', '%(channel)s/%(upload_date)s %(title)s/%(title)s.%(ext)s', '--live-from-start', '--write-comments', '-v', 'https://www.youtube.com/watch?v=DebytkImQrw']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out UTF-8, error UTF-8, screen UTF-8
[debug] yt-dlp version 2022.08.19 [48c88e0] (zip)
[debug] Python 3.7.3 (CPython 64bit) - Linux-4.19.0-21-amd64-x86_64-with-debian-10.12 (glibc 2.28)
[debug] Checking exe version: ffmpeg -bsfs
[debug] Checking exe version: ffprobe -bsfs
[debug] exe versions: ffmpeg 4.1.9-0, ffprobe 4.1.9-0, phantomjs 1000, rtmpdump 2.4
[debug] Optional libraries: certifi-2018.08.24, pyxattr-0.6.1, sqlite3-2.6.0
[debug] Proxy map: {}
[debug] [youtube] Extracting URL: https://www.youtube.com/watch?v=DebytkImQrw
[youtube] DebytkImQrw: Downloading webpage
[youtube] DebytkImQrw: Downloading android player API JSON
[debug] Loading youtube-nsig.009f1d77 from cache
WARNING: [youtube] DebytkImQrw: Native nsig extraction failed: Trying with PhantomJS
         n = 5dwFHw8aFWQUQtffRq ; player = https://www.youtube.com/s/player/009f1d77/player_ias.vflset/en_US/base.js
[debug] [youtube] No terminating paren } in: {try{0<c[52]&&(7<c[88]&&((0,c[29])(c[85],c[92])...)(c[31]),c[41],c[88],c[75],(0,c[35])())}catch(d){}; please report this issue on  https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using  yt-dlp -U
[youtube] DebytkImQrw: Executing signature code
[debug] [youtube] PhantomJS command line: phantomjs --ssl-protocol=any /tmp/tmps2s7uesa
^C
ERROR: Interrupted by user

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Reactions: 2
  • Comments: 19 (8 by maintainers)

Commits related to this issue

Most upvoted comments

I’m getting the No terminating paren error as well:

[debug] Command-line config: ['--verbose', '-F', 'https://youtu.be/4IOOJ7EqTwE']
[debug] Portable config "C:\Users\quant\scoop\apps\yt-dlp\current\yt-dlp.conf": []
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version 2022.08.19 [48c88e0] (win32_exe)
[debug] Python 3.8.10 (CPython 64bit) - Windows-10-10.0.22000-SP0
[debug] Checking exe version: ffmpeg -bsfs
[debug] Checking exe version: ffprobe -bsfs
[debug] exe versions: ffmpeg 5.1-full_build-www.gyan.dev (setts), ffprobe 5.1-full_build-www.gyan.dev, phantomjs 2.1.1
[debug] Optional libraries: Cryptodome-3.15.0, brotli-1.0.9, certifi-2022.06.15, mutagen-1.45.1, sqlite3-2.6.0, websockets-10.3
[debug] Proxy map: {}
[debug] [youtube] Extracting URL: https://youtu.be/4IOOJ7EqTwE
[youtube] 4IOOJ7EqTwE: Downloading webpage
[youtube] 4IOOJ7EqTwE: Downloading android player API JSON
[youtube] 4IOOJ7EqTwE: Downloading player 113ca41c
[debug] Saving youtube-nsig.113ca41c to cache
WARNING: [youtube] 4IOOJ7EqTwE: Native nsig extraction failed: Trying with PhantomJS
         n = LuEkwAwh8GTDfi ; player = https://www.youtube.com/s/player/113ca41c/player_ias.vflset/en_US/base.js
[debug] [youtube] No terminating paren } in: {e=void 0===e?"":e;f=void 0===f?!1:f;if(a)if(c&...ack;d.level=b[c].level;g.eu(d)}Zw().set("errors",{; please report this issue on  https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using  yt-dlp -U
[youtube] 4IOOJ7EqTwE: Executing signature code
[debug] [youtube] PhantomJS command line: phantomjs "--ssl-protocol=any" "C:\Users\quant\AppData\Local\Temp\tmpomkz4wya"

ERROR: Interrupted by user

This occurs even after running yt-dlp --rm-cache and yt-dlp --rm-cache-dir (as indicated by [debug] Saving youtube-nsig.113ca41c to cache). When I look at the downloaded file, 113ca41c.json, I can very clearly see an unbalanced { at the end of the JavaScript string in the file. Is the JS that yt-dlp is downloading getting truncated somehow?

have you tried clearing your cache? ~/.cache/yt-dlp/

Some people are reporting PhantomJS hanging even with the latest version. I have no idea why. I have implemented a a timeout for now so that atleast yt-dlp doesnt get stuck

another Video one Video i wait over 15 Min but nothing same Stop…

yt-dlp -civw --write-description --write-info-json --write-annotations --write-thumbnail --all-subs --sub-langs de,en,de-en*,live_chat --write-subs -o "%(channel)s/%(upload_date)s %(title)s/%(title)s.%(ext)s" --live-from-start --write-comments -v "https://www.youtube.com/watch?v=STZW-o4O7Fo"
[debug] Command-line config: ['-civw', '--write-description', '--write-info-json', '--write-annotations', '--write-thumbnail', '--all-subs', '--sub-langs', 'de,en,de-en*,live_chat', '--write-subs', '-o', '%(channel)s/%(upload_date)s %(title)s/%(title)s.%(ext)s', '--live-from-start', '--write-comments', '-v', 'https://www.youtube.com/watch?v=STZW-o4O7Fo']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out UTF-8, error UTF-8, screen UTF-8
[debug] yt-dlp version 2022.08.19 [48c88e0] (zip)
[debug] Python 3.7.3 (CPython 64bit) - Linux-4.19.0-21-amd64-x86_64-with-debian-10.12 (glibc 2.28)
[debug] Checking exe version: ffmpeg -bsfs
[debug] Checking exe version: ffprobe -bsfs
[debug] exe versions: ffmpeg 4.1.9-0, ffprobe 4.1.9-0, phantomjs 1000, rtmpdump 2.4
[debug] Optional libraries: certifi-2018.08.24, pyxattr-0.6.1, sqlite3-2.6.0
[debug] Proxy map: {}
[debug] [youtube] Extracting URL: https://www.youtube.com/watch?v=STZW-o4O7Fo
[youtube] STZW-o4O7Fo: Downloading webpage
[youtube] STZW-o4O7Fo: Downloading android player API JSON
[debug] Loading youtube-nsig.009f1d77 from cache
WARNING: [youtube] STZW-o4O7Fo: Native nsig extraction failed: Trying with PhantomJS
         n = 7O0RjktKLj68Vrfm3o ; player = https://www.youtube.com/s/player/009f1d77/player_ias.vflset/en_US/base.js
[debug] [youtube] No terminating paren } in: {try{0<c[52]&&(7<c[88]&&((0,c[29])(c[85],c[92])...)(c[31]),c[41],c[88],c[75],(0,c[35])())}catch(d){}; please report this issue on  https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using  yt-dlp -U
[youtube] STZW-o4O7Fo: Executing signature code
[debug] [youtube] PhantomJS command line: phantomjs --ssl-protocol=any /tmp/tmpg4gztqj8
^C
ERROR: Interrupted by user