Errors in Chat.ChatModules.FriendJoinNotifier on production

Since about 6 hours (as far as I can tell), one of the chat modules has been giving this error in production. This is inconvenient because it ends up in our logger that we set up for our game. I have heard that other games also see this error so it is not specific to any game.

Error caused by:
ServerScriptService.ChatServiceRunner

Message:
Chat.ChatModules.FriendJoinNotifier:39: attempt to call a string value

Stack trace:
Chat.ChatModules.FriendJoinNotifier, line 39 - upvalue SendFriendJoinNotification
Chat.ChatModules.FriendJoinNotifier, line 49
6 Likes

We have the same, I have a custom chat system so the default chat isn’t even there but we still got the error. https://gyazo.com/25a883fbc3f81d5bf0e64b6690b11a89

A tip is to include the .png in the url, as that would insert the image aswell, in the text.

1 Like

cc @Nightgaladeld do you happen to know who is responsible for maintaining this code? Over 2/3 of the errors in our game today are of this type.

I think @spotco has a fix for this issue.

1 Like

clone the chat modules folder and remove the friendjoinotifier module to remove this error. this will unfortunately need to be fixed next week.

1 Like

Fair enough, thanks for the quick response

It’s been two weeks since the original post and the module is still spewing out errors at a phenomenal rate. Care to give a status update on the fix?

2 Likes

next release should have the fixed code

3 Likes

Sorry to ask again about this, but I’m wondering if the fix got pushed back or if the next release hasn’t happened yet? I don’t like keeping the chat module stuff overwritten in case any updates are pushed for that (and then we won’t get those).

should be fixed by now. correct if wrong

Doesn’t seem fixed unfortunately, a server that started as recent as 25 minutes ago is still giving these errors

Check the source of your “FriendJoinNotifier” modulescript.
Do lines 12-14 look like this?

local ChatLocalization = nil
pcall(function() ChatLocalization = require(game:GetService("Chat").ClientChatModules.ChatLocalization) end)
if ChatLocalization == nil then ChatLocalization = {} function ChatLocalization:Get(key,default) return default end end

Note the “ChatLocalization:Get” which was something else before (that was the source of the error). It should look like this.

The error is at line 39 right now. If you look very carefully at my screenshot, there should be a comma where my cursor is. What is written there now is that it should call the result of string.gsub with the string “System” as its first argument.

1 Like

It’s been fixed for the next update.

I believe that fixes (for clarification):


	local function SendFriendJoinNotification(player, joinedFriend)
		local speakerObj = ChatService:GetSpeaker(player.Name)
		if speakerObj then
			speakerObj:SendSystemMessage(string.format("Your friend %s has joined the game.", joinedFriend.Name), "System", FriendMessageExtraData)
		end
	end

The version on github is actually pretty old. I did add the missing comma around a week ago though, so it should be fixed soon.

2 Likes

Yeah, the github version contains a comma, but it was made on May 1.

Can the GitHub be updated to reflect the most recent one? It’s confusing to many (including me)

This seems fixed now since half a day or a bit over that, thank you for your time @spotco @TheGamer101

Recent maintenance seems to have brought this issue back.

My custom module which uses the method Player:GetOnlineFriends() is also returning the same error: