damianociarla / node-ffmpeg

ffmpeg module for nodejs
MIT License
604 stars 140 forks source link

Unhandled 'error' event #98

Open theredcmdcraft opened 1 year ago

theredcmdcraft commented 1 year ago

In sometimes i got the error below. The Original Link from https://***.mp3 is working. My Problem is not the error self but that the error is not catched. i use this package with discord.js and every time i get this error, the bot is crashing.

node:events:491
      throw er; // Unhandled 'error' event
      ^

Error: spawn /home/container/node_modules/ffmpeg-static/ffmpeg EAGAIN
    at ChildProcess._handle.onexit (node:internal/child_process:283:19)
    at onErrorNT (node:internal/child_process:476:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Emitted 'error' event on ChildProcess instance at:
    at ChildProcess._handle.onexit (node:internal/child_process:289:12)
    at onErrorNT (node:internal/child_process:476: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/open-mika-electronic.mp3',
    '-analyzeduration',
    '0',
    '-loglevel',
    '0',
    '-f',
    's16le',
    '-ar',
    '48000',
    '-ac',
    '2',
    'pipe:1'
  ]
}