RakNet/Bedrock ping fails with strange error message on terminal output (not log)
Quick Information
- Operating System: Reported on Windows, confirmed on Linux
- Install Type: Win Package and Git
What Happened?
Issue originally reported by nmthf on Discord
hi! I have a problem with my crafty controller, the java server works correctly, but the bedrock servers have this problem where they emit a log saying: [attached below] can you help me with that? I can connect to them and they work, but this weird error....
Additional notes
- Worlds imported from both Android and iOS
- Only some worlds have this problem
- Clean servers work
- import method is to replace "bedrock level" folder in server and rename in properties file
Expected result
Crafty should not be printing arbitrary errors like this in the console
Steps to reproduce
Origin
Screenshots
Priority/Severity
-
High (anything that impacts the normal user flow or blocks app usage) -
Medium (anything that negatively affects the user experience) -
Low (anything else e.g., typos, missing icons/translations, layout/formatting issues, etc.)
mac's notes
This is the error message the user is tripping on: https://gitlab.com/crafty-controller/crafty-4/-/blob/ea59f0d5eceb86f790e54a826d1e947e970d3f9d/app/classes/minecraft/bedrock_ping.py#L133
This is the only place in the file we do an ASCII decode (what the error references): https://gitlab.com/crafty-controller/crafty-4/-/blob/ea59f0d5eceb86f790e54a826d1e947e970d3f9d/app/classes/minecraft/bedrock_ping.py#L68
What's going on here is that the user has extended ASCII characters in their server MOTD - that's why it only happens to them with some servers. This was confirmed by inspecting their server.properties file.
We should be doing a full UTF-8 decode (or appropriately compatible) for this and add better error handling for better clarity and to remove the log spam from the console (it should be in a file).
MR incoming

