PrismarineJS / PrismarineJS/node-minecraft-protocol
Failed to decode packet cookie_request
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.4k
- Forks
- 290
- Avg merge
- 4d 8h
- Merged PRs (30d)
- 7
Description
[x] The FAQ doesn't contain a resolution to my issue
Versions
- minecraft-protocol: 1.55.0
- server: vanilla/spigot/paper 1.21.4
- node: 22.14.0
Detailed description of a problem
I'm trying to set up a simple offline-mode server that (currently) only spawns the player in a void world. The following code works for other versions (tested for 1.8 with slight adaptations to the login packet, 1.18, 1.19 and 1.20 with the same code, different data versions). Attempting to run the same code with 1.21 results in the connection being lost and the following error being shown:
Internal Exception: io.netty.handler.codec.DecoderException: Failed to decode packet 'clientbound/minecraft:cookie_request'.
Current code
const mc = require("minecraft-protocol")
const mcData = require("minecraft-data")("1.21")
const server = mc.createServer({
host: "127.0.0.1",
port: 25565,
version: "1.21",
"online-mode": false,
})
server.on("login", (client) => {
const p = mcData.loginPacket
console.log(p)
client.write("login", {
...p,
})
client.write("position", {
x: 0,
y: 0,
z: 0,
yaw: 0,
pitch: 0,
})
})
Expected behavior
The client should spawn in an empty world at the coordinates 0/0/0 immediately upon joining the server.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure using the supplied createServer setup and the 1.21 login and position writes. Inspect how the 1.21 protocol handles the clientbound minecraft:cookie_request packet and compare it with the provided login packet data; done means a 1.21 client joins the offline-mode server and spawns at 0/0/0 without the decoder error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100