node-ytdl-core: "Could not find player config"

Stack trace:

1|communit |     at exports.getBasicInfo (/home/jameshawkins/community-bot/node_modules/ytdl-core/lib/info.js:90:13)
1|communit |     at runMicrotasks (<anonymous>)
1|communit |     at processTicksAndRejections (internal/process/task_queues.js:97:5)
1|communit |     at async Map.getOrSet (/home/jameshawkins/community-bot/node_modules/ytdl-core/lib/cache.js:24:19)
1|communit |     at async exports.getInfo (/home/jameshawkins/community-bot/node_modules/ytdl-core/lib/info.js:215:14)
1|communit |     at async Map.getOrSet (/home/jameshawkins/community-bot/node_modules/ytdl-core/lib/cache.js:24:19)

Related code:

const dispatcher = this.connection.play(ytdl(`https://youtube.com/watch?v=${this.playlist[this.currentIndex].id}`, {
    filter: "audioonly",
    highWaterMark: 1024 * 1024 * 10
}));

This error has started occurring on videos that worked perfectly previously.

Thanks in advance for any help.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 2
  • Comments: 37 (5 by maintainers)

Commits related to this issue

Most upvoted comments

Something weird I’m experiencing is just every other video will have the “Could not find player config” error, if you re-request it then it works fine that next time

Same here.

getting error: Error: Could not find player config at exports.getBasicInfo (/home/container/node_modules/ytdl-core-discord/node_modules/ytdl-core/lib/info.js:59:13) at processTicksAndRejections (internal/process/task_queues.js:97:5) at async Object.exports. [as getBasicInfo] (/home/container/node_modules/ytdl-core-discord/node_modules/ytdl-core/lib/info.js:296:18) at async exports.getFullInfo (/home/container/node_modules/ytdl-core-discord/node_modules/ytdl-core/lib/info.js:187:14) at async Object.exports. [as getFullInfo] (/home/container/node_modules/ytdl-core-discord/node_modules/ytdl-core/lib/info.js:296:18)

Versions: “ytdl-core”: “^3.1.0”, “ytdl-core-discord”: “^1.2.1”

Update to YTDL 3.4+ that is fixed in a merge or latest which is 4.00

npm i ytdl-core@latest is a decent way of doing it

Just for posterity, I was receiving this error when attempting to use ytdl.getInfo() with URLs that have additional parameters beyond “v=”, for example, &list, &index, &ab_channel. Cleaning up the URL so it only has https://www.youtube.com/watch?v=(videoID) appears to have fixed on my end.

internally, ytdl-core extracts the id out of whatever url format its given. so this wouldn’t matter.

Fixed: npm update ytdl-core npm update ytdl-core-discord

daily tests show this too https://github.com/fent/node-ytdl-core/runs/1005506799

this is happening on age restricted videos