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

versionChecking.js Bug #1290

Closed
obseletecode72 opened this issue Mar 6, 2024 · 3 comments
Closed

versionChecking.js Bug #1290

obseletecode72 opened this issue Mar 6, 2024 · 3 comments

Comments

@obseletecode72
Copy link

[X] The FAQ doesn't contain a resolution to my issue

Versions

  • minecraft-protocol: latest
  • server: paper 1.20.4
  • node: #.#.#

Detailed description of a problem

just tried to join normally in the server and throwed an exception

Expected behavior

join normally in the server

Additional context

´´´
SyntaxError: "[object Object]" is not valid JSON
at JSON.parse ()
at Client. (C:\Users\Administrator\Desktop\mine\node_modules\minecraft-protocol\src\client\versionChecking.js:6:21)
at Client.emit (node:events:526:35)
at emitPacket (C:\Users\Administrator\Desktop\mine\node_modules\minecraft-protocol\src\client.js:83:12)
at FullPacketParser. (C:\Users\Administrator\Desktop\mine\node_modules\minecraft-protocol\src\client.js:112:9)
at FullPacketParser.emit (node:events:514:28)
at addChunk (C:\Users\Administrator\Desktop\mine\node_modules\protodef\node_modules\readable-stream\lib_stream_readable.js:279:12)
at readableAddChunk (C:\Users\Administrator\Desktop\mine\node_modules\protodef\node_modules\readable-stream\lib_stream_readable.js:262:11)
at Readable.push (C:\Users\Administrator\Desktop\mine\node_modules\protodef\node_modules\readable-stream\lib_stream_readable.js:228:10)
at Transform.push (C:\Users\Administrator\Desktop\mine\node_modules\protodef\node_modules\readable-stream\lib_stream_transform.js:132:32)
SyntaxError: "[object Object]" is not valid JSON
at JSON.parse ()
at Client. (C:\Users\Administrator\Desktop\mine\node_modules\minecraft-protocol\src\client\versionChecking.js:6:21)
at Client.emit (node:events:526:35)
at emitPacket (C:\Users\Administrator\Desktop\mine\node_modules\minecraft-protocol\src\client.js:83:12)
at FullPacketParser. (C:\Users\Administrator\Desktop\mine\node_modules\minecraft-protocol\src\client.js:112:9)
at FullPacketParser.emit (node:events:514:28)
at addChunk (C:\Users\Administrator\Desktop\mine\node_modules\protodef\node_modules\readable-stream\lib_stream_readable.js:279:12)
at readableAddChunk (C:\Users\Administrator\Desktop\mine\node_modules\protodef\node_modules\readable-stream\lib_stream_readable.js:262:11)
at Readable.push (C:\Users\Administrator\Desktop\mine\node_modules\protodef\node_modules\readable-stream\lib_stream_readable.js:228:10)
at Transform.push (C:\Users\Administrator\Desktop\mine\node_modules\protodef\node_modules\readable-stream\lib_stream_transform.js:132:32)
´´´

@wgaylord
Copy link
Contributor

wgaylord commented Mar 6, 2024

This is due to the disconect handler not being updated to handle 1.20.3+ NBT based disconnects in the Configuration and Play States.

@extremeheat
Copy link
Member

Right, the underlying reason for this error is the server is kicking you (for one reason or another). It could be due to a version mismatch or something else.

Not sure what exactly the purpose of parsing the disconnect message really is beyond a formatted message, so we might be able to skip the parsing completely.

@wgaylord
Copy link
Contributor

wgaylord commented May 26, 2024

Pretty sure I fixed this in #1291 but forgot to mention it here.

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

No branches or pull requests

3 participants