TextChatService error when a place shuts down | ExpChatServer.mountServerApp:110

This error happens because TextChannel:AddUserAsync returns nil and is later accessed at line 110.

If the user has chat off or isn’t in the server, this returns a tuple nil, false.

        local function v66(v62)
            for _, v64 in ipairs(v24) do
                v16:trace("Adding user {} to TextChannel: {}", tostring(v62.UserId), v64.Name);
                local v65 = v64:AddUserAsync(v62.UserId); -- This can return nil and isn't checked
                if v64.Name == "RBXGeneral" then
                    v65.CanSend = true;
                elseif v64.Name == "RBXSystem" then
                    v65.CanSend = false;
                end;
            end;
        end;

Expected behavior

The TextSource? returned by AddUserAsync should be checked for if it is nil.

3 Likes

Thanks for the report! I filed a ticket in our internal database and we’ll follow up when we have an update for you.

You seemed to have decompiled the script (hopefully not with an executot) but i think the source is available on Roblox-Client-Tracker on github

Decompilers are not cheats and ExpChat/ExpChatServer is not on the client tracker repo.