fent / fent/node-ytdl-core

R [Error]: connect EACCES (my Internet IP):443 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1157:16)

Open
#1,077 9 comments 0 reactions 0 assignees View on GitHub
stale
Dominant language
JavaScript
Stars
4.7k
Forks
852
PR merge metrics
No merged PRs in 30d

Description

Include the following if your issue is a bug

- If you're getting a specific error message, include the full stack trace
R [Error]: connect EACCES (my Internet IP):443
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1157:16) {
resource: T {
playStream: OggDemuxer {
_readableState: [ReadableState],
_events: [Object: null prototype],
_eventsCount: 5,
_maxListeners: undefined,
_writableState: [WritableState],
allowHalfOpen: true,
_remainder: null,
_head: null,
_bitstream: null,
[Symbol(kCapture)]: false,
[Symbol(kCallback)]: [Function: bound onwrite]
},
edges: [ [Object], [Object] ],
metadata: null,
volume: undefined,
encoder: undefined,
audioPlayer: B {
_events: [Object: null prototype],
_eventsCount: 2,
_maxListeners: undefined,
_state: [Object],
subscribers: [Array],
behaviors: [Object],
debug: [Function (anonymous)],
[Symbol(kCapture)]: false
},
playbackDuration: 132760,
started: true,
silencePaddingFrames: 5,
silenceRemaining: -1
}
}

- If you're getting unexpected behavior without an error message
- What should happen?
- no error
- What happens instead?
- error occured, might cause terminal closed sometimes
- Include any relevant code around ytdl-core. You don't have to upload your entire program, small snippets are fine.

music_func.js
- `async next_song(client, args) {

if (client.queue.length) {
const next_song_url = client.queue.shift();

const data = await ytdl.getBasicInfo(next_song_url);
let video_sec = data.videoDetails.lengthSeconds % 60;
let video_sec_str = video_sec.toString().padStart(2, '0');
//console.log(data.videoDetails.title);
//console.log(data.videoDetails.lengthSeconds);
//console.log(data.videoDetails.thumbnails[3].url);
//console.log(data);

const output_embed = new MessageEmbed()
.setColor('#7C183D')
.setTitle(data.videoDetails.title)
.setURL(next_song_url)
.setAuthor({ name: 'Nowplaying' })
//.setDescription('Nowplaying')
.setThumbnail(data.videoDetails.thumbnails[3].url)
.addField('Uploader', data.videoDetails.author.name.toString())
.addField('Time', (data.videoDetails.lengthSeconds - video_sec) / 60 + ":" + video_sec_str)
//.setImage('attachment://disgust.png')
.setTimestamp()
//.setFooter('Some footer text here', 'https://i.imgur.com/wSTFkRM.png');
client.last_at_channel.send({ embeds: [output_embed] }).then(msg => {
setTimeout(() => msg.delete(), data.videoDetails.lengthSeconds * 1000)
})
.catch( /*Your Error handling if the Message isn't returned, sent, etc.*/ );;

console.log(next_song_url);
client.audio_stream = ytdl(next_song_url, { filter: 'audioonly', liveBuffer: 5000, highWaterMark: 1024, dlChunkSize: 65536 });
client.audio_resauce = createAudioResource(client.audio_stream, { inputType: StreamType.Arbitrary });
client.audio_player.play(client.audio_resauce);
if (client.isloop === true) {
client.queue.push(next_song_url);
}

client.audio_resauce.playStream.on('error', error => {
console.error('Error:', error.message);
});

} else {
console.log("queue is empty")
}
},`

index.js
- error message is from here I guess
`
//resauce error handle
client.audio_player.on('error', error => {
console.error(error);
});`

full codes here
- https://github.com/DanielBUBU/PD_maid

- If this error happens only on some videos, include a link or links to videos.
- no specific rule to reproduce this, playbackDuration has different values when error occoured
- I brought this to test in different places (workplace, house, VM in another place) got same error with different IP

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.