Help me clearing this error plz

Error running system event handling function for resource essentialmode: citizen
:/scripting/lua/scheduler.lua:41: Failed to execute thread: server/player/login.
lua:147: attempt to call a nil value (local ‘cb’)
stack traceback:
server/player/login.lua:147: in upvalue ‘handler’
citizen:/scripting/lua/scheduler.lua:175: in function <citizen:/scriptin
g/lua/scheduler.lua:174>
stack traceback:
[C]: in function ‘error’
citizen:/scripting/lua/scheduler.lua:41: in field ‘CreateThreadNow’
citizen:/scripting/lua/scheduler.lua:174: in function <citizen:/scriptin
g/lua/scheduler.lua:138>

code responsible of this error :

AddEventHandler(“es:getPlayerFromId”, function(user, cb)
if(Users)then
if(Users[user])then
cb(Users[user])
else
cb(nil)
end
else
cb(nil)
end
end)

. it doesnt seem to affect the gameplay in any reason . it happens when a player dies and respawns.

Whatever is calling AddEventHandler(“es:getPlayerFromId”, function(user, cb) is passing an empty callback (cb).

thks for ur fast reply . this is the only part of code that i suspect would cause that error : can u please tell me if there is smth wrong in there : thks once again

AddEventHandler(“item:reset”, function()
local mysource = source
local player = getPlayerID(mysource)
TriggerEvent(‘es:getPlayerFromId’, mysource, function(user)
local player = user.getIdentifier()
MySQL.Async.execute(“UPDATE user_inventory SET quantity = @qty WHERE user_id = @username”, { [’@username’] = player, [’@qty’] = 0 })
user.setMoney(0)
user.setDirty_Money(0)
TriggerEvent(‘player_state:change’,mysource,50 , 50 , 50)
end)
end)