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

PartialReadError (block?) 1.20.5+ #3526

Open
1 task done
seniorprogphp opened this issue Dec 13, 2024 · 1 comment
Open
1 task done

PartialReadError (block?) 1.20.5+ #3526

seniorprogphp opened this issue Dec 13, 2024 · 1 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

Comments

@seniorprogphp
Copy link

seniorprogphp commented Dec 13, 2024

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

Versions

  • mineflayer: 4.23,0 (Latest)
  • server: purpur
  • node: 22.12.0

Detailed description of a problem

The bot comes into the server and catches a lot of errors. Sometimes this happens on a vanilla server. On version 1.20.4 and below the error doesn't appear, but with 1.20.5+ it is already there. Not a pro, but you can tell from the log that the error is with block properties, maybe it's a crooked bump version on 1.20.5 done poorly.

Your current code

import mineflayer from 'mineflayer';
import * as readline from 'readline';

const rl = readline.createInterface({
  input: process.stdin,
  output: process.stdout
});


const bot = mineflayer.createBot({
  username: 'mineflayer',
  host: 'localhost',
  port: 25565,
  version: '1.20.5'
});

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

rl.on('line', (line) => {
  readline.moveCursor(process.stdout, 0, -1);
  readline.clearScreenDown(process.stdout);
  bot.chat(line.toString());
  rl.prompt();
});

bot.on('message', (message) => {
  readline.moveCursor(process.stdout, -2, 0);
  console.log(message.toAnsi());
  rl.prompt();
});

Log

Version: in this log - 1.20.5 (1.20.6, 1.21, etc.)
- Bot stays on Purpur (Velocity) Lobby
- bot.chat('/connect')
[] Connecting...
[] You connected to the server
> PartialReadError: Read error for undefined : Missing characters in string, found size is 592 expected size was 653
    at new ExtendableError (C:\Users\Professional\Desktop\mmmmm\node_modules\protodef\src\utils.js:63:13)
    at new PartialReadError (C:\Users\Professional\Desktop\mmmmm\node_modules\protodef\src\utils.js:70:5)
    at Object.string (eval at compile (C:\Users\Professional\Desktop\mmmmm\node_modules\protodef\src\compiler.js:262:12), <anonymous>:100:15)
    at eval (eval at compile (C:\Users\Professional\Desktop\mmmmm\node_modules\protodef\src\compiler.js:262:12), <anonymous>:834:47)
    at Object.BlockProperty (eval at compile (C:\Users\Professional\Desktop\mmmmm\node_modules\protodef\src\compiler.js:262:12), <anonymous>:838:9)
    at eval (eval at compile (C:\Users\Professional\Desktop\mmmmm\node_modules\protodef\src\compiler.js:262:12), <anonymous>:870:45)
    at eval (eval at compile (C:\Users\Professional\Desktop\mmmmm\node_modules\protodef\src\compiler.js:262:12), <anonymous>:875:11)
    at Object.BlockPredicate (eval at compile (C:\Users\Professional\Desktop\mmmmm\node_modules\protodef\src\compiler.js:262:12), <anonymous>:879:9)
    at eval (eval at compile (C:\Users\Professional\Desktop\mmmmm\node_modules\protodef\src\compiler.js:262:12), <anonymous>:181:50)
    at eval (eval at compile (C:\Users\Professional\Desktop\mmmmm\node_modules\protodef\src\compiler.js:262:12), <anonymous>:186:15)
PartialReadError: Read error for undefined : Missing characters in string, found size is 85 expected size was 135
    at new ExtendableError (C:\Users\Professional\Desktop\mmmmm\node_modules\protodef\src\utils.js:63:13)
    at new PartialReadError (C:\Users\Professional\Desktop\mmmmm\node_modules\protodef\src\utils.js:70:5)
    at Object.string (eval at compile (C:\Users\Professional\Desktop\mmmmm\node_modules\protodef\src\compiler.js:262:12), <anonymous>:100:15)
    at Object.BlockProperty (eval at compile (C:\Users\Professional\Desktop\mmmmm\node_modules\protodef\src\compiler.js:262:12), <anonymous>:813:57)
    at eval (eval at compile (C:\Users\Professional\Desktop\mmmmm\node_modules\protodef\src\compiler.js:262:12), <anonymous>:870:45)
    at eval (eval at compile (C:\Users\Professional\Desktop\mmmmm\node_modules\protodef\src\compiler.js:262:12), <anonymous>:875:11)
    at Object.BlockPredicate (eval at compile (C:\Users\Professional\Desktop\mmmmm\node_modules\protodef\src\compiler.js:262:12), <anonymous>:879:9)
    at eval (eval at compile (C:\Users\Professional\Desktop\mmmmm\node_modules\protodef\src\compiler.js:262:12), <anonymous>:181:50)
    at eval (eval at compile (C:\Users\Professional\Desktop\mmmmm\node_modules\protodef\src\compiler.js:262:12), <anonymous>:186:15)
    at eval (eval at compile (C:\Users\Professional\Desktop\mmmmm\node_modules\protodef\src\compiler.js:262:12), <anonymous>:189:13)
