FiveM Error Codex
Server console throwing something cryptic? Search the error below to find what actually causes it and how to fix it — step by step.
60 of 60
attempt to index a nil valueYour code tried to read a field on something that is nil — a variable expected to hold a table or object doesn't exist y…
attempt to call a nil valueYour code tried to call something as a function that isn't one — it's nil. Usually the function belongs to a resource th…
Could not find dependency X for resource YResource Y declares a dependency on resource X in its fxmanifest.lua, but X isn't started (or isn't present) when Y trie…
Couldn't load resource manifestThe server couldn't read the resource's fxmanifest.lua. Common reasons: the manifest is missing, the resource folder is …
Couldn't load resource: failed to open packfileThe resource's files are corrupted or incomplete — very often the result of a partial or interrupted download, or an inc…
You lack the required entitlementThe Cfx.re asset escrow system can't verify that your account owns a premium (escrow-protected) asset. Every script depe…
No such export fetchSync in resource oxmysqlA resource tried to use an oxmysql export before oxmysql had started — oxmysql isn't running, or it starts after the res…
Database connection failed (oxmysql)oxmysql couldn't connect to your MySQL/MariaDB database. 'Connection refused' means the database server isn't running or…
Resource X failed to startThe resource errored during startup and couldn't initialize. The real reason is almost always another error printed just…
Resource does not existYour server.cfg has an `ensure` line for a resource the server can't find on disk. Double-nested folders and name mismat…
SCRIPT ERROR: citizen:/scripting/lua/scheduler.luaThe path citizen:/scripting/lua/scheduler.lua in a stack trace is FiveM's internal Lua scheduler — it is NOT a file in y…
Error parsing script @resource/file.luaA Lua file has a syntax error, so FiveM can't parse it. Almost always a missing `end`, a missing comma or quote, or an u…
The server cannot find your license keyYour server.cfg is missing a valid sv_licenseKey, or the key is wrong. FiveM servers require a license key from the Cfx.…
Port already in use (30120)Another program — usually another FiveM server instance — is already using the server port (default 30120), so your serv…
[resourceName] script timeout / hitch warningA resource held the single main server thread too long to finish a tick on time. The number is the delay in milliseconds…
An unhandled exception (msgpack::type_error) caused FiveM to stop workingA client-side crash where data passed across the network couldn't be serialized/deserialized correctly, or a resource re…
Couldn't load content / stuck on loading screenThe client can't finish downloading or loading a server's resources. Causes include a corrupt client cache, a resource t…
State bag rate limit exceededA resource is writing state bag values or firing reliable network events far too frequently, hitting FiveM's rate limits…
Resource X conflicts with resource YTwo resources share the same folder name, or two resources try to provide the same core system (two inventories, two spa…
attempt to perform arithmetic on a nil valueYour code tried to do math (+, -, *, /) with a value that's nil. Usually a Config value, a table field, or a returned va…
attempt to concatenate a nil valueYour code tried to join (..) a nil value into a string. Common when building a message or query with a variable that doe…
table index is nilYour code tried to use nil as a key when writing to a table (e.g. `myTable[key] = value` where key is nil). Usually the …
event X was not safe for net / not registeredA resource tried to trigger a networked event that wasn't registered with RegisterNetEvent on the receiving side, or a s…
Warning: no resource manifest (fxmanifest.lua or __resource.lua)A folder in your resources directory has no manifest file, so FiveM doesn't treat it as a resource. Often a stray folder…
OneSync (policy type onesync) is not allowed for this server, or a transient issue occurredYour server has OneSync enabled (usually because you raised the slot count above 32), but Cfx.re can't confirm your acco…
Could not open resource metadata file __resource.luaThe server can't find a resource's manifest. Modern FiveM uses fxmanifest.lua; very old resources used __resource.lua. T…
native (0x...) isn't supported / resource can't runA resource is calling a server native that your server artifacts (server build) are too old to support. This very common…
Could not start dependency X for resource YResource Y depends on resource X, and X exists but FAILED to start — so Y can't start either. This differs from 'could n…
Building resource X failed / yarn failedResources with a build step (those using webpack/yarn, like some chat and NUI resources) run a build task on first start…
Server connection timed out / failed to connect after 3 attemptsThe client couldn't complete the connection handshake with the server. Causes range from the server being down or full, …
Steam is not running / invalid Steam ticketFiveM couldn't get the player's Steam identifier — either Steam isn't running, the ticket failed, or the player launched…
Failed to update system resources: Could not find refs/heads/masterThe server (or FxDK) couldn't fetch/update its bundled system resources — the base gamemode, chat, spawnmanager, session…
attempt to yield across a C-call boundaryYour code tried to yield (Wait, Citizen.Wait, an awaited call, or a callback that yields) from inside a context that can…
InvokeNative: execution failed: No current resource managerA native was invoked outside of a valid resource context — often from a thread or callback that ran after the resource s…
Invalid native call in resource (game fatally closing)The client crashed because a resource invoked a native incorrectly — wrong argument types/counts, or an issue tied to th…
InvokeNative: execution failed: Argument at index N was nullA native (often from a C#/.NET or older EssentialMode-style resource) received a null where it expected a value. Usually…
InvokeNative: execution failed: bad any_castA native received an argument of the wrong type — the server tried to cast it and failed. Often surfaces after moving a …
attempt to index a nil value (field 'job')You read PlayerData.job (or .job.name) before the player's data finished loading. On first join the framework populates …
attempt to index a nil value (global 'ESX')The global ESX object is nil when your code uses it. On ESX Legacy / 1.9+, the old `TriggerEvent('esx:getSharedObject', …
Restarting a resource crashes connected clientsRestarting certain resources at runtime can crash connected clients — most often resources with NUI or streamed assets, …
Warning: a net event was triggered without being registeredA resource triggered a networked event that the target side never registered with RegisterNetEvent. The event silently d…
You have an error in your SQL syntax (oxmysql)A database query has invalid SQL — often a typo, a missing column, a reserved word used as a column name, or a malformed…
Unknown column 'X' in 'field list'A query references a column that doesn't exist in the table — usually because a required SQL import wasn't run, or the r…
Texture dictionary not loaded / txd missingA script tried to draw a sprite/texture whose texture dictionary wasn't requested and loaded first, or a streamed .ytd a…
MLO / YMAP interior not loadingA custom interior (MLO) or map (YMAP) isn't appearing — usually a streaming/load-order issue, a missing dependency, or t…
Server thread hitch warning: too many events queuedA resource is firing events far too frequently, flooding the event queue. Usually a loop triggering server/client events…
Failed to verify protocol / server sent invalid dataThe client and server protocol/build don't match, or the connection was corrupted. Often an outdated client, outdated se…
Citizen.InvokeNative crash / game crashed (no dump)The FiveM client crashed with little or no error, often from a bad native call, a corrupt streamed asset, or an out-of-m…
That identifier is already in use / duplicate licenseA player is being rejected because their identifier appears already connected — either a ghost session that didn't clean…
Resource X caused the server thread to hangA resource blocked the main server thread long enough to hang the server — typically an infinite loop with no Wait(), or…
Mixing ESX Legacy and old ESX (esx:getSharedObject vs export)A resource written for old ESX (event-based shared object) is running on ESX Legacy (export-based), or vice versa. The m…
attempt to index a nil value (global 'QBCore')The QBCore object is nil — you used it before assigning it, or qb-core isn't started before your resource. The correct p…
NUI shows a blank white/black screenA NUI page failed to load — a wrong path in the manifest ui_page/files, a missing file, a JS error, or a bad relative pa…
Mouse cursor stuck on screen after closing a menuA NUI menu gave focus with SetNuiFocus(true,true) but never released it with SetNuiFocus(false,false) on close, trapping…
Item exists but doesn't show / can't be used in inventoryAn item is defined but not appearing or usable — usually a missing image, an item name mismatch between the giving code …
Weapon does no damage / players are invinciblePlayers take no damage — often a leftover SetEntityInvincible(true) from a safe-zone or spawn script that wasn't turned …
Map blip not showing upA blip was created but isn't visible — often because sprite/colour/name weren't set, the code ran before the map loaded,…
ox_target / qb-target interaction not appearingA target option isn't appearing — the target resource isn't started, the zone/entity wasn't registered, a distance is to…
Server not showing in server list / tunnel connection timed outThe server can't reach the Cfx.re tunnel/heartbeat — often a firewall blocking the required ports, a missing/invalid sv_…
Entity not syncing between players (OneSync)An entity created on one client isn't visible/synced to others — usually because it was created locally (not networked),…