-
-
Notifications
You must be signed in to change notification settings - Fork 986
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
Chunk size is xxx but only xxx was read #3594
Comments
I think it's unlikely we can reproduce from these info. Are you able to
share a full minimal example that reproduces this crash ?
…On Mon, Feb 24, 2025, 16:47 Erdexad ***@***.***> wrote:
- The FAQ
<https://github.com/PrismarineJS/mineflayer/blob/master/docs/FAQ.md>
doesn't contain a resolution to my issue
Versions
- mineflayer: #.#.#
- server: vanilla 1.20.5 - 1.21.4
- node: 22.11.0
Detailed description of a problem
When loading the world, the bot is kicked from the server.
An example is shown in the video at the link: https://youtu.be/VvE6A17yMBA
The video shows that after selecting the mode, the bot is kicked.
In the console before the kick, many messages with the same beginning are
displayed: Chunk size is xxx but only xxx was read.
The reason for the kick is as follows:
{
"type": "compound",
"value": {
"extra": {
"type": "list",
"value": {
"type": "compound",
"value": [
{
"text": {
"type": "string",
"value": "DecoderException : ru.Keksik9000.ClearFilter.exceptions.FastException: No more bytes reading varint @ io.netty.handler.codec.MessageToMessageDecoder:98"
}
}
]
}
},
"text": {
"type": "string",
"value": ""
}
}}
What did you try yet?
I used methods from the API.
bot.on("windowOpen"), bot.on("kicked"), bot.on("end"), bot.activateItem(),
bot.moveSlotItem(sourceSlot, destSlot).
Your current code
Handling kick from server
this.bot.on("kicked", (reason, loggedIn) => {
console.log(`[${this.username}]: Причина:`);
console.log(reason);
console.log(`[${this.username}]: loggedIn:\n${loggedIn}`);
});
this.bot.on("end", (reason) => {
console.log(`[${this.username}]: Аккаунт отключен от сервера по причине:\n${reason}`);
account.list[this.username].connected = false
rendering_window.show(false);
account.selected_account.rendering = false
fast_action_buttons.setConnect(false)
delete bots[this.username]
});
Handling container opening
this.bot.on('windowOpen', (window) => {
rendering_window.container.open(window.type, window.slots)
window.on('updateSlot', () => {
setTimeout(() => {
rendering_window.container.update(window.slots)
}, 50);
});
console.log(`Открыт контейнер:`)
this.opened_window = window;
});
Handling slot movement
moveSlot(sourceSlot, destSlot) {
this.bot.moveSlotItem(sourceSlot, destSlot)
console.log(`[${this.username}]: Поменял местами ${sourceSlot} и ${destSlot}`);
}
Expected behavior
The bot should not leave the server
Additional context
I tried changing the version and the newest version on which everything
works is 1.20.4. On versions from 1.20.5 to 1.21.4 the bot is kicked.
—
Reply to this email directly, view it on GitHub
<#3594>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAR437VUKISJ522WG3TY2E32RM5HXAVCNFSM6AAAAABXYLSOGCVHI2DSMVQWIX3LMV43ASLTON2WKOZSHA3TKNBSGI4TCNA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
[image: Erdexad]*Erdexad* created an issue (PrismarineJS/mineflayer#3594)
<#3594>
- The FAQ
<https://github.com/PrismarineJS/mineflayer/blob/master/docs/FAQ.md>
doesn't contain a resolution to my issue
Versions
- mineflayer: #.#.#
- server: vanilla 1.20.5 - 1.21.4
- node: 22.11.0
Detailed description of a problem
When loading the world, the bot is kicked from the server.
An example is shown in the video at the link: https://youtu.be/VvE6A17yMBA
The video shows that after selecting the mode, the bot is kicked.
In the console before the kick, many messages with the same beginning are
displayed: Chunk size is xxx but only xxx was read.
The reason for the kick is as follows:
{
"type": "compound",
"value": {
"extra": {
"type": "list",
"value": {
"type": "compound",
"value": [
{
"text": {
"type": "string",
"value": "DecoderException : ru.Keksik9000.ClearFilter.exceptions.FastException: No more bytes reading varint @ io.netty.handler.codec.MessageToMessageDecoder:98"
}
}
]
}
},
"text": {
"type": "string",
"value": ""
}
}}
What did you try yet?
I used methods from the API.
bot.on("windowOpen"), bot.on("kicked"), bot.on("end"), bot.activateItem(),
bot.moveSlotItem(sourceSlot, destSlot).
Your current code
Handling kick from server
this.bot.on("kicked", (reason, loggedIn) => {
console.log(`[${this.username}]: Причина:`);
console.log(reason);
console.log(`[${this.username}]: loggedIn:\n${loggedIn}`);
});
this.bot.on("end", (reason) => {
console.log(`[${this.username}]: Аккаунт отключен от сервера по причине:\n${reason}`);
account.list[this.username].connected = false
rendering_window.show(false);
account.selected_account.rendering = false
fast_action_buttons.setConnect(false)
delete bots[this.username]
});
Handling container opening
this.bot.on('windowOpen', (window) => {
rendering_window.container.open(window.type, window.slots)
window.on('updateSlot', () => {
setTimeout(() => {
rendering_window.container.update(window.slots)
}, 50);
});
console.log(`Открыт контейнер:`)
this.opened_window = window;
});
Handling slot movement
moveSlot(sourceSlot, destSlot) {
this.bot.moveSlotItem(sourceSlot, destSlot)
console.log(`[${this.username}]: Поменял местами ${sourceSlot} и ${destSlot}`);
}
Expected behavior
The bot should not leave the server
Additional context
I tried changing the version and the newest version on which everything
works is 1.20.4. On versions from 1.20.5 to 1.21.4 the bot is kicked.
—
Reply to this email directly, view it on GitHub
<#3594>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAR437VUKISJ522WG3TY2E32RM5HXAVCNFSM6AAAAABXYLSOGCVHI2DSMVQWIX3LMV43ASLTON2WKOZSHA3TKNBSGI4TCNA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Here is a minimal example that reproduces the crash: const mineflayer = require('mineflayer');
const bot = mineflayer.createBot({
host: "mc.dexland.org",
port: "25565",
version: "1.21.4",
username: "zherebec352"
})
bot.on('spawn', () => {
setTimeout(() => {
bot.setQuickBarSlot(0);
bot.activateItem();
console.log("Item activated");
}, 500);
});
bot.on('windowOpen', (window) => {
setTimeout(() => {
bot.moveSlotItem(9, 45);
console.log("Slot moved");
}, 500);
});
bot.on("kicked", (reason, loggedIn) => {
console.log("reason:");
console.log(reason);
console.log("loggedIn:");
console.log(loggedIn);
});
bot.on("end", (reason) => {
console.log("I'm finished");
console.log(reason);
}); Before launching, you need to log into the server from a regular Minecraft client and register.:
Or log in:
|
i am having the same issue. Did you find a way to fix it yet? |
No, I haven't found a solution to this problem. The only thing I know is that you can run the bot on an earlier version (for example, on version 1.20.1), where this problem was solved. |
Versions
Detailed description of a problem
When loading the world, the bot is kicked from the server.
In the console before the kick, many messages with the same beginning are displayed: Chunk size is xxx but only xxx was read.
An example is shown in the video at the link: https://youtu.be/VvE6A17yMBA
The video shows that after selecting the mode, the bot is kicked.
The reason for the kick is as follows (received via bot.on("kicked")):
What did you try yet?
I used methods from the API.
bot.on("windowOpen"), bot.on("kicked"), bot.on("end"), bot.activateItem(), bot.moveSlotItem(sourceSlot, destSlot).
Your current code
Handling kick from server
Expected behavior
The bot should not leave the server
The following behavior is expected (version 1.20.1 used): https://youtu.be/u-wS1772FAo
Additional context
I tried changing the version and the newest version on which everything works is 1.20.4. On versions from 1.20.5 to 1.21.4 the bot is kicked.
The text was updated successfully, but these errors were encountered: