Common server errors and fixes
Fixes for the errors every FiveM server owner hits: license key, resources that won't load, server not in list, game build and pure mode, oversized assets, escrow and SQL.
Start every diagnosis in the same place: the server console (txAdmin > Live Console) for server errors, and the F8 console in the game for client errors. Scroll up to the first red line. Later errors are often just a result of the first one.
The messages below are paraphrased where their exact wording changes between builds. Search the console for the key words.
License key problems
Symptoms: the server stops right after starting and mentions the license key, “invalid”, “failed to verify” or a missing sv_licenseKey.
- Check the key is on its own line:
sv_licenseKey "cfxk_..."with no extra spaces or quotes inside. - Make sure it is not commented out and that no later
exec’d file overrides it with an old key. - Each server needs its own key. Two servers with one key fight each other.
- If you pasted the key into a public place, it may have been abused. Regenerate it on portal.cfx.re and update your config.
- On a VPS, a system clock that is far off can break verification. The txAdmin team has a short video on syncing the Windows VPS clock, linked in the video archive.
“Couldn’t find resource” / “Couldn’t start resource”
Symptoms: Couldn't find resource myresource. or a failed start for a resource you just added.
- Folder name.
ensureuses the folder name.ensure my-cardoes not findMy-Caron Linux (case sensitive) and does not findmy-car-main(GitHub zip downloads add-mainor-master, rename the folder). - Nested folder. Unzipping often gives
resources/[local]/mycar/mycar/fxmanifest.lua. The manifest must be directly inside the folder you ensure. - No manifest. The folder needs
fxmanifest.lua(or the ancient__resource.lua). Generate a correct one with the fxmanifest Generator. - Wrong working directory. Starting FXServer from the wrong folder (vanilla setups) means it can’t see
resourcesat all. Start it from your server data folder. - Not refreshed. Added the folder while the server runs? Type
refresh, thenensure name.
Manifest and script errors
Symptoms: Couldn't load resource x followed by a Lua error in fxmanifest.lua, or SCRIPT ERROR: @resource/file.lua:12: ....
- A syntax error in the manifest (missing quote or comma in a
{ }list) stops the whole resource. The error names the line. SCRIPT ERRORlines show@resource/path:line. Open that file at that line. Common ones:attempt to index a nil value (global 'QBCore'): the framework object was never fetched, or the framework started after this resource. Fixensureorder.attempt to call a nil value (field 'xyz'): calling an export or function that doesn’t exist (wrong resource name, wrong version).No such export xyz in resource abc: the resource isn’t started, has another name, or doesn’t export that function in your version.
Could not find dependency x for resource y: install andensurethe dependency first.
More on reading errors in Debugging.
Server not in the server list
- Test direct connect:
connect IP:30120in F8. If it fails, it’s ports or firewall, see Ports and networking. - Remove or comment out
sv_master1 "". - Set
sets sv_projectNameandsets sv_projectDesc. - Wait up to 8 minutes after start.
- Check the IP isn’t blocked with the Cfx Blacklist Checker.
- Check what your server reports with the Server Status Checker.
Players get stuck while connecting
| Where it hangs | Usual cause |
|---|---|
| “Handshaking with server” | UDP 30120 blocked, or the server is under heavy load at start. |
| “Downloading assets” for ages | Huge streamed packs. Shrink textures with the YTD Optimizer, remove unused packs, consider a file server. |
| Loading screen never ends | A loadscreen with loadscreen_manual_shutdown 'yes' that never calls ShutdownLoadingScreenNui(), or a framework spawn script erroring. Check F8. |
| Kicked with a timeout after joining | A client script erroring in a loop, or a resource sending huge events. Check F8 and the server console. |
Game build mismatch
Symptoms: players are told they need to download game data or a different build, or DLC vehicles and clothes don’t appear.
sv_enforceGameBuildmust be set at startup, inserver.cfg, and requires a restart to change.- A build number that your artifact doesn’t know yet does nothing. Update the artifact first.
- DLC content (vehicles, clothes) from a newer build than the one you enforce won’t spawn. Check the build in server.cfg explained.
- Some old MLOs and clothing packs break on newer builds because Rockstar changed the base files. Look for an updated version from the author.
Pure mode kicks
Symptoms: players are refused because of modified game files.
sv_pureLevel 1 allows audio mods and known graphics mods, sv_pureLevel 2 blocks everything modified. If legitimate players with graphics mods can’t join, lower it to 1 or remove it. On FiveM for GTA V Enhanced, pure mode is always on and can’t be disabled.
Oversized assets and texture loss
Symptoms: a console warning that an asset “uses XX MiB of physical memory” and that oversized assets can lead to streaming issues. In game: blurry or missing textures, the city not loading when you drive fast, invisible cars.
- Usually a
.ytdwith 4K textures in a car or clothing pack. - Resize textures to 2048 or 1024, use DXT compression, generate mipmaps. The YTD Optimizer does this for many files at once.
- Check a whole vehicle resource for broken references with the Vehicle Pack Validator.
- Remove packs nobody uses. Every streamed MB costs every player memory.
Escrow errors
Symptoms: “Failed to verify protected resource” or an escrowed resource refusing to start.
- The resource was bought on a different Cfx.re account than the one that owns the server’s license key. Escrowed assets are tied to the buying account.
- Re-download it from the Cfx.re Portal. Files changed or re-zipped by hand (for example opened and saved in an editor) fail verification. Only edit the files the creator left open (usually
config.lua). - Too old an artifact: escrow needs a reasonably recent build.
- Some escrowed resources need a minimum game build or OneSync.
Database errors
See the table at the end of Database setup. The top three: MariaDB not running, wrong password in mysql_connection_string, forgot to import the resource’s .sql.
Port already in use
Symptoms: FXServer can’t bind to 0.0.0.0:30120, or txAdmin can’t use 40120.
Another FXServer (or an old one that didn’t close) is running. Close it (Task Manager on Windows, pkill -f FXServer or systemctl stop on Linux) or use different ports for the second server.
txAdmin says the server is not responding
- A resource is blocking the main thread (an infinite loop without
Wait, a slow synchronous query). txAdmin’s hang detection restarts it. Find the culprit with the profiler: see Threads and performance and the Profiler Analyzer. - Server hitches in the console (
server thread hitch warning: timer interval of X milliseconds) mean the same thing on a smaller scale.
Still stuck?
Post on forum.cfx.re (Server Discussion) or the relevant framework Discord with:
- the first red error, copied as text,
- your artifact build and game build,
- what you changed last,
- your
server.cfgwithout the license key and passwords.
