node-ytdl-core icon indicating copy to clipboard operation
node-ytdl-core copied to clipboard

Error: Could not extract functions

Open smarko-web opened this issue 2 months ago • 8 comments

I’m currently facing an issue where I can’t download mp3/4. Everything was working fine until a few weeks ago. The other functions of this library are working fine. Hope this issue gets resolved soon

error message

Stream error: Error: Could not extract functions
    at /Users/mark/Desktop/youtube-downloader/back-end/node_modules/ytdl-core/lib/sig.js:20:11
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
Download or merge failed: Error: Could not extract functions
    at /Users/mark/Desktop/youtube-downloader/back-end/node_modules/ytdl-core/lib/sig.js:20:11
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)

environment

  • node 22.16.0
  • ytdl-core 4.11.5

smarko-web avatar Oct 02 '25 18:10 smarko-web

same issue

kosmixyt avatar Oct 10 '25 13:10 kosmixyt

I'm trying to identify the issue, and I can see that there have been changes to the files from which the functions are being extracted. (base.js)

This is where the code breaks

exports.getFunctions = (html5playerfile, options) => exports.cache.getOrSet(html5playerfile, async() => {
  const body = await utils.exposedMiniget(html5playerfile, options).text();
  const functions = exports.extractFunctions(body);
  if (!functions || !functions.length) {
    throw Error('Could not extract functions');
  }
  exports.cache.set(html5playerfile, functions);
  return functions;
});

trying to parse the file and extract the function

base.js

LogicalOgbonna avatar Oct 27 '25 21:10 LogicalOgbonna

Same issue here.

Darksoulsong avatar Oct 29 '25 16:10 Darksoulsong

any fix yet?

Coding4ever123 avatar Nov 03 '25 23:11 Coding4ever123

any fix yet?

No not yet

smarko-web avatar Nov 03 '25 23:11 smarko-web

Same issue

moraxh avatar Nov 13 '25 01:11 moraxh

Same issue LOL

SouravRCoder avatar Nov 16 '25 12:11 SouravRCoder

same issue

figueiredojoaopedro avatar Dec 03 '25 00:12 figueiredojoaopedro

same

Squashhh avatar Dec 12 '25 17:12 Squashhh

same issue

OwlWorksInnovations avatar Dec 14 '25 10:12 OwlWorksInnovations