server: include sessionId in the login success packet for 26.2+ - #1529
Open
DallasCarraher wants to merge 1 commit into
Open
DallasCarraher wants to merge 1 commit into
DallasCarraher wants to merge 1 commit into
Conversation
26.2 (protocol 776) added a mandatory sessionId: UUID field to packet_success. Since the server-side login flow built the packet without it, the compiled protodef writer threw "Write error for undefined : Cannot read properties of undefined (reading 'length')" as soon as a 26.2 client logged in against a server built on this library — every consumer that hosts its own server (flying-squid, mineflayer's test harness, etc.), not clients connecting to a real Mojang server (which always supplies it). Included unconditionally rather than gated behind a supportFeature check: protodef only reads the fields a version's schema defines, so this is inert on older versions' packet_success where the field doesn't exist. Found and fixed while getting PrismarineJS/minecraft-data#1298 (26.2 data) working end-to-end. Full suite: 6787 passing, 73 pending, 2 failing — both pre-existing and unrelated (a 1.16.5 server-download timeout, and a 26.1 packet-fuzzer gap for the ItemStackTemplate type that predates this change). Zero failures attributable to 26.2. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This was referenced Sep 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
26.2 (protocol 776) added a mandatory
sessionId: UUIDfield topacket_success. The server-side login flow (src/server/login.js) built that packet without it, so the compiled protodef writer threwWrite error for undefined : Cannot read properties of undefined (reading 'length')as soon as a 26.2 client logged in against a server built on this library. This doesn't affect clients connecting to a real Mojang server (which always supplies it) — only consumers who host their own server on this library (flying-squid, mineflayer's own test harness, etc).Included unconditionally rather than gated behind a
supportFeaturecheck: protodef only reads the fields a version's schema actually defines, so this is inert on older versions'packet_successwhere the field doesn't exist — same pattern already used forproperties: []a few lines up.Found and fixed while getting PrismarineJS/minecraft-data#1298 (26.2 data) working end-to-end against mineflayer.
Related:
testedVersionsbump (PR incoming)Test plan
ItemStackTemplatetype that predates this change). Zero failures attributable to 26.2.standardlint clean