AudioPlayerError: aborted

Hello, after one minute (exactly) of playing a music in a vocal, i got the following error :


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

AudioPlayerError: aborted
    at connResetException (node:internal/errors:704:14)
    at TLSSocket.socketCloseListener (node:_http_client:441:19)
    at TLSSocket.emit (node:events:525:35)
    at node:net:757:14
    at TCP.done (node:_tls_wrap:584:7)
Emitted 'error' event on AudioPlayer instance at:
    at OggDemuxer.onStreamError



my code to launch music :
                let stream = ytdl(maZic, {
                    filter: "audioonly",
                    quality: 'highestaudio',
                    seek: 0
                });
                const player = createAudioPlayer();
                const resource = createAudioResource(stream);

                const connection = joinVoiceChannel({
                    channelId: vc.id,
                    guildId: vc.guild.id,
                    adapterCreator: vc.guild.voiceAdapterCreator,
                })
                player.play(resource);
                connection.subscribe(player);
Was this page helpful?