Fivem VPS hosted - MySQL errors & Server not showing up on Fivem

#1

Hello,

I am developing a fivem server which is being hosted off of a VPS. When starting the server the command prompt will show up and run through all resources showing the server online however it doesnt show anywhere on the fivem application or server list.

When reviewing the command prompt the only error visible was:

Error: (node:5452) UnhandledPromiseRejectionWarning: AssertionError [ERR_ASSERTION]: unexpected PromiseRejectEvent
at process. (internal/process/promises.js:27:25)
at
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. (mysql-async.js:693:28)
at emitOne (events.js:116:13)
Error: (node:5452) 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:5452) [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:5452) UnhandledPromiseRejectionWarning: Error: ER_BAD_FIELD_ERROR: Unknown column ‘state’ in ‘where clause’
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. (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 ()
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 window.TriggerEventInternal (citizen:/scripting/v8/natives_server.js:463:9)
at global.emit.args (citizen:/scripting/v8/main.js:141:3)
at global.on (mysql-async.js:5071:16)
at citizen:/scripting/v8/main.js:193:28
Error: (node:5452) 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)

Followed by a series of
hitch warning: net frame time & frame time

Thanks for any assistance i may receive.

#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!
:mascot:

#3

The error is clear. Somewhere in your code you are querying the database with a WHERE clause on the column state, but this column does not exist in the table that you query.

You should probably add a column state to that table. It’s possibly of type boolean.

Good luck.

#4

By any chance are you able to help me understand a little more, i have no idea what you mean or how to do it.

Thanks for the assistnace

#5

Unfortunately I cannot make it more clear. Perhaps W3Schools can help you understand this more https://www.w3schools.com/sql/sql_where.asp

It’s as simple as using a (GUI) tool to connect to your database, right click on the table in question, alter it.

#6

ok Thanks for your help :grinning:

closed #7

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