Afternoon all,
Having a few problems with ESX and i cant work out where im going wrong. Every time i launch the server i get these errors:
Uncaught AssertionError [ERR_ASSERTION]: unexpected PromiseRejectEvent
internal/errors.js(102,11): AssertionError
assert.js(42,9): innerFail
assert.js(56,3): fail
internal/process/promises.js(27,25):
@mysql-async/mysql-async.js(5074,9): db.query
@mysql-async/mysql-async.js(280,24): Sequence.end
@mysql-async/mysql-async.js(2122,8): Query.ErrorPacket
@mysql-async/mysql-async.js(5981,23): Protocol._parsePacket
@mysql-async/mysql-async.js(6238,12): write
@mysql-async/mysql-async.js(5741,16): Protocol.write
AssertionError [ERR_ASSERTION]: unexpected PromiseRejectEvent
e[31m[ERROR] [MySQL] [esx_addonaccount] An error happens on MySQL for query āSEL
ECT * FROM addon_accountā: ER_NO_SUCH_TABLE: Table āessentialmode.addon_accountā
doesnāt existe[0m
SCRIPT ERROR: @esx_addonaccount/server/main.lua:9: attempt to get length of a ni
l value (local āresultā)
fn (@mysql-async/lib/MySQL.lua:197)
Now, The database is present etc and the tables are there.
My server.cfg:
set es_enableCustomData 1
set mysql_connection_string āserver=localhost;uid=root;password=******;database=essentialmodeā
endpoint_add_tcp ā0.0.0.0:30120ā
endpoint_add_udp ā0.0.0.0:30120ā
sv_maxclients 10
You probably donāt want to change these!
Only change them if youāre using a server with multiple network interfaces.
These resources will start by default.
#essentials
start mapmanager
start chat
start spawnmanager
start sessionmanager
start fivem
start hardcap
start rconlog
start scoreboard
start playernames
start mysql-async
start essentialmode
start esplugin_mysql
start es_admin2
start es_ui
start es_extended
start essentialmode
start esx_addonaccount
start LegacyFuel-master
start cars
start radio
start loadscreen
start skinchanger
start esx_skin
start esx_clotheshop
start es_admin2
start fxmigrant
start es_ui
start mysql-async
add_ace resource.essentialmode command.add_principal allow
add_ace resource.essentialmode command.add_ace allow
Iām running out of ideas to get this going.
Iāve also tried:
ALTER USER āyourusernameā@ālocalhostā IDENTIFIED WITH mysql_native_password BY āyoupasswordā;
Windows 2012 VPS
Thanks in advance
system
2
Hello, this is a friendly reminder because this is your first time creating a topic (or it has been a while since your last topic) in this category.
Please note that most of the support is provided by the FiveM community on a voluntary basis. We ask you to be patient; there is no guarantee we have a solution to your problem(s). To avoid unnecessary/duplicate topics, please browse the forums before creating a topic.
To improve your chances of your issue(s) being solved, please provide as much information as possible about the issue(s) you are having. Also āwhenever possibleā please use the template given to you when creating a topic.
Thanks for keeping these forums tidy!

set mysql_connection_string "server=localhost;database=essentialmode;userid=root;password=tono;"
try this :v but im wanna ask you got problem in the game? if nothing wrong in the in game try to update a newest mysql-async and talk about your start resource you have 2 start mysql-async
Thanks for your reply Ben!
[32m[mysql-async]e[0m Database server connection established.
Its now connected but now getting:
Sending heartbeat to live-internal.fivem.net:30110
SCRIPT ERROR: @es_extended/server/main.lua:205: attempt to index a nil value (gl
obal āAsyncā)
ref (@es_extended/server/main.lua:205)
handler (@essentialmode/server/player/login.lua:132)
handler (@es_extended/server/main.lua:14)
ref (@essentialmode/server/player/login.lua:19)
ref (@esplugin_mysql/server.lua:18)
setImmediate (@mysql-async/mysql-async.js:14431)
Iāll try update the async and let you know!
set your mysql-async in the top before the resource base
Hi Ben,
Gone back to how it was before 
can i look your server cfg?
Sure,
set es_enableCustomData 1
set mysql_connection_string āserver=localhost;database=essentialmode;userid=root;password=******;ā
endpoint_add_tcp ā0.0.0.0:30120ā
endpoint_add_udp ā0.0.0.0:30120ā
sv_maxclients 10
You probably donāt want to change these!
Only change them if youāre using a server with multiple network interfaces.
These resources will start by default.
#essentials
start mapmanager
start chat
start spawnmanager
start sessionmanager
start fivem
start hardcap
start rconlog
start scoreboard
start playernames
start mysql-async
start esplugin_mysql
start essentialmode
start es_admin2
start es_ui
start es_extended
start essentialmode
start esx_addonaccount
start LegacyFuel-master
start cars
start radio
start loadscreen
start skinchanger
start esx_skin
start esx_clotheshop
start es_admin2
start fxmigrant
start es_ui
start mysql-async
add_ace resource.essentialmode command.add_principal allow
add_ace resource.essentialmode command.add_ace allow
This allows players to use scripthook based plugins such as lambda menu.
Set this to 0 to disallow scripthook.
sv_scriptHookAllowed 1
Uncomment this to enable RCON. Make sure to change the password.
rcon_password
A comma-separated list of tags for your server.
For example:
- sets tags ādrifting, cars, racingā
Or:
- sets tags āroleplay,cop, tanksā
sets tags ādefaultā
Set an optional server info and connecting banner image url.
Size doesnāt matter, any banner sized image will be fine.
#sets banner_detail āhttp://url.to/image.pngā
#sets banner_connecting āā
Set your serverās hostname
sv_hostname āSimulator Radio FiveM serverā
Nested configs!
#exec server_internal.cfg
Loading a server icon (96x96 PNG file)
load_server_icon zap96x96.png
convars which can be used in scripts
set temp_convar āhey world!ā
Uncomment this line if you do not want your server to be listed in the server browser.
#sv_master1 āā
Want to only allow players authenticated with a third-party provider like Steam?
Donāt forget Social Club is a third party provider too!
#sv_authMaxVariance 1
#sv_authMinTrust 5
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_principal identifier.steam:110000112345678 group.admin # add the admin to the group
Hide player endpoints in external log output.
sv_endpointprivacy true
Server player slot limit (must be between 1 and 32, unless using OneSync)
sv_maxclients 32
sv_licenseKey
try this edit the connection MYSQL-async to your db user and password
endpoint_add_tcp ā0.0.0.0:30120ā
endpoint_add_udp ā0.0.0.0:30120ā
start mapmanager
start chat
start spawnmanager
start sessionmanager
start fivem
start hardcap
start ā ā ā ā ā ā ā
start scoreboard
# Set connection MYSQL-async
set mysql_connection_string "server=localhost;database=essentialmode;userid=root;"
# Sql
start mysql-async
#----------- Essential
start playernames
start essentialmode
start esplugin_mysql
start es_admin2
start es_ui
start es_extended
start essentialmode
start esx_addonaccount
start LegacyFuel-master
start cars
start radio
start loadscreen
start skinchanger
start esx_skin
start esx_clotheshop
start es_admin2
start fxmigrant
Error again:
Error: (node:2552) UnhandledPromiseRejectionWarning: Unhandled promise rej
. This error originated either by throwing inside of an async function wit
catch block, or by rejecting a promise which was not handled with .catch(
jection id: 1)
Error: (node:2552) [DEP0018] DeprecationWarning: Unhandled promise rejecti
e deprecated. In the future, promise rejections that are not handled will
ate the Node.js process with a non-zero exit code.
fff
cccc ff xx xx rr rr eee
cc ffff xx rrr r ee e
cc ff xx ⦠rr eeeee
ccccc ff xx xx ⦠rr eeeee
Starting to think its a DB issue?
I made a little neat , if this cant umhhh :v
endpoint_add_tcp ā0.0.0.0:30120ā
endpoint_add_udp ā0.0.0.0:30120ā
start mapmanager
start chat
start spawnmanager
start sessionmanager
start fivem
start hardcap
start ā ā ā ā ā ā ā
start scoreboard
# Set connection MYSQL-async
set mysql_connection_string "server=localhost;database=essentialmode;userid=root;"
# Sql
start mysql-async
start mapmanager
start chat
start spawnmanager
start sessionmanager
start fivem
start hardcap
start ā ā ā ā ā ā ā
start scoreboard
start playernames
# Set connection MYSQL-async
set mysql_connection_string "server=localhost;database=essentialmode;userid=root;"
# Sql
start mysql-async
#----------- Essential
start essentialmode
start es_extended
start es_admin2
start esplugin_mysql
start es_admin2
start es_ui
#Resource
start esx_addonaccount
start LegacyFuel-master
start cars
start radio
start loadscreen
start skinchanger
start esx_skin
start esx_clotheshop
start fxmigrant
start es_ui
thats from the sql , sorry just that i can do 
1 Like
Still didnt work! Thanks for trying though Ben, appreciate your time!
1 Like
system
Closed
13
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.