PrismarineJS / PrismarineJS/node-minecraft-protocol
server_custom_channel example doesn't work
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.4k
- Forks
- 290
- Avg merge
- 4d 8h
- Merged PRs (30d)
- 7
Description
- 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
Expected behavior
The example should run smoothly :p
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with examples/server_custom_channel/server_custom_channel.js and run it against Minecraft 1.16.5 to reproduce the connection failure. Then inspect src/client/pluginChannels.js at the registerChannel and writeChannel paths, using the reported stack trace as the entry point. Done means the example connects without the SizeOf error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100