fent / node-ytdl

Command line youtube video downloader.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

throw er; // Unhandled 'error' event

jimmithe13th opened this issue · comments

Guess everyone know about this error:

     throw er; // Unhandled 'error' event
     ^

R [Error]: aborted
   at connResetException (node:internal/errors:691:14)
   at TLSSocket.socketCloseListener (node:_http_client:407:19)
   at TLSSocket.emit (node:events:402:35)
   at node:net:687:12
   at TCP.done (node:_tls_wrap:580:7)
Emitted 'error' event on B instance at:
   at Encoder.t (/root/DiscordMusicGiveawayBotNew/node_modules/@discordjs/voice/dist/index.js:8:288)
   at Object.onceWrapper (node:events:510:26)
   at Encoder.emit (node:events:402:35)
   at emitErrorNT (node:internal/streams/destroy:157:8)
   at emitErrorCloseNT (node:internal/streams/destroy:122:3)
   at processTicksAndRejections (node:internal/process/task_queues:83:21) {
 resource: <ref *4> T {
   playStream: Encoder {
     _readableState: ReadableState {
       objectMode: true,
       highWaterMark: 16,
       buffer: BufferList {
         head: { data: [Buffer [Uint8Array]], next: [Object] },
         tail: { data: [Buffer [Uint8Array]], next: null },
         length: 31
       },
       length: 31,
       pipes: [],
       flowing: null,
       ended: false,
       endEmitted: false,
       reading: false,
       constructed: true,
       sync: false,
       needReadable: false,
       emittedReadable: false,
       readableListening: false,
       resumeScheduled: false,
       errorEmitted: true,
       emitClose: true,
       autoDestroy: true,
       destroyed: true,
       errored: Error: aborted
           at connResetException (node:internal/errors:691:14)
           at TLSSocket.socketCloseListener (node:_http_client:407:19)
           at TLSSocket.emit (node:events:402:35)
           at node:net:687:12
           at TCP.done (node:_tls_wrap:580:7) {
         code: 'ECONNRESET'
       },
       closed: true,
       closeEmitted: false,
       defaultEncoding: 'utf8',
       awaitDrainWriters: null,
       multiAwaitDrain: false,
       readingMore: false,
       dataEmitted: true,
       decoder: null,
       encoding: null,
       [Symbol(kPaused)]: null
     },
     _events: [Object: null prototype] {
       prefinish: [Function: prefinish],
       close: [ [Function (anonymous)], [Function: onclose] ],
       end: [Function: onend],
       finish: [Function: onfinish],
       error: [Function: onerror]
     },
     _eventsCount: 5,
     _maxListeners: undefined,
     _writableState: WritableState {
       objectMode: false,
       highWaterMark: 16384,
       finalCalled: false,
       needDrain: true,
       ending: false,
       ended: false,
       finished: false,
       destroyed: true,
       decodeStrings: true,
       defaultEncoding: 'utf8',
       length: 65536,
       writing: true,
       corked: 0,
       sync: false,
       bufferProcessing: false,
       onwrite: [Function: bound onwrite],
       writecb: [Function: nop],
       writelen: 65536,
       afterWriteTickInfo: null,
       buffered: [],
       bufferedIndex: 0,
       allBuffers: true,
       allNoop: true,
       pendingcb: 1,
       constructed: true,
       prefinished: false,
       errorEmitted: true,
       emitClose: true,
       autoDestroy: true,
       errored: Error: aborted
           at connResetException (node:internal/errors:691:14)
           at TLSSocket.socketCloseListener (node:_http_client:407:19)
           at TLSSocket.emit (node:events:402:35)
           at node:net:687:12
           at TCP.done (node:_tls_wrap:580:7) {
         code: 'ECONNRESET'
       },
       closed: true,
       closeEmitted: false,
       [Symbol(kOnFinished)]: []
     },
     allowHalfOpen: true,
     encoder: null,
     _options: { rate: 48000, channels: 2, frameSize: 960 },
     _required: 3840,
     _buffer: null,
     [Symbol(kCapture)]: false,
     [Symbol(kCallback)]: [Function: bound onwrite]
   },
   edges: [
     <ref *1> {
       type: 'ffmpeg pcm',
       to: _e { edges: [ [Object], [Object] ], type: 'raw' },
       cost: 2,
       transformer: [Function: transformer],
       from: _e { edges: [ [Circular *1], [Object] ], type: 'arbitrary' }
     },
     <ref *2> {
       type: 'volume transformer',
       to: _e { edges: [ [Object], [Circular *2] ], type: 'raw' },
       cost: 0.5,
       transformer: [Function: transformer],
       from: _e { edges: [ [Object], [Circular *2] ], type: 'raw' }
     },
     <ref *3> {
       type: 'opus encoder',
       to: _e { edges: [ [Object] ], type: 'opus' },
       cost: 1.5,
       transformer: [Function: transformer],
       from: _e { edges: [ [Circular *3], [Object] ], type: 'raw' }
     }
   ],
   metadata: null,
   volume: VolumeTransformer {
     _readableState: ReadableState {
       objectMode: false,
       highWaterMark: 16384,
       buffer: BufferList {
         head: { data: [Buffer [Uint8Array]], next: null },
         tail: { data: [Buffer [Uint8Array]], next: null },
         length: 1
       },
       length: 65536,
       pipes: [],
       flowing: false,
       ended: false,
       endEmitted: false,
       reading: false,
       constructed: true,
       sync: false,
       needReadable: false,
       emittedReadable: false,
       readableListening: false,
       resumeScheduled: false,
       errorEmitted: true,
       emitClose: true,
       autoDestroy: true,
       destroyed: true,
       errored: Error: aborted
           at connResetException (node:internal/errors:691:14)
           at TLSSocket.socketCloseListener (node:_http_client:407:19)
           at TLSSocket.emit (node:events:402:35)
           at node:net:687:12
           at TCP.done (node:_tls_wrap:580:7) {
         code: 'ECONNRESET'
       },
       closed: true,
       closeEmitted: true,
       defaultEncoding: 'utf8',
       awaitDrainWriters: null,
       multiAwaitDrain: false,
       readingMore: false,
       dataEmitted: true,
       decoder: null,
       encoding: null,
       [Symbol(kPaused)]: true
     },
     _events: [Object: null prototype] {
       prefinish: [Function: prefinish],
       close: [ [Function (anonymous)], [Function: onclose] ],
       end: [Function: onend],
       finish: [Function: onfinish],
       error: [Function: onerror]
     },
     _eventsCount: 5,
     _maxListeners: undefined,
     _writableState: WritableState {
       objectMode: false,
       highWaterMark: 16384,
       finalCalled: false,
       needDrain: true,
       ending: false,
       ended: false,
       finished: false,
       destroyed: true,
       decodeStrings: true,
       defaultEncoding: 'utf8',
       length: 65536,
       writing: true,
       corked: 0,
       sync: false,
       bufferProcessing: false,
       onwrite: [Function: bound onwrite],
       writecb: [Function: nop],
       writelen: 65536,
       afterWriteTickInfo: null,
       buffered: [],
       bufferedIndex: 0,
       allBuffers: true,
       allNoop: true,
       pendingcb: 1,
       constructed: true,
       prefinished: false,
       errorEmitted: true,
       emitClose: true,
       autoDestroy: true,
       errored: Error: aborted
           at connResetException (node:internal/errors:691:14)
           at TLSSocket.socketCloseListener (node:_http_client:407:19)
           at TLSSocket.emit (node:events:402:35)
           at node:net:687:12
           at TCP.done (node:_tls_wrap:580:7) {
         code: 'ECONNRESET'
       },
       closed: true,
       closeEmitted: true,
       [Symbol(kOnFinished)]: []
     },
     allowHalfOpen: true,
     _readInt: [Function (anonymous)],
     _writeInt: [Function (anonymous)],
     _bits: 16,
     _bytes: 2,
     _extremum: 32768,
     volume: 1,
     _chunk: null,
     [Symbol(kCapture)]: false,
     [Symbol(kCallback)]: [Function: bound onwrite]
   },
   encoder: Encoder {
     _readableState: ReadableState {
       objectMode: true,
       highWaterMark: 16,
       buffer: BufferList {
         head: { data: [Buffer [Uint8Array]], next: [Object] },
         tail: { data: [Buffer [Uint8Array]], next: null },
         length: 31
       },
       length: 31,
       pipes: [],
       flowing: null,
       ended: false,
       endEmitted: false,
       reading: false,
       constructed: true,
       sync: false,
       needReadable: false,
       emittedReadable: false,
       readableListening: false,
       resumeScheduled: false,
       errorEmitted: true,
       emitClose: true,
       autoDestroy: true,
       destroyed: true,
       errored: Error: aborted
           at connResetException (node:internal/errors:691:14)
           at TLSSocket.socketCloseListener (node:_http_client:407:19)
           at TLSSocket.emit (node:events:402:35)
           at node:net:687:12
           at TCP.done (node:_tls_wrap:580:7) {
         code: 'ECONNRESET'
       },
       closed: true,
       closeEmitted: false,
       defaultEncoding: 'utf8',
       awaitDrainWriters: null,
       multiAwaitDrain: false,
       readingMore: false,
       dataEmitted: true,
       decoder: null,
       encoding: null,
       [Symbol(kPaused)]: null
     },
     _events: [Object: null prototype] {
       prefinish: [Function: prefinish],
       close: [ [Function (anonymous)], [Function: onclose] ],
       end: [Function: onend],
       finish: [Function: onfinish],
       error: [Function: onerror]
     },
     _eventsCount: 5,
     _maxListeners: undefined,
     _writableState: WritableState {
       objectMode: false,
       highWaterMark: 16384,
       finalCalled: false,
       needDrain: true,
       ending: false,
       ended: false,
       finished: false,
       destroyed: true,
       decodeStrings: true,
       defaultEncoding: 'utf8',
       length: 65536,
       writing: true,
       corked: 0,
       sync: false,
       bufferProcessing: false,
       onwrite: [Function: bound onwrite],
       writecb: [Function: nop],
       writelen: 65536,
       afterWriteTickInfo: null,
       buffered: [],
       bufferedIndex: 0,
       allBuffers: true,
       allNoop: true,
       pendingcb: 1,
       constructed: true,
       prefinished: false,
       errorEmitted: true,
       emitClose: true,
       autoDestroy: true,
       errored: Error: aborted
           at connResetException (node:internal/errors:691:14)
           at TLSSocket.socketCloseListener (node:_http_client:407:19)
           at TLSSocket.emit (node:events:402:35)
           at node:net:687:12
           at TCP.done (node:_tls_wrap:580:7) {
         code: 'ECONNRESET'
       },
       closed: true,
       closeEmitted: false,
       [Symbol(kOnFinished)]: []
     },
     allowHalfOpen: true,
     encoder: null,
     _options: { rate: 48000, channels: 2, frameSize: 960 },
     _required: 3840,
     _buffer: null,
     [Symbol(kCapture)]: false,
     [Symbol(kCallback)]: [Function: bound onwrite]
   },
   audioPlayer: <ref *5> B {
     _events: [Object: null prototype] { idle: [AsyncFunction (anonymous)] },
     _eventsCount: 1,
     _maxListeners: undefined,
     _state: {
       status: 'playing',
       missedFrames: 0,
       playbackDuration: 782600,
       resource: [Circular *4],
       onStreamError: [Function: t],
       silencePacketsRemaining: 0
     },
     subscribers: [
       O {
         connection: G {
           _events: [Object: null prototype] {},
           _eventsCount: 0,
           _maxListeners: undefined,
           rejoinAttempts: 0,
           _state: [Object],
           joinConfig: [Object],
           packets: [Object],
           receiver: [j],
           debug: null,
           onNetworkingClose: [Function: bound onNetworkingClose],
           onNetworkingStateChange: [Function: bound onNetworkingStateChange],
           onNetworkingError: [Function: bound onNetworkingError],
           onNetworkingDebug: [Function: bound onNetworkingDebug],
           [Symbol(kCapture)]: false
         },
         player: [Circular *5]
       }
     ],
     behaviors: { noSubscriber: 'pause', maxMissedFrames: 5 },
     debug: [Function (anonymous)],
     [Symbol(kCapture)]: false
   },
   playbackDuration: 782500,
   started: true,
   silencePaddingFrames: 5,
   silenceRemaining: -1
 }
}

Was someone able to fix this somehow?

you can fix it?