Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to join server #3435

Open
1 task
DaanB1 opened this issue Aug 7, 2024 · 5 comments
Open
1 task

Unable to join server #3435

DaanB1 opened this issue Aug 7, 2024 · 5 comments
Labels
possible bug Stage1 just created by someone new to the project, we don't know yet if it deserves an implementation / a f

Comments

@DaanB1
Copy link

DaanB1 commented Aug 7, 2024

  • The FAQ doesn't contain a resolution to my issue

Versions

  • mineflayer: 4.20.1
  • server: details unknown, but probably spigot (the server is IP munchymc.com)
  • node: 20.9.0

Detailed description of a problem

The bot is unable to join the server. However, it does work on other servers. The error occurs on newer minecraft versions such as 1.20.4. Using old versions such as 1.8.9, it is able to join successfully. Using a regular minecraft client, I am able to join the server on version 1.20.4, so the server itself seems to work fine. Here is the error:

C:\Users\daanb\Desktop\FishBot\node_modules\minecraft-protocol\src\transforms\framing.js:67
} else { throw e }
^

TypeError: Cannot read properties of undefined (reading 'overworld')
at handleRespawnPacketData (C:\Users\daanb\Desktop\FishBot\node_modules\mineflayer\lib\plugins\game.js:46:63)
at Client. (C:\Users\daanb\Desktop\FishBot\node_modules\mineflayer\lib\plugins\game.js:80:5)
at Client.emit (node:events:526:35)
at emitPacket (C:\Users\daanb\Desktop\FishBot\node_modules\minecraft-protocol\src\client.js:83:12)
at FullPacketParser. (C:\Users\daanb\Desktop\FishBot\node_modules\minecraft-protocol\src\client.js:112:9)
at FullPacketParser.emit (node:events:514:28)
at addChunk (C:\Users\daanb\Desktop\FishBot\node_modules\protodef\node_modules\readable-stream\lib_stream_readable.js:279:12)
at readableAddChunk (C:\Users\daanb\Desktop\FishBot\node_modules\protodef\node_modules\readable-stream\lib_stream_readable.js:262:11)
at Readable.push (C:\Users\daanb\Desktop\FishBot\node_modules\protodef\node_modules\readable-stream\lib_stream_readable.js:228:10)
at Transform.push (C:\Users\daanb\Desktop\FishBot\node_modules\protodef\node_modules\readable-stream\lib_stream_transform.js:132:32)

Your current code

const mineflayer = require('mineflayer')

const authSettings = {
    username: "redacted",
    host: "munchymc.com",
    port: 25565,
    auth: "microsoft",
    version: "1.20.4"
}

const bot = mineflayer.createBot(authSettings)
bot.once('spawn', () => {
    bot.on('messagestr', (message) => console.log(message))
    bot.on('error', (err) => console.log(err))
})

Additional context

The bot isn't able to join hypixel either. I've also tried authenticating with a different account, and the same issue occurs.

@DaanB1 DaanB1 added possible bug Stage1 just created by someone new to the project, we don't know yet if it deserves an implementation / a f labels Aug 7, 2024
@josealissonbr
Copy link

same error for me

@TinyTank800
Copy link

Testing on local server with 1.21 and via version enabled. A bot using 1.18 can join but 1.19+ gets the error shown above.

@hsiang0117
Copy link

I tried to connect to a 1.21 server with via version enabled and got the same error, but when I set the version parameter in createbot to 1.18 it just worked.

@Madlykeanu
Copy link
Contributor

Madlykeanu commented Sep 29, 2024

same issue for me, though i can join a 1.20.4 local vanilla server fine but connecting to a public server that also uses 1.20.4 dosnt work

@Madlykeanu
Copy link
Contributor

for anyone else having this issue i added a temporary workaround by just encasing the problematic code in a try catch block https://github.com/Madlykeanu/mineflayer

it dosnt fix the main issue of the thing being undefined but atleast it dosnt crash, seems to work fine for me now as a temporary workaround, if you want to use it you'll have to clone the repo and add it to your dependencies in your mineflayer project.

image

then reinstall dependencies with npm install

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
possible bug Stage1 just created by someone new to the project, we don't know yet if it deserves an implementation / a f
Projects
None yet
Development

No branches or pull requests

5 participants