Common FiveM server errors and how to fix them

FiveM error messages look intimidating, but there are only a handful of causes behind most of them. This guide lists the errors you are most likely to see, what each one really means, and what to try first.

Read the console first

Almost every FiveM problem is explained somewhere in the server console. The text scrolls quickly at start-up, so scroll back to the first red line, because later errors are usually consequences. How to read your server logs shows how. Take notes of the exact wording, since searching the exact text finds answers fastest.

Errors when the server starts

MessageWhat it meansFix
License key invalid, or "sv_licenseKey" missingThe server could not verify your keyCheck the key in server.cfg, with no spaces or missing characters. Generate a new one in the portal if needed
"Couldn't start resource X"A resource failed to loadRead the lines above it for the cause
"Could not find dependency Y for resource X"X needs Y, which is missing or loads laterInstall Y, or move its ensure line before X
"Failed to load script" or "SCRIPT ERROR"A syntax error or a bad fileUpdate or reinstall the resource
Port already in useSomething else uses the portUse the port your host assigned. See How game server ports work

Errors with scripts

  • "attempt to index a nil value". A script tried to use something that does not exist, often because a dependency has not loaded or the framework version does not match. Check that the script supports your framework and version.
  • "No such export". One resource asked another for a function that the other does not provide. The wrong version of a dependency is the usual reason.
  • A resource restarts repeatedly. Often a database problem or a conflict. Stop it and read its error.

Database problems

Frameworks and many scripts rely on a database. Typical signs and fixes:

  • "Access denied for user". The username or password in your connection string is wrong.
  • "Unknown database". The database name is wrong, or it was never created.
  • "Table doesn't exist". You did not import the SQL file for that resource.
  • Connection timeouts. The database host is unreachable, or its firewall blocks you.

Test the connection with the same details from another tool, so you know whether the problem is the login or the script. If you manage the database yourself on a VPS, see How to install and secure MariaDB.

Errors when players join

  • "Failed to connect" or timeout. Players cannot reach the server. Check that the TCP and UDP port are both reachable, as explained in Connection timed out vs connection refused.
  • Stuck on "Loading" or "Downloading". A streamed file may be very large or broken. Check the resources that stream assets, and remove the newest ones.
  • "Server thread hitch warning". The server paused for a moment, often because a resource ran a heavy task. Note which resources are named and look at their load.
  • Kicked for "Reliable network event overflow". A script sent too much data at once, usually a bug.

Server performance problems

Use the resmon tool, which you open in the game console with resmon 1. It shows how much time each resource uses. A script that uses a lot even when idle is a candidate for replacement. More general advice is in How to fix server lag.

After updates

FiveM updates its server build often. If things break after an update:

  1. Check that you are on a recommended build, not a very new or very old one.
  2. Update your framework and key resources.
  3. Look at the changelogs for breaking changes.

If you cannot tell which resource is at fault, stop resources in halves until the error goes away, then narrow it down.

A good habit

Keep a changelog of what you install and when. Most problems appear soon after a change, and a list tells you what to undo. And keep a backup before major updates.


Still stuck? Open a ticket on Discord - run /ticket in any channel, pick a department, and include your Server ID or Invoice ID so we can jump straight in.