Skip to content

Mineflayer doesn't send configuration.settings packet at login, causing some servers to disconnect the user #3623

Open
@PseudoResonance

Description

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

Versions

  • mineflayer: 4.27.0
  • server: Hypixel 1.21.5/1.8.9
  • bun: 1.2.7 (also briefly tried node 22)

Detailed description of a problem

Mineflayer cannot join Hypixel on any version greater than 1.20.1 (versions 1.20.2-1.21.4). It disconnects with "socketClosed" after timing out.

What did you try yet?

Did you try any method from the API?
Did you try any example? Any error from those?

Your current code

Minimal repo: https://github.com/PseudoResonance/MineflayerBug/blob/main/src/bot.ts

Expected behavior

Mineflayer should join just like a vanilla 1.20.2-1.21.4 client.

Additional context

Debug Log
Creating bot
  minecraft-protocol [mc] entitlements {} +0ms
  minecraft-protocol [mc] profile {
  id: 'REDACTED',
  name: 'REDACTED',
  skins: [],
  capes: [],
  profileActions: {}
} +2ms
  minecraft-protocol writing packet handshaking.set_protocol +0ms
  minecraft-protocol {
  minecraft-protocol   protocolVersion: 764,
  minecraft-protocol   serverHost: 'mc.hypixel.net',
  minecraft-protocol   serverPort: 25565,
  minecraft-protocol   nextState: 2
  minecraft-protocol } +0ms
  minecraft-protocol writing packet login.login_start +31ms
  minecraft-protocol {
  minecraft-protocol   username: 'REDACTED',
  minecraft-protocol   signature: null,
  minecraft-protocol   playerUUID: 'REDACTED'
  minecraft-protocol } +0ms
  minecraft-protocol read packet login.encryption_begin +59ms
  minecraft-protocol {
  minecraft-protocol   "serverId": "344b3cd9861ae052",
  minecraft-protocol   "publicKey": {
  minecraft-protocol     "type": "Buffer",
  minecraft-protocol     "data": [
  minecraft-protocol       48,
  minecraft-protocol       129,
  minecraft-protocol       159,
  minecraft-protocol       48,
  minecraft-protocol       13,
  minecraft-protocol       ...,
  minecraft-protocol     ]
  minecraft-protocol   },
  minecraft-protocol   "verifyToken": {
  minecraft-protocol     "type": "Buffer",
  minecraft-protocol     "data": [
  minecraft-protocol       17,
  minecraft-protocol       221,
  minecraft-protocol       30,
  minecraft-protocol       197
  minecraft-protocol     ]
  minecraft-protocol   }
  minecraft-protocol } +1ms
  minecraft-protocol writing packet login.encryption_begin +165ms
  minecraft-protocol {
  minecraft-protocol   sharedSecret: <Buffer 44 20 f1 6d 95 cc 95 0f ea 65 77 ea 1c 57 93 d8 58 e9 85 ca fc 2d 51 4d 1a 7f 76 19 0a f3 fc 67 0d e3 9c bc 15 32 64 cc f1 39 08 2f 2a 44 59 72 1d 2c ... 78 more bytes>,
  minecraft-protocol   verifyToken: <Buffer 3e 1b e0 d3 92 c3 a5 f8 cc 63 b0 91 fc 5b bb bc 86 44 4a 75 ed d6 e7 5d f5 31 fe d2 42 e1 e4 4b ce 29 39 c7 2b 24 12 6e f8 3e e5 d4 77 59 a5 97 cf 1f ... 78 more bytes>
  minecraft-protocol } +0ms
  minecraft-protocol read packet login.compress +180ms
  minecraft-protocol {
  minecraft-protocol   "threshold": 256
  minecraft-protocol } +0ms
  minecraft-protocol read packet login.success +2ms
  minecraft-protocol {
  minecraft-protocol   "uuid": "REDACTED",
  minecraft-protocol   "username": "REDACTED",
  minecraft-protocol   "properties": []
  minecraft-protocol } +1ms
  minecraft-protocol writing packet login.login_acknowledged +0ms
  minecraft-protocol {} +0ms
Disconnected with reason socketClosed
error: false

I also saw #3435, but it seemed slightly different.

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