PartialReadError and chunk inflation error
- The FAQ doesn't contain a resolution to my issue
Versions
- mineflayer: 4.37.1
- server: Hypixel SkyBlock (ViaVersion proxy translating 1.8.9 -> 1.21.11)
- node: 22.13.1
Detailed description of a problem
When connecting to Hypixel SkyBlock using mineflayer on version 1.21.11 (or 1.21.4), the bot successfully authenticates and spawns into the main lobby. However, upon switching to the SkyBlock server (/play skyblock), minecraft-protocol encounters chunk decompression errors (problem inflating chunk).
Because the chunks fail to decompress properly, the TCP stream desynchronizes. This results in protodef continuously throwing PartialReadError: Read error for undefined as it misinterprets the remaining stream bytes as garbage packets (e.g., firing tile_entity_data or block_action with malformed f32 or NBT data). The connection enters an infinite loop of these read errors, and bot.world never populates, causing bot.blockAt() to always return null.
I am building a bot to scan a player's Garden on SkyBlock to log specific crop mutation blocks. Without chunk loading, bot.blockAt() does not work, and the bot cannot read the layout.
What did you try yet?
- Tested
1.20.4and1.21.1: Hypixel actively kicks the bot on login with "Your version of Minecraft cannot be used to play on Hypixel." - Tested
1.21.4and1.21.11: The bot connects and bypasses the version check, but chunk inflation fails immediately when entering SkyBlock. - Tested disabling physics (
physicsEnabled: false) to see if Mineflayer's collision logic was triggering the crash. The issue persists because it occurs natively within theminecraft-protocolpacket parser before physics even handles the chunks.
Your current code
const mineflayer = require('mineflayer');
const bot = mineflayer.createBot({
host: 'mc.hypixel.net',
version: '1.21.11',
auth: 'microsoft',
username: '(Email)'
});
bot.once('spawn', () => {
// Navigates to SkyBlock after a short delay to trigger the chunk streaming
setTimeout(() => {
bot.chat('/play skyblock');
}, 8000);
});Expected behavior
minecraft-protocol and prismarine-chunk should successfully decompress and parse the 1.21.11 ViaVersion translated chunks sent by Hypixel's proxy, allowing bot.world to populate.
Additional context
Initial Decompression Failure:
problem inflating chunk
uncompressed length 3159
compressed length 466
hex d718789cadd55d4f...Subsequent Stream Desynchronization (Infinite Loop):
PartialReadError: Read error for undefined : undefined
at new ExtendableError (node_modules\protodef\src\\\utils.js:63:13)
at new PartialReadError (node_modules\protodef\src\\\utils.js:70:5)
at Object.reader [as f32] (node_modules\protodef\src\datatypes\numeric.js:89:48)
at eval (eval at compile (node_modules\protodef\src\compiler.js:262:12), <anonymous>:1166:60)
at Object.packet_world_particles (eval at compile (node_modules\protodef\src\compiler.js:262:12), <anonymous>:2600:67)
at CompiledProtodef.read (node_modules\protodef\src\compiler.js:70:12)Dependencies:
minecraft-protocol: 1.66.2prismarine-chunk: 1.40.0
Source: PrismarineJS/mineflayer