neko-craft / NekoMaid

A plugin can use Web to manage your MineCraft server.
http://maid.neko-craft.com
GNU Affero General Public License v3.0
200 stars 22 forks source link

[Bug] Random characters are mixed into the terminal output of the web interface #38

Closed libook closed 1 year ago

libook commented 1 year ago

Describe the bug

For example the output:

[INFO] eLiBook left the game

The nickname of the player is LiBook. So the e before the name is unnecessary.

The WebSocket response was (excerpts):

{"level":"INFO","logger":"net.minecraft.server.MinecraftServer","msg":"eLiBook left the game","time":1680827916973}

We can see, there is e before LiBook.

The Unicode code of  is \u007f which is called "Delete". It seems that the page didn't process this character correctly. Maybe it means to delete the later character.

To Reproduce

Steps to reproduce the behavior:

  1. Just open the terminal page, and check the log.

Expected behavior

Don't show useless characters.

Screenshots

截图 2023-04-07 10-52-26

Information

This server is running Paper version git-Paper-445 (MC: 1.19.3) (Implementing API version 1.19.3-R0.1-SNAPSHOT) (Git: 4d7269e)

Additional context

Some logs will have this problem, some will not.

ShirasawaSama commented 1 year ago

I think this should be a feature. Because by design, the console should display all content (including invisible characters such as &k)

libook commented 1 year ago

This will seriously affect the readability of the terminal logs. The example I have provided is only the simplest case, in fact some plugins will have this character appearing in log messages in large numbers, and not dealing with it will make the logs completely unreadable.

Personally, I think it may belong to some kind of console protocol, where the console data flow and the final presentation to the user are not exactly the same.

libook commented 1 year ago

Whenever this happens, I have to log in to the server to check the console messages, because that's where the characters can be handled properly.

libook commented 1 year ago

@ShirasawaSama I have created a pull request for fixing that: https://github.com/neko-craft/NekoMaid/pull/39

libook commented 1 year ago

Wow, so fast.

libook commented 1 year ago

I use the online pages you provide, so I wait for when a new version can be released.