#ffmpeg EAGAIN

22 messages · Page 1 of 1 (latest)

desert gorge
#
23-10-2023 22:35:54 A: Error: spawn /home/container/node_modules/ffmpeg-static/ffmpeg EAGAIN
    at ChildProcess._handle.onexit (node:internal/child_process:284:19)
    at onErrorNT (node:internal/child_process:477:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -11,
  code: 'EAGAIN',
  syscall: 'spawn /home/container/node_modules/ffmpeg-static/ffmpeg',
  path: '/home/container/node_modules/ffmpeg-static/ffmpeg',
  spawnargs: [
    '-i',
    'https://cdn.galaxybot.de/sounds/support/close-mika.mp3',
    '-analyzeduration',
    '0',
    '-loglevel',
    '0',
    '-f',
    's16le',
    '-ar',
    '48000',
    '-ac',
    '2',
    'pipe:1'
  ]
}```

I am playing a file with @discord.js/voice and it works 35 Times.
At the 36th attempt i get this error every time the bot is trying to start a playback
vale laurelBOT
#
  • What's your exact discord.js npm list discord.js and node node -v version?
  • Not a discord.js issue? Check out #1081585952654360687.
  • Consider reading #how-to-get-help to improve your question!
  • Explain what exactly your issue is.
  • Post the full error stack trace, not just the top part!
  • Show your code!
  • Issue solved? Press the button!
  • Marked as resolved by OP
cyan barn
#

that's a network issue. seeing that you use a remote URL as source that's probably the reason

desert gorge
desert gorge
#
24-10-2023 20:53:19 A: Error: spawn /home/container/node_modules/ffmpeg-static/ffmpeg EAGAIN
    at ChildProcess._handle.onexit (node:internal/child_process:284:19)
    at onErrorNT (node:internal/child_process:477:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -11,
  code: 'EAGAIN',
  syscall: 'spawn /home/container/node_modules/ffmpeg-static/ffmpeg',
  path: '/home/container/node_modules/ffmpeg-static/ffmpeg',
  spawnargs: [
    '-i',
    '/home/container/sound/support/support-rp.mp3',
    '-analyzeduration',
    '0',
    '-loglevel',
    '0',
    '-f',
    's16le',
    '-ar',
    '48000',
    '-ac',
    '2',
    'pipe:1'
  ]
}```
desert gorge
cyan barn
desert gorge
#

Ih think discord js voice is doing this

#
if (Connection !== undefined) {
    Connection.disconnect();
    Connection.destroy();
}
cyan barn
#

It isn’t. If anything prism-media is doing it

desert gorge
cyan barn
#

Call destroy on the AudioResource when you don’t use it anymore/it ended

desert gorge
#

How do I get the player at the following location:

#
 leaveAndStop(client, voiceChannel) {
        try {
            const Connection = getVoiceConnection(voiceChannel.guild.id);
            if (Connection !== undefined) {
                Connection.disconnect();
                Connection.destroy();
            }
        } catch (error) {
            ErrorHandler.setDiscordContext("Error in SupportAudioManager > leaveAndStop()")
            ErrorHandler.handleThrowable(error)
        }


    }```
cyan barn
#

You try to call disconnect and destroy on undefined there

craggy hawk
#

Hello I am another Dev working on the same project, Mika just copied not all the code. It is Connection !== undefined.

cyan barn
#

How do you manage to copy everything but the ! there?

#

Either way, if the connection exists you can connection.state.subscription?.player.state.resource

#

To get the resource if it‘s still playing

craggy hawk