Skip to Content
TroubleshootingCommon Errors

Common Errors & Solutions

This guide provides solutions to frequently encountered problems when running a FiveM server.

Error Categorization

Before fixing an error, determine where it is occurring:

  • Server-Side Errors: Appear in your txAdmin console, server terminal, or server.log. These usually affect the entire server or specific resources starting up.
  • Client-Side Errors: Appear in the player’s F8 Console (press F8 in-game). These usually affect a specific player or their UI/scripts.

Log Analysis Techniques

Logs are your primary tool for diagnosing issues.

Log Locations

  • txAdmin: txData/default/logs/ (or your specific profile folder).
  • Server Console: The live output window where you started the server.
  • Client Console: The F8 console in-game. The log file is at %localappdata%\FiveM\FiveM.app\logs\CitizenFX.log.

What to Look For

  • Key Terms: Search logs for ERROR, EXCEPTION, warning, or stack trace.
  • Resource Name: Look for [script:resource_name] to identify the culprit.
  • Line Numbers: Errors often point to a specific file and line (e.g., @qb-core/server/player.lua:164).

Server Startup Errors

”GlobalError: This server does not have a license key specified”

The server cannot find your license key.

Solution:

  1. Get a key from FiveM Keymaster .
  2. Add sv_licenseKey "YOUR_KEY_HERE" to your server.cfg.
  3. Ensure the key matches your IP address.

”bind: address already in use”

Another program is using the server port (default 30120).

Solution:

  1. Check if another FiveM server instance is running.
  2. Kill the process occupying the port:
    • Linux: sudo lsof -i :30120 then kill -9 <PID>
    • Windows: Check Task Manager or Resource Monitor.
  3. Change the port in server.cfg (endpoint_add_tcp and endpoint_add_udp) if you intend to run multiple servers.

”You lack the required entitlement to use <resource>”

The server cannot verify ownership of a premium asset (Escrow system).

Solution:

  1. Ensure the asset is in your Keymaster  account.
  2. Ensure the sv_licenseKey used matches the account that owns the asset.
  3. Restart the server to refresh the license cache.

Connection & Authentication Errors

”Couldn’t establish a game authentication session”

The client cannot connect to FiveM’s authentication servers.

Solution:

  1. Client: Restart FiveM and Steam/Discord.
  2. Server: Ensure the server has outbound internet access.
  3. General: Check status.cfx.re for platform-wide outages.

”Unable to find SteamID” / “Identifier missing”

A resource requires a specific identifier (Steam, Discord) that is not detected.

Solution:

  1. Steam: Ensure Steam is open and running before launching FiveM.
  2. Discord: Ensure the Discord desktop app is open.
  3. Server Owner: Verify sv_lan is set to 0 in server.cfg. LAN mode disables authentication identifiers.

”Stuck on ‘Analyzing Game Data’”

Usually a client-side cache or version mismatch issue.

Solution:

  1. Clear client cache: Delete data/cache, data/server-cache, and data/storage in the FiveM Application Data folder.
  2. Verify GTA V game files via Steam/Epic/Rockstar launcher.

Resource & Script Errors

”SCRIPT ERROR: @resource/script.lua:10: attempt to index a nil value”

The script is trying to read a variable that doesn’t exist (is nil).

Solution:

  1. Check the line: Look at the code around the line number mentioned.
  2. Missing Config: Often caused by missing entries in config.lua.
  3. Invalid Data: A database query might have returned no results.

”No such export <name> in resource <resource>”

A script is trying to call a function from another resource that isn’t loaded or doesn’t exist.

Solution:

  1. Dependency Order: Ensure the resource providing the export starts before the resource using it in server.cfg.
  2. Typo: Check for spelling errors in the export name.
  3. Version: The resource might be outdated and the export name changed.

”Resource <name> does not exist”

The server tries to start a resource defined in server.cfg but can’t find the folder.

Solution:

  1. Check the spelling in server.cfg vs the folder name (Case Sensitive on Linux!).
  2. Ensure the folder contains an fxmanifest.lua or __resource.lua.
  3. Check for nested folders (e.g., resources/cars/cars instead of resources/cars).

Database Errors

”Connection refused” / “ECONNREFUSED”

The server cannot connect to the MySQL database.

Solution:

  1. Is MySQL Running?: Check XAMPP/MariaDB service status.
  2. Connection String: Verify set mysql_connection_string in server.cfg.
    • Format: server=localhost;uid=root;password=;database=fivem
  3. Credentials: Ensure username and password are correct.

”Table ‘fivem.users’ doesn’t exist”

The script needs a database table that hasn’t been created.

Solution:

  1. Import the .sql file provided with the resource into your database (using HeidiSQL or phpMyAdmin).

Framework-Specific Errors

ESX Framework

”No such export getSharedObject in resource es_extended”

Modern ESX Legacy replaced the event-based getSharedObject with an export, but older scripts still look for the event.

Solution:

  1. Update Script: Check if the script has a newer version supporting the export.
  2. Manifest Shim: Add @es_extended/imports.lua to the script’s shared_scripts in fxmanifest.lua.
  3. Enable Compatibility: Some versions of ESX allow enabling the old event in config.lua.

QBCore Framework

”No such export GetCoreObject in resource qb-core”

Similar to ESX, scripts must use the correct export to load the core.

Solution:

  1. Ensure you are using: local QBCore = exports['qb-core']:GetCoreObject()
  2. Some older scripts might use exports['qb-core']:GetSharedObject(). Update them to GetCoreObject.

”Attempt to index a nil value (field ‘Jobs’)”

Usually happens when the player data is corrupted or the shared/jobs.lua file has syntax errors.

Solution:

  1. Check qb-core/shared/jobs.lua for syntax errors (missing commas/brackets).
  2. Ensure the job exists in the shared configuration.

Prevention Strategies

  1. Regular Backups: Always backup your database and resources before adding new scripts.
  2. Read Documentation: Read the README.md of every resource.
  3. Check Dependencies: Ensure all requirements listed in the resource’s documentation are installed and started.
  4. Naming Conventions: Use lowercase names for resources (e.g., my-script instead of My Script) to avoid Linux case-sensitivity issues.
  5. Keep Updated: Regularly update server artifacts and framework cores, but read changelogs first!
Last updated on