I have been unable to reproduce the issue, but rather have gotten logged errors containing information about this. The error stems from the sent message containing an invalid UTF-8 character, though pasting in different unicode characters has not allowed me to reproduce the error.
The error message is as follows:
Players.[PlayerName].PlayerScripts.ChatScript.ChatMain.ChatBar:192: String contains invalid UTF-8
File “Players.[PlayerName].PlayerScripts.ChatScript.ChatMain.ChatBar” line 192
The error line points to the following line:
if utf8.len(utf8.nfcnormalize(TextBox.Text)) > ChatSettings.MaximumMessageLength then
I was able to reproduce the exact same error through the following code:
utf8.len(utf8.nfcnormalize("\200a"))
Expected Behavior
The chat bar should not error when inputted with invalid UTF-8, and should either silently absorb the error or process it into a valid format.
Actual Behavior
The chat bar errors when invalid UTF-8 is received, and fills up the error console (and thus our logging site) with an error which we cannot fix.
Workaround
Hardcode a check to ignore any errors from the chat bar script.
Issue Area: Engine Issue Type: Other Impact: Moderate Frequency: Sometimes
My game that receives ~8,000 visits a day has this error ~250 times per day. Typically this error happens with the same user multiple times in quick succession (anywhere from 2 to 50 times). Although I’m also uncertain the cause or the impact it may have to any affected users
This error has been around for a while, it happens while typing in chat on a mobile device. Many times when i hit enter to send a message, it just closes the keyboard without sending the message. This also happens while typing in dev console, its very annoying to open my keyboard and hit enter multiple times just to send a message.
An update on this would be awesome! I’m having this problem with a few players in my games, it’s really annoying since we use chat-based command triggers and this error makes them unable to activate the triggers.
We won’t be fixing this since this is an issue for chats using the Legacy Chat System. We recommend migrating to TextChatService. All in-experience chats will need to use TextChatService by April 30th, 2025 as well.