-
-
Notifications
You must be signed in to change notification settings - Fork 241
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
Java client throwing DecoderException on client.end #1087
Comments
Send the client a disconnect packet and then close the connection after instead |
How do I send a disconnect packet (assuming this is a suggested change on my end and not one to the library). Will this apply to all previous versions as well or just 1.19+? Previously the string sent to |
|
Thanks I'll give that a try. Will this apply to all previous versions as well? i.e. I don't have to have separate paths for older versions using |
The disconnect packet is present on all versions supported by nmp to my knowledge |
Great, thanks. Do we want to keep this issue open for the purpose of keeping |
In my mind this is not something NMP should handle. Docs say otherwise, though. Gonna need an opinion from @rom1504 |
Instead of updating client.end, a client.disconnect function can be added instead if it doesn't already exist. This is handled internally already in cases where the client needs to be disconnected (eg invalid auth), so should just be a matter of exposing it. Bedrock-protocol has a similar API function to do this. |
There are 2 different disconnect packets depending on the state of the client. You might be sending the wrong one, try That said, the error here seems completely unrelated. It's triggered by the client handling. You are likely sending invalid data to the client before calling .end. Don't send anything else (not even login) and check that disconnect works. If it works, you need to fix the packets you're sending previously. |
That's not what I mean. This is the server example, and notice it sends a login packet.
I mean remove that and all the code below, and disconnect the client to make sure it works. Also, 1.19.3 and 1.19.2 are not compatible. Some things are broken in the current release, so you can downgrade node-minecraft-protocol to see if it fixes anything, |
I see-- while I am referencing the server example, I'm not sending any packets at all, basically all I'm doing is:
The "Current code" section in the issue contains the only NMP code I'm running, the only interaction I'm having with the client is calling I think you're probably right that its just some things being broken in the current release. This very well may be fixed once those pending PRs are merged in. |
Seems like this is still an issue in the latest release-- is anyone else experiencing this when logging in with v1.19.2+ ? |
I'm also getting a decoder exception, but a different error at the end: #1279 |
[✅ ] 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
Expected behavior
String passed into
client.end(...)
is what appears to the connecting Java client instead of the exceptionAdditional context
The text was updated successfully, but these errors were encountered: