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

Fix serialization issue in old version for mc server test #1337

Open
rom1504 opened this issue Oct 12, 2024 · 6 comments
Open

Fix serialization issue in old version for mc server test #1337

rom1504 opened this issue Oct 12, 2024 · 6 comments
Labels

Comments

@rom1504
Copy link
Member

rom1504 commented Oct 12, 2024

  1. mc-server 1.12.2v
    kicks clients when invalid credentials:
    Uncaught RangeError [ERR_OUT_OF_RANGE]: The value of "offset" is out of range. It must be >= 0 and <= 45. Received -847077210
    at new NodeError (node:internal/errors:405:5)
    at boundsError (node:internal/buffer:88:9)
    at Buffer.readUInt8 (node:internal/buffer:254:5)
    at readVarInt (node_modules/protodef/src/datatypes/utils.js:68:22)
    at Splitter._transform (src/transforms/framing.js:63:30)
    at Transform._write (node_modules/readable-stream/lib/internal/streams/transform.js:153:8)
@rom1504 rom1504 added the bug label Oct 12, 2024
@rom1504 rom1504 pinned this issue Oct 12, 2024
@rom1504
Copy link
Member Author

rom1504 commented Oct 12, 2024

fyi @extremeheat

@rom1504
Copy link
Member Author

rom1504 commented Nov 2, 2024

I think this is likely caused by recent node protodef changes https://github.com/ProtoDef-io/node-protodef/commits/master/

@extremeheat
Copy link
Member

Only change in ProtoDef was how the compiler inlined anonymous containers (treats them as normal containers then merges object into parent), so I don't think it would affect anything big.

Would need to see what packet specifically is causing the error and the dumped buffer to reproduce (the stack trace here is limited to only a few lines it seems)

@rom1504
Copy link
Member Author

rom1504 commented Nov 2, 2024

ProtoDef-io/node-protodef@fcf3ca0 was also recently released

@rom1504
Copy link
Member Author

rom1504 commented Nov 2, 2024

PrismarineJS/mineflayer#3492 mentions packet advancement

@rom1504
Copy link
Member Author

rom1504 commented Nov 3, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants