Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error 403, 410, Cannot play a resource that has already ended; Can't find music/video or write EPIPE when play by link

See original GitHub issue

Describe the bug [PlayerError] Cannot play a resource that has already ended (and return error code 403 or 410) Return Can’t find music/video or write EPIPE when play by link

To Reproduce Command Bot play music Expected behavior Bot play music

Screenshots image image image image image

Please complete the following information:

  • Node Version: 16.11.0
  • Discord Player Version: 5.1.0
  • Discord.js Version: 13.2.0
  • FFmpeg-static Version: 4.4.0

Additional context Code:



client.player = new Player(client, {
    ytdlDownloadOptions: {
        filter: "audioonly"

client.player.on("error", (queue, error) => {
    console.log(`Lỗi trong hàng đợi: ${error.message}`));
    queue.metadata.send(`❌ | Lỗi trong hàng đợi: ` + "`" + `${error.message}` + "`" + `. Vui lòng thử lại sau`)
client.player.on("connectionError", (queue, error) => {
    console.log(`Lỗi kết nối: ${error.message}`));
    queue.metadata.send(`❌ | Lỗi kết nối: ` + "`" + `${error.message}` + "`" + `. Vui lòng thử lại sau`)

client.player.on("trackStart", (queue, track) => {
    queue.metadata.send(`🎶 | Bắt đầu phát **${track.title}** trong **${}**!`);

client.player.on("trackAdd", (queue, track) => {
    queue.metadata.send(`🎶 | Bài **${track.title}** đã được thêm vào hàng đợi!`);

client.player.on("botDisconnect", (queue) => {
    queue.metadata.send("❌ | Xóa hàng đợi do bị ngắt kết nối khỏi kênh nói thủ công!");

client.player.on("channelEmpty", (queue) => {
    queue.metadata.send("❌ | Tự thoát do không có người nghe");

client.player.on("queueEnd", (queue) => {
    queue.metadata.send("**✅ | Đã phát xong!** *Nếu bài của bạn vẫn chưa được phát, vui lòng thử lại*");

//{some code}


const Discord = require('discord.js')
const { Player, QueryType, QueueRepeatMode } = require("discord-player");

module.exports = {
    name: "play",
    description: "play songs",

    async run (client, message, args) {
        const player = client.player;
        if (! return"❌ | **Bạn phải ở trong một kênh nói!**");
        if ( && !== return":x: | **Bạn phải ở cùng kênh nói với Bot!**"); 

        const queue = await player.createQueue(message.guild, {
        try {
            if (!queue.connection) await queue.connect(;
        } catch {
            return"❌ | Đã xảy ra lỗi khi tham gia kênh nói!");
        const searchResult = await" "), {
            requestedBy: message.user,
            searchEngine: QueryType.AUTO
        if (!searchResult || !searchResult.tracks.length) return"❌ | Không tìm thấy nhạc/video hoặc đã xảy ra lỗi khi tìm kiếm");`⏱ | Đang tải ${searchResult.playlist ? "danh sách phát" : "bài nhạc"}...` );
        if (searchResult.playlist) {queue.addTracks(searchResult.tracks)} else {queue.addTrack(searchResult.tracks[0])};
        if (!queue.playing) await;

Run Command : node --max-old-space-size=4096 main.js

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:12

github_iconTop GitHub Comments

PiousGamingcommented, Oct 10, 2021

That why u have EPIPE error, uninstall ffmpeg-static package cuz that package is not stable. Let download ffmpeg from and about error 410, it will reduce if you use cookies about error 403, i asked ytdl and they said “there is no way to fix yet, its probably caused on youtube’s side”

tomihbkcommented, Apr 6, 2022

Any new developments on this issue?

Read more comments on GitHub >

github_iconTop Results From Across the Web

AudioPlayerError: write EPIPE ytdl-core discordjs
I have been trying to make a music system ...
Read more >
Top fly fishing guide schools, Gentiana sino ornata alba, Xrxsnmp.dll was not found, Edith marquez mirame descargar mp3, Taylor swift new album 2914, ......
Read more >
Adalit l'3000 anleitung, St louis cardinals wreath, End has a start video, ... Qtranslate wp 3.6, Play joust online midway, Dawson jackson eagles, ......
Read more >
Video File Cannot Be Played? Fix Different Video Error Codes
The video file cannot be played when various video error codes occur, we need to first diagnose the problem and later resolve it....
Read more >
Michael svarc the age, Jabber play, Ps blog au, Boer goat breeders in illinois, Eji in the dream letra, Alkany alkeny i alkiny...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found