{[Solved]}

Does anyone know how i can fix them?

Error running system event handling function for resource esx_addonaccount: citizen:/scripting/lua/scheduler.lua:41: Failed to execute thread: @esx_addonaccount/server/main.lua:71: attempt to index a nil value (local ‘xPlayer’)
stack traceback:
@esx_addonaccount/server/main.lua:71: in upvalue ‘handler’
citizen:/scripting/lua/scheduler.lua:219: in function citizen:/scripting/lua/scheduler.lua:218
stack traceback:
[C]: in function ‘error’
citizen:/scripting/lua/scheduler.lua:41: in field ‘CreateThreadNow’
citizen:/scripting/lua/scheduler.lua:218: in function citizen:/scripting/lua/scheduler.lua:182

Error running system event handling function for resource esx_datastore: citizen:/scripting/lua/scheduler.lua:41: Failed to execute thread: @esx_datastore/server/main.lua:104: attempt to index a nil value (local ‘xPlayer’)
stack traceback:
@esx_datastore/server/main.lua:104: in upvalue ‘handler’
citizen:/scripting/lua/scheduler.lua:219: in function citizen:/scripting/lua/scheduler.lua:218
stack traceback:
[C]: in function ‘error’
citizen:/scripting/lua/scheduler.lua:41: in field ‘CreateThreadNow’
citizen:/scripting/lua/scheduler.lua:218: in function citizen:/scripting/lua/scheduler.lua:182

Error running system event handling function for resource esx_addoninventory: citizen:/scripting/lua/scheduler.lua:41: Failed to execute thread: @esx_addoninventory/server/main.lua:104: attempt to index a nil value (local ‘xPlayer’)
stack traceback:
@esx_addoninventory/server/main.lua:104: in upvalue ‘handler’
citizen:/scripting/lua/scheduler.lua:219: in function citizen:/scripting/lua/scheduler.lua:218
stack traceback:
[C]: in function ‘error’
citizen:/scripting/lua/scheduler.lua:41: in field ‘CreateThreadNow’
citizen:/scripting/lua/scheduler.lua:218: in function citizen:/scripting/lua/scheduler.lua:182

can we see your server. cfg

1 Like

endpoint_add_tcp “0.0.0.0:30120”
endpoint_add_udp “0.0.0.0:30120”

set mysql_connection_string “server=localhost;database=fivem;userid=root”
set es_enableCustomData 1
set sv_licenseKey “”
sv_scriptHookAllowed 0
rcon_password
sv_hostname “KYN ESX SERVER TESTING”
set temp_convar “ESX”

disable announcing? clear out the master by uncommenting this

#sv_master1 “”

want to only allow players authenticated with a third-party provider like Steam?

sv_authMaxVariance 1
sv_authMinTrust 1

add system admins

add_ace group.admin command allow # allow all commands
add_ace group.admin command.quit deny # but don’t allow quit
add_ace resource.essentialmode command.add_ace allow
add_ace resource.essentialmode command.add_principal allow
add_ace resource.els-plus command.add_ace allow
add_principal identifier.steam:XXXXXXXXXXXXX group.admin # add the admin to the group

hide player endpoints in external log output

sv_endpointprivacy true

FIVEM DEFAULT

start mapmanager
start chat
start spawnmanager
start sessionmanager
restart sessionmanager
start fivem
start hardcap
start ■■■■■■■
start scoreboard
start baseevents

MYSQL ASYNC

start mysql-async

ESSENTIAL MODS

start essentialmode
start esplugin_mysql
start es_admin2
start es_extended

ESX REQUIRED MODS

start instance
start cron
start skinchanger
start esx_skin
start esx_menu_default
start esx_menu_list
start esx_menu_dialog
start esx_phone
start esx_addonaccount
start esx_addoninventory
start esx_datastore
start esx_society
start esx_service
start esx_billing

ESX JOBS

