node-minecraft-protocol
node-minecraft-protocol copied to clipboard
server_custom_channel example doesn't work
- [x] The FAQ doesn't contain a resolution to my issue
Versions
- minecraft-protocol: 1.25.0
- server: none
- node: 14.12.0
- minecraft version: 1.16.5
Detailed description of a problem
I tried to run the server_custom_channel example and it crashed when I tried to connect, giving this error:
D:\Documents\dev\fabric\proxy>node main.js
D:\Documents\dev\fabric\proxy\node_modules\minecraft-protocol\src\transforms\framing.js:67
} else { throw e }
^
TypeError: SizeOf error for undefined : value.reduce is not a function
at ProtoDef.sizeOfDumbArr (D:\Documents\dev\fabric\proxy\node_modules\minecraft-protocol\src\client\pluginChannels.js:96:18)
at ProtoDef.sizeOf (D:\Documents\dev\fabric\proxy\node_modules\protodef\src\protodef.js:40:67)
at ProtoDef.sizeOf (D:\Documents\dev\fabric\proxy\node_modules\protodef\src\protodef.js:131:31)
at e.message (D:\Documents\dev\fabric\proxy\node_modules\protodef\src\protodef.js:138:40)
at tryCatch (D:\Documents\dev\fabric\proxy\node_modules\protodef\src\utils.js:50:16)
at ProtoDef.createPacketBuffer (D:\Documents\dev\fabric\proxy\node_modules\protodef\src\protodef.js:138:20)
at Client.writeChannel (D:\Documents\dev\fabric\proxy\node_modules\minecraft-protocol\src\client\pluginChannels.js:68:19)
at Client.registerChannel (D:\Documents\dev\fabric\proxy\node_modules\minecraft-protocol\src\client\pluginChannels.js:26:14)
at Server.<anonymous> (D:\Documents\dev\fabric\proxy\main.js:31:10)
at Server.emit (events.js:314:20)
Current code
https://github.com/PrismarineJS/node-minecraft-protocol/blob/master/examples/server_custom_channel/server_custom_channel.js
Expected behavior
The example should run smoothly :p
I have the same issue
same issue
https://github.com/PrismarineJS/node-minecraft-protocol/blob/61789bbea9cbb8a746d0460c176067ff4076cfbb/src/client/pluginChannels.js#L24 might be related with protodef interpreted / compiled