PartialReadError: Read error for undefined : Missing characters in string, found size is 629 expected size was 273992461
    at new ExtendableError (C:\Users\Professional\Desktop\mmmmm\node_modules\protodef\src\utils.js:63:13)
    at new PartialReadError (C:\Users\Professional\Desktop\mmmmm\node_modules\protodef\src\utils.js:70:5)
    at Object.string (eval at compile (C:\Users\Professional\Desktop\mmmmm\node_modules\protodef\src\compiler.js:262:12), <anonymous>:100:15)
    at eval (eval at compile (C:\Users\Professional\Desktop\mmmmm\node_modules\protodef\src\compiler.js:262:12), <anonymous>:834:47)
    at Object.BlockProperty (eval at compile (C:\Users\Professional\Desktop\mmmmm\node_modules\protodef\src\compiler.js:262:12), <anonymous>:838:9)
    at eval (eval at compile (C:\Users\Professional\Desktop\mmmmm\node_modules\protodef\src\compiler.js:262:12), <anonymous>:870:45)
    at eval (eval at compile (C:\Users\Professional\Desktop\mmmmm\node_modules\protodef\src\compiler.js:262:12), <anonymous>:875:11)
    at Object.BlockPredicate (eval at compile (C:\Users\Professional\Desktop\mmmmm\node_modules\protodef\src\compiler.js:262:12), <anonymous>:879:9)
    at eval (eval at compile (C:\Users\Professional\Desktop\mmmmm\node_modules\protodef\src\compiler.js:262:12), <anonymous>:181:50)
    at eval (eval at compile (C:\Users\Professional\Desktop\mmmmm\node_modules\protodef\src\compiler.js:262:12), <anonymous>:186:15)
PartialReadError: Read error for undefined : undefined
    at new ExtendableError (C:\Users\Professional\Desktop\mmmmm\node_modules\protodef\src\utils.js:63:13)
    at new PartialReadError (C:\Users\Professional\Desktop\mmmmm\node_modules\protodef\src\utils.js:70:5)
    at Object.reader [as i8] (C:\Users\Professional\Desktop\mmmmm\node_modules\protodef\src\datatypes\numeric.js:89:48)
    at Object.Slot (eval at compile (C:\Users\Professional\Desktop\mmmmm\node_modules\protodef\src\compiler.js:262:12), <anonymous>:680:63)
    at eval (eval at compile (C:\Users\Professional\Desktop\mmmmm\node_modules\protodef\src\compiler.js:262:12), <anonymous>:625:40)
    at eval (eval at compile (C:\Users\Professional\Desktop\mmmmm\node_modules\protodef\src\compiler.js:262:12), <anonymous>:630:15)
    at eval (eval at compile (C:\Users\Professional\Desktop\mmmmm\node_modules\protodef\src\compiler.js:262:12), <anonymous>:632:13)
    at Object.SlotComponent (eval at compile (C:\Users\Professional\Desktop\mmmmm\node_modules\protodef\src\compiler.js:262:12), <anonymous>:676:9)
    at eval (eval at compile (C:\Users\Professional\Desktop\mmmmm\node_modules\protodef\src\compiler.js:262:12), <anonymous>:695:49)
    at eval (eval at compile (C:\Users\Professional\Desktop\mmmmm\node_modules\protodef\src\compiler.js:262:12), <anonymous>:700:15)
@seniorprogphp seniorprogphp 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 Dec 13, 2024
@extremeheat
Copy link
Member

Likely PrismarineJS/node-minecraft-protocol#1348

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

2 participants