You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I know that the error Error: aborted is thrown when something is wrong with the ytdl's stream, and I think it's caused by youtube's eventual content update (at least it's what I heard), so I tried to handle this error with ytdl's default event handler, but it wasn't enought.
When the error arises, I try to treat it by just retrying the reproduction of the stream, something like:
importytdlfrom'ytdl-core'// version 4.11.5conststream=ytdl(url,{filter: format=>format.hasAudio&&!format.hasVideo// I realized that some songs could not contain higher quality audio.// Additionally, higher audio quality frequently throws more errors like this.&&(format.audioBitrate===128||format.audioSampleRate==='48000'||format.audioSampleRate==='41800'||true)})stream.on('error',err=>{console.log('[ SoundboardPlayer Error ] SoundboardPlayer got an Stream Error:\n',String(err))// Retry to play the song by creating another stream})
It's ok to get this error, but the real problem here is that, instead of treating the error as it was supposed to do, the event handler still throws the error after logging it to the console. The output:
[ SoundboardPlayerError ] SoundboardPlayer got an Stream Error:
Error: aborted
Error: aborted
at connResetException (node:internal/errors:787:14)
at TLSSocket.socketCloseListener (node:_http_client:455:19)
at TLSSocket.emit (node:events:530:35)
at node:net:337:12
at TCP.done (node:_tls_wrap:657:7)
[ERROR] 20:21:55 Error: aborted
The text was updated successfully, but these errors were encountered:
I know that the error
Error: aborted
is thrown when something is wrong with the ytdl's stream, and I think it's caused by youtube's eventual content update (at least it's what I heard), so I tried to handle this error with ytdl's default event handler, but it wasn't enought.When the error arises, I try to treat it by just retrying the reproduction of the stream, something like:
It's ok to get this error, but the real problem here is that, instead of treating the error as it was supposed to do, the event handler still throws the error after logging it to the console. The output:
The text was updated successfully, but these errors were encountered: