Skip to content

pc/protocol: cookie_response value is optional on 1.21.8 - #1274

Merged
rom1504 merged 1 commit into
PrismarineJS:masterfrom
u9g:fix/1.21.8-cookie-response-optional
Sep 7, 2026
Merged

pc/protocol: cookie_response value is optional on 1.21.8#1274
rom1504 merged 1 commit into
PrismarineJS:masterfrom
u9g:fix/1.21.8-cookie-response-optional

Conversation

@u9g

@u9g u9g commented Sep 6, 2026

Copy link
Copy Markdown
Member

packet_common_cookie_response.value is declared as a plain ByteArray on 1.21.8 only; 1.21.5, 1.21.6, 1.21.9 and later have value?: ByteArray. The 1.21.8 client writes it with writeNullable like every other version (ServerboundCookieResponsePacket.STREAM_CODEC / write), so a client answering a cookie_request with a stored cookie serializes it wrong on 1.21.8 and a server-side reader turns vanilla's null into an empty array. Found while adding cookie replies to node-minecraft-protocol (PrismarineJS/node-minecraft-protocol#1522). proto.yml and protocol.json updated; tools/js tests pass.

ServerboundCookieResponsePacket writes the payload with writeNullable on 1.21.8 as on every
other version; the schema declared it as a plain ByteArray, so a stored cookie could not be
echoed and a null one deserialized as an empty array.
@rom1504
rom1504 merged commit 54e1bed into PrismarineJS:master Sep 7, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants