Problem with esx_identity / MySql

Hello, there peeps,

While creating my server and having people playtest on it, I ran into an ‘uncommon’ bug where the joining player does not actually register to the server.

the register form of esx_identity does not show up, nor does the skin menu.
When typing /register it does show up, BUT, after filling in everything, it simply does not send to the database.

I transferred the live-server files to my local files, changed the server config so it makes the connection to localhost instead of the server address and it suddenly works perfectly fine.

Maybe someone else has come across this problem before and can inform me how to beat this.

Regards,

Zapp

[EDIT]

Loaded the server on local but database connection to the server address, finally got an error message.

[ERROR] [MySQL] [esplugin_mysql] An error happens on MySQL for query "[object Object]": ER_NO_DEFAULT_FOR_FIELD: Field 'pet' doesn't have a default value
Error: (node:11520) UnhandledPromiseRejectionWarning: AssertionError [ERR_ASSERTION]: unexpected PromiseRejectEvent
    at process.<anonymous> (internal/process/promises.js:27:25)
    at <anonymous>
    at Query.db.query [as _callback] (mysql-async.js:4973:13)
    at Query.Sequence.end (mysql-async.js:280:24)
    at Query.ErrorPacket (mysql-async.js:2122:8)
    at Protocol._parsePacket (mysql-async.js:5941:23)
    at Parser.write (mysql-async.js:6198:12)
    at Protocol.write (mysql-async.js:5701:16)
    at Socket.<anonymous> (mysql-async.js:693:28)
    at emitOne (events.js:116:13)
Error: (node:11520) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
Error: (node:11520) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Error: (node:11520) UnhandledPromiseRejectionWarning: Error: ER_NO_DEFAULT_FOR_FIELD: Field 'pet' doesn't have a default value
    at Query.Sequence._packetToError (mysql-async.js:244:14)
    at Query.ErrorPacket (mysql-async.js:2109:18)
    at Protocol._parsePacket (mysql-async.js:5941:23)
    at Parser.write (mysql-async.js:6198:12)
    at Protocol.write (mysql-async.js:5701:16)
    at Socket.<anonymous> (mysql-async.js:693:28)
    at emitOne (events.js:116:13)
    at Socket.emit (events.js:211:7)
    at addChunk (_stream_readable.js:263:12)
    at readableAddChunk (_stream_readable.js:250:11)
    --------------------
    at Pool.query (mysql-async.js:4728:23)
    at Promise (mysql-async.js:4970:12)
    at new Promise (<anonymous>)
    at execute (mysql-async.js:4967:26)
    at Object.global.exports [as callback] (mysql-async.js:4985:5)
    at citizen:/scripting/v8/main.js:87:41
    at citizen:/scripting/v8/main.js:51:18
    at setImmediate (mysql-async.js:4962:9)
    at Object.callback (citizen:/scripting/v8/timer.js:96:21)
    at onTick (citizen:/scripting/v8/timer.js:121:27)
Error: (node:11520) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
Error: (node:11520) UnhandledPromiseRejectionWarning: TypeError: Cannot convert undefined or null to object
    at Function.values (<anonymous>)
    at execute.then (mysql-async.js:5002:48)
Error: (node:11520) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3)

Hopefully this helps.

For support for this, you need to post in the ESX release.

Seem your db connection not correct. Check this lines in your server.cfg

set es_enableCustomData 1
set mysql_connection_string “server=DB_SERVERNAME;database=DB_NAME;userid=DB_USER_NAME;password=DB_PASS”

Was the first thing I checked, it’s connected through the config file

This is your error, the field ‘pet’ for whatever table you’re editing doesn’t have a default value. This means you’re either not setting it in your query or you need to apply a default value using pretty much any SQL management tool.

I think I don’t completely understand. I’m no hero in debugging issues with MySql sorry.
There is a default value in the MySql for ‘pet’ its null just like anything else and that should be right, however I cannot really get my head around that is has something to do with ‘pet’. Because as soon as I change the connection to the localhost xampp/phpmyadmin connection it works all fine and perfect.
Database has the same tables etc so its really weird.

Please do not create new topics for support/questions related to existing resources.

Only ask questions or request support in the original resource topic, or on whatever site/page you got the resource from (for example: create an issue on the GitHub page of the resource that you downloaded).

That way the original resource creator will get a notification and be able to help properly. This also helps to reduce duplicate topics of the same issue, because everything will be inside the original topic, allowing everyone to see all issues and solutions in one place.

Thanks for keeping the forums tidy.
:mascot: