mineflayer: I can't log on my server : {"translate":"disconnect.genericReason","with":["Internal Exception: io.netty.handler.codec.DecoderException: The received string length is longer than maximum allowed (23 > 16)"]} false

Versions

  • mineflayer: 9.3.1
  • server: purpur 1.19.2
  • node: 19.4.0

Detailed description of a problem

I can’t log in

What did you try yet?

Logging into a server

Your current code

const mineflayer = require('mineflayer')
const options = {
    host: 'myserverip',
    username: 'email@email.com',
    password: 'mypassword'
}

const bot = mineflayer.createBot(options)

bot.on('kicked', console.log)
bot.on('error', console.log)

Expected behavior

I wanted the bot to log in the server but I got this error : {“translate”:“disconnect.genericReason”,“with”:[“Internal Exception: io.netty.handler.codec.DecoderException: The received string length is longer than maximum allowed (23 > 16)”]} false

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 19 (2 by maintainers)

Most upvoted comments

const mineflayer = require(‘mineflayer’)

const bot = mineflayer.createBot({ host: ‘localhost’, username: ‘afk_bot’, auth: ‘microsoft’, port: ‘25565’, version: false, password: ‘’ })

bot.on(‘chat’, (username, message) => { if (username === bot.username) return bot.chat(message) })

bot.on(‘kicked’, console.log) bot.on(‘error’, console.log)

this is my code