Script Error: 862 extra bytes

Hello,

For a few days my server has been showing me a console error that I can’t fix and yet I have been looking everywhere but no help corresponds to my problem.

This is the error i have in my console:

SCRIPT ERROR: citizen:/scripting/lua/MessagePack.lua:862: extra bytes
> TriggerServerCallback (@es_extended/server/functions.lua:33)
> handler (@es_extended/server/common.lua:88)

This error occurs when a player connects to the server, he does not load and is directly in NPC.
With some research, here is what emerges from the error codes

SCRIPT ERROR: citizen:/scripting/lua/MessagePack.lua:862: extra bytes

function m.unpack (s)
    checktype('unpack', 1, s, 'string')
    local cursor = cursor_string(s)
    local data = unpackers['any'](cursor)
    if cursor.i < cursor.j then
        error "extra bytes"
    end
    return data
end

TriggerServerCallback (@es_extended/server/functions.lua:33)

ESX.TriggerServerCallback = function(name, requestId, source, cb, ...)
    if ESX.ServerCallbacks[name] ~= nil then
       ESX.ServerCallbacks[name](source, cb, ...)
    else
        print('es_extended: TriggerServerCallback => [' .. name .. '] does not exist')
    end
end

handler (@es_extended/server/common.lua:88)

RegisterServerEvent('esx:triggerServerCallback')
AddEventHandler('esx:triggerServerCallback', function(name, requestId, ...)
	local playerId = source

	ESX.TriggerServerCallback(name, requestID, playerId, function(...)
		TriggerClientEvent('esx:serverCallback', playerId, requestId, ...)
	end, ...)
end)

Video #1: https://streamable.com/hqg90
Video #2: https://streamable.com/lm1xx

This error appears randomly, sometimes after 3 or 4 players on the server, it is not always the same player who spawns in NPC and for me, it is certainly linked to a job but I can’t find anything.

If necessary, I can upload my jobs.sql / job_grades.sql and users.sql table.

If someone can help me, it would be very nice!

Thank you in advance.
Twikii

BUMP

Hello, i have new information, this is my main error i think:

SCRIPT ERROR: citizen:/scripting/lua/MessagePack.lua:862: extra bytes
> cb (@es_extended/server/main.lua:224)
> ref (@es_extended/server/classes/player.lua:241)
>  (@mysql-async/mysql-async.js:14898)

Please, i realy need help…

Maybe try to reinstall es_extended and mysql-async.

i have a very similar problem… instead of saying me extra bytes it says me missing bytes

Not working @DiamondLion

Looking for help please.

Personally, on my server I’ve noticed that when the player joins and is working, if I change their job to either ambulance, miner, or garbage they will break. However changing them to say unemployed will stop the errors and fix them.

I’ve also noticed that giving people certain weapons, so far WEAPON_ASSAULTRIFLE while also break the character.

Follow up; I’ve removed all of the skins from my job_grades database and it got rid of all the errors that I seemed to be having with weapons / skins / jobs.

Hope this works for others

Yes still work but depend, sometimes its break with loadout.

Having the same issue with players datastore, reinstalling the script doesn’t do a thing, and only happens to a certain amount of players ¯_(ツ)_/¯

this is killing my server, get so lagged https://imgur.com/D2Udpm0

Same… and i didnt find any solution…

Also having this same issue. Interestingly, when I stop the esx_status script the errors stop completely. Are you guys also running esx_status and do the errors stop when you stop that script?

For me the problem appaers when player have loadout …

have you found a solution to this problem. i have the exact same problem

No still the same problem

what did u do to the data base prior to this problem starting. i removed 1 weapon from the weapon shop.

lots of servers are having the same issue… a friend of mine have this for some players at login… with latest esx maybe a script that uses a callback on event esx:playerLoaded?

edit: its server have problems on loadout… with certain weapons… people entering server are actually getting all the missing / extra bytes crashing

i have problem too. usualy came from esx:playerLoaded and callbak esx_identity. after this script error, all next player login spawn as npc ped

And you have the solution ?

Any body have find the solution for that ? please…

I also encountered this error