PrismarineJS / mineflayer

Create Minecraft bots with a powerful, stable, and high level JavaScript API.
https://prismarinejs.github.io/mineflayer/
MIT License
4.96k stars 904 forks source link

Getting an error while doing a basic example. #699

Closed krithikvishwanath closed 6 years ago

krithikvishwanath commented 6 years ago

If you are reporting a bug please report on these points :

const sparkMcClient = new mineflayer.createBot({ host: 'play.sadonmc.com', username: 'myUsername', password: 'mypassword', version: "1.8", });

const sparkClient = new Discord.Client();

sparkMcClient.on('chat', (username, message) => { if (username === sparkMcClient.username) return console.log(message); })

* what `happened`

{ Error: querySrv ENOTFOUND _minecraft._tcp.play.sadonmc.com at errnoException (dns.js:50:10) at QueryReqWrap.onresolve [as oncomplete] (dns.js:238:19) code: 'ENOTFOUND', errno: 'ENOTFOUND', syscall: 'querySrv', hostname: '_minecraft._tcp.play.sadonmc.com' }


* what you expected to happen
Just trying to get the bot started
In particular it will be useful to provide these informations :

* what happens when using a mineflayer example?
I'm using the echo example, just trying to see if I can get this bot to connect.
* what happens when using a node-minecraft-protocol example?
* what mineflayer version?
2.7.3
* what server version?
The server only accepts 1.8 & higher.
* which server? (spigot, paper, vanilla, any particular plugins ?)
* what's the output of DEBUG="minecraft-protocol" node your_bot.js ?
* what's the error msg?
* what script is used?
krithikvishwanath commented 6 years ago
{ Error: querySrv ESERVFAIL _minecraft._tcp.play.hypixel.net
    at errnoException (dns.js:50:10)
    at QueryReqWrap.onresolve [as oncomplete] (dns.js:238:19)
  code: 'ESERVFAIL',
  errno: 'ESERVFAIL',
  syscall: 'querySrv',
  hostname: '_minecraft._tcp.play.hypixel.net' }

Getting this error when I tried it on hypixel.

krithikvishwanath commented 6 years ago

Still not solved, keeps giving the same error.

plexigras commented 6 years ago

you could try setting the port to 25565

rom1504 commented 6 years ago

We probably should remove the code trying to use that _tcp thing. Not sure what it even tries to do.

roblabla commented 6 years ago

It's for SRV DNS records support. Minecraft does it too, we shouldn't remove it.

krithikvishwanath commented 6 years ago

So other then setting the port to 25565, which is should do by default, what should I do?

Adding the port doesn't fix it.

krithikvishwanath commented 6 years ago

I've tried changing the server, seems like none work.

krithikvishwanath commented 6 years ago

Still not solved...

rom1504 commented 6 years ago

Try to make optional what's in tcp.js

krithikvishwanath commented 6 years ago

There is no tcp.js

Really confused on what to do, please help.

rom1504 commented 6 years ago

It's in node-minecraft-protocol

On Fri, Aug 17, 2018, 00:06 SaltySpark notifications@github.com wrote:

There is no tcp.js

Really confused on what to do, please help.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/PrismarineJS/mineflayer/issues/699#issuecomment-413699098, or mute the thread https://github.com/notifications/unsubscribe-auth/ACPN_vztaGoSI1UR8Oe7wHPE_NWtrZmAks5uRezogaJpZM4VxB87 .

rom1504 commented 6 years ago

now fixed, just run npm update