start esx_jobs
start esx_joblisting
start esx_taxijob
start esx_mecanojob
start esx_policejob
start esx_property
start esx_realestateagentjob
start esx_bankerjob
start esx_ambulancejob
start esx_vehicleshop

ESX ANY OTHER MODS

start esx_status
start esx_basicneeds
start esx_clotheshop
start esx_garage
start esx_holdup
start esx_drugs
start esx_atm

Got the same Problem…

Got the same problem, its appear when i did a version update from esx_addonaccount

I have the same problem, I’m trying to find a solution since yesterday, and All I can find is closed posts everywhere, no one will redirect with a link to where we need to discuss this.

Connecting: lord0o
Sending heartbeat to live-internal.fivem.net:30110
Sending player (1) ELS data
Error running system event handling function for resource esx_addonaccount: citizen:/scripting/lua/scheduler.lua:41: Failed to execute thread: @esx_addonaccount/server/main.lua:71: attempt to index a nil value (local 'xPlayer')
stack traceback:
        @esx_addonaccount/server/main.lua:71: in upvalue 'handler'
        citizen:/scripting/lua/scheduler.lua:219: in function <citizen:/scripting/lua/scheduler.lua:218>
stack traceback:
        [C]: in function 'error'
        citizen:/scripting/lua/scheduler.lua:41: in field 'CreateThreadNow'
        citizen:/scripting/lua/scheduler.lua:218: in function <citizen:/scripting/lua/scheduler.lua:182>
Error running system event handling function for resource esx_datastore: citizen:/scripting/lua/scheduler.lua:41: Failed to execute thread: @esx_datastore/server/main.lua:88: attempt to index a nil value (local 'xPlayer')
stack traceback:
        @esx_datastore/server/main.lua:88: in upvalue 'handler'
        citizen:/scripting/lua/scheduler.lua:219: in function <citizen:/scripting/lua/scheduler.lua:218>
stack traceback:
        [C]: in function 'error'
        citizen:/scripting/lua/scheduler.lua:41: in field 'CreateThreadNow'
        citizen:/scripting/lua/scheduler.lua:218: in function <citizen:/scripting/lua/scheduler.lua:182>
Error running system event handling function for resource esx_status: citizen:/scripting/lua/scheduler.lua:41: Failed to execute thread: @esx_status/server/main.lua:29: attempt to index a nil value (local 'xPlayer')
stack traceback:
        @esx_status/server/main.lua:29: in upvalue 'handler'
        citizen:/scripting/lua/scheduler.lua:219: in function <citizen:/scripting/lua/scheduler.lua:218>
stack traceback:
        [C]: in function 'error'
        citizen:/scripting/lua/scheduler.lua:41: in field 'CreateThreadNow'
        citizen:/scripting/lua/scheduler.lua:218: in function <citizen:/scripting/lua/scheduler.lua:182>

This is my config.lua

endpoint_add_tcp "0.0.0.0:30120"
endpoint_add_udp "0.0.0.0:30120"

set mysql_connection_string "server=127.0.0.1;database=essentialmode;userid=root;password="
set es_enableCustomData 1
set sv_licenseKey "eri2g5yh3cj04a19f61bfitxnd36f7il"
sv_scriptHookAllowed 0
rcon_password tuvieja123
sv_hostname "ESX PUBLIC SERVER"
set temp_convar "ESX"

# disable announcing? clear out the master by uncommenting this
#sv_master1 ""

# want to only allow players authenticated with a third-party provider like Steam?
sv_authMaxVariance 1
sv_authMinTrust 1

# add system admins
add_ace group.admin command allow # allow all commands
add_ace group.admin command.quit deny # but don't allow quit
add_ace resource.essentialmode command.sets allow
add_ace resource.essentialmode command.add_ace allow
add_ace resource.essentialmode command.add_principal allow
add_principal identifier.steam:XXXXXXXXXXXXX group.admin # add the admin to the group

# hide player endpoints in external log output
sv_endpointprivacy true

