Skip to content

Server redirection error #3764

@haxmcdev

Description

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

Versions

  • mineflayer: 4.33.0
  • server: paper
  • node: 22.19.0

Detailed description of a problem

After changing the version from 1.19.4 to 1.21.4 I started having an error, turns out when the bot is getting transfered via server's proxy there's a internal connection error, I tried everything, even AI but nothing helped me so I'm opening this because I seek help at this point and I think this is mineflayer's issue

What did you try yet?

I tried everything, I've recoded my file multiple times and each time the bot goes through the proxy to lobby it's getting the error.

Your current code

const mineflayer = require('mineflayer')

const bot = mineflayer.createBot({
  host: 'testserver',
  port: 25565,
  username: 'nickname',
  version: '1.21.4',
  keepAlive: true
})

let loggedIn = false

bot.on('message', (msg) => {
  const text = msg.toString()
  console.log('[MESSAGE]', text)

  // Czekamy na komunikat logowania z proxy
  if (!loggedIn && text.includes('Zaloguj się komendą /login <hasło>')) {
    loggedIn = true
    setTimeout(() => {
      bot.chat('/login')
      console.log('[COMMAND] Sent /login')
    }, 1000)
  }
})

bot.on('kicked', (reason) => console.log('[KICKED]', reason.toString()))
bot.on('end', () => console.log('[END] Connection ended'))
bot.on('error', (err) => console.log('[ERROR]', err))
bot.on('chat', (username, message) => console.log('[CHAT]', `<${username}> ${message}`))

Expected behavior

I expect that I either get a fix from someone that I didn't notice is possible or mineflayer actually gets the support because it may just not support proxies on that version

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stage1just created by someone new to the project, we don't know yet if it deserves an implementation / a fpossible bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions