PrismarineJS / PrismarineJS/node-minecraft-protocol
Java client throwing DecoderException on client.end
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.41.0
server: vanilla
node: 18.4.0
Detailed description of a problem
When calling client.end(...) on a connecting 1.19.2 client the connection is lost with the following message: Internal Exception: io.netty.handler.codec.DecoderException: aa: Non [a-z0-9_.-] character in namespace of location: {"text":"no server with subdomain localhost found"}

"no server with subdomain localhost found" is the message I intended to respond to the connecting client.
Current code
const address = await getLocalAddress();
const mcServer = mc.createServer({
'online-mode': false,
host: address,
port: MC_SERVER_PORT,
keepAlive: true,
});
mcServer.on('error', (e) => {
this.logger.error('Error occurred while listening for logins', e);
});
mcServer.on(
'login',
async (client: ServerClient) => {
// lines removed for brevity
client.end("no server with subdomain localhost found");
}
);
mcServer.on('listening', () => {
this.logger.info(
`Listening for login attempts on ${address}:${MC_SERVER_PORT}`,
);
resolve();
});
Expected behavior
String passed into client.end(...) is what appears to the connecting Java client instead of the exception
Additional context
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 by reproducing the issue with the shown mc.createServer login handler and client.end(...) call on a 1.19.2 connection. Trace the client.end entry point through packet encoding to identify where the supplied message is handled, then verify that the Java client receives the intended text without a DecoderException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- backend, networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100