#### FIVEM DEFAULT ####
    start NativeUI
	start mapmanager
    start chat
    start spawnmanager
    start sessionmanager
    restart sessionmanager
    start fivem
    start hardcap
    start ■■■■■■■
    start es_extended
    #start scoreboard
	#start Stadus_Scoreboard
    start es_ui
	start fxmigrant
	start PDX-loadscreen
	start bob74_ipl
	start CarCommand
	start spawn
	start spawnzone
	
#### MYSQL ASYNC
    start async
	start mysql-async


#### ESSENTIAL MODS
    start esplugin_mysql
    start essentialmode
    start es_admin2
	start CustomScripts
    start esx_society
	start esx_rpchat
	start chat-theme-civlifechat
	start PvP
	start esx_boilerplate
	
	
#### MAPAS
#minimapa textura colorida
    start map
#plaza
    start plazafinal
	start variosmap

#### AUTOS ADDON
    start AMGGTR
	

#### ESX REQUIRED MODS
    start esx_accessories
    start JoinTransition
	start EasyAdmin
	start pNotify
    #start banking
    #start es_rp
    start sesx
    start instance
    start cron
	start vMenu
	
	### INVENTORY HUD + TRUNK
	start esx_inventoryhud
	start esx_inventoryhud_trunk
	
	#start esx_lscustomsV2
	start esx_lscustom
    start esx_skin
    start esx_menu_default
    start esx_menu_list
    start esx_menu_dialog
    start esx_phone
    start esx_addonaccount
    start esx_addoninventory
    start esx_datastore
	start baseevents
    start esx_service
    start esx_billing
	start esx_scoreboard
	start esx_weaponshop

#### ESX JOBS
    start esx_jobs
    start esx_joblisting
    start esx_taxijob
    start esx_mechanicjob
    start esx_policejob
    start esx_property
    start esx_realestateagentjob
    start esx_bankerjob
    start esx_ambulancejob
    start esx_vehicleshop
	start esx_shops
	start esx_dmvschool
	start esx_licenseshop

#### ESX ANY OTHER MODS
    start esx_status
    start esx_basicneeds
    start esx_clotheshop
    start esx_garage
	#start esx_drp_garage
	#start esx_advancedgarage
    start esx_holdup
    start esx_drugs
    start esx_atm
	start RealisticVehicleFailure
	#start removeAIcops
	start SeatbeltIndicator
	start simeonfix
	start smoke
	start zone
	
	###NUEVOS PARA PROBAR
	start esx-checkdeathcause
	start esx_animations
    start cardealership
	start mgtablet
	start Storerobbery
	start carhud
    start skinchanger
	start TimeAndDateDisplay
	start watermark
	start frfuel
	
	##SIRENAS
	start ELS-FiveM
	
	##que es?
	#start ASSandACL
	

#### ANY NON ESX MODS
    #start nonESXmod

(sorry for the mess, but it works fine, i get into the server, but when I connect or someone else, i got that error on the console. I’ve tried to reinstall the databases but nothing solved.)

Thank you in advance for the help and the time, I know some people have a lot of work to do besides help us noobs on this task of making a functional server and grow the community. keep up the good works ppls.

same here

Are you guys checking to see if the player fully loaded into the game ? xPlayer is nil means script is being called before the player is loaded in, therefore it’s nil.

1 Like

why? pls

1 Like

I had it too on the default config. Maybe it’s a bug that you need to restart it again dunno

1 Like

Got the same error.
and restart sessionmanager didn’t worked.
Why it even throws an error i don’t know and why there is even no one that even can help out i don’t know eighter. By now there must already been a server that has no errors.

Fixed it by updating es_extended no longer making fivem servers done made 50 in my life

If I was you move away from esx and make a server with vRP2

1 Like

Took me 1 year make a working esx server with no errors then the updates fucked it up

vRP2? can you explane me more of that? why is esx not good anymore? if its better i want to try it

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.