# Symptoms and Fixes

Start with the **first error after a clean server start**, not the last resource reporting a nil value. A broken dependency can produce errors in otherwise working resources. Record the resource name, file, line, deployed commit and the last change before applying a fix.

These are source-reviewed diagnostic instructions, not a claim that every server configuration has been tested. Work on staging with a recoverable backup. Do not delete characters, invent missing columns or clear every cache as a first step.

## Diagnose your issue

Choose a short guided check for resource startup, database errors or character loading.
The complete written guides remain below; no account or server connection is required.

For a resource with a manifest, locally run the [Compatibility Analyzer](/tools/compatibility-analyzer)
to check selected `fxmanifest.lua` dependencies, literal Lua APIs, and explicit resource starts.
It keeps the selected text in the browser; its findings identify review steps, not confirmed
runtime failures. Check the installed version and first server-console error before making changes.

The diagnostic directory was expanded on 2026-11-13; individual guides retain their own source-review dates and version boundaries.

## Choose a diagnostic path

| Symptom | Guide | First distinction |
| --- | --- | --- |
| `No such export GetCoreObject`, `LoadInventory` or another export | [Missing-export reference](/docs/troubleshooting/no-such-export) | Provider startup, execution side or API mismatch |
| Missing resource or dependency | [Resource load order](/docs/troubleshooting/resource-load-order) | Missing files versus a resource that failed to start |
| oxmysql missing, access denied or a SQL error | [oxmysql troubleshooting](/docs/troubleshooting/oxmysql) | Package, connection or schema failure |
| `attempt to index a nil value` | [Lua nil values](/docs/troubleshooting/attempt-to-index-nil) | Which expression on the reported line is nil? |
| Inventory will not open, or stopped working after an update | [Inventory updates](/docs/troubleshooting/inventory-updates) | Caller API, shared items, UI or storage |
| Black screen or character selection stuck | [Multicharacter loading](/docs/troubleshooting/multicharacter-loading) | Before selection, after selection or only new characters |
| Vehicles missing after reconnect | [Vehicle state](/docs/troubleshooting/vehicle-state) | Entity existence versus persistent ownership |
| Voice indicator works but nobody hears you | [Voice chat](/docs/troubleshooting/voice-chat) | Proximity, radio and phone calls are separate tests |
| An update overwrote custom changes | [Update conflicts](/docs/troubleshooting/resource-update-conflicts) | Compare the local customization with the incoming change |

## Server won't start

For `Couldn't find resource qb-core`, check that the active server data directory contains `resources/[qb]/qb-core/fxmanifest.lua`. A nested `qb-core-main/qb-core/` folder is not the same resource path. Confirm that you edited the configuration used by the running txAdmin profile.

If the folder is correct, inspect errors **before** the missing-export messages. A syntax error in `qb-core/shared/items.lua` can prevent shared data from loading. Reordering `ensure` statements will not repair invalid Lua. Follow the [worked script-installation case](/docs/troubleshooting/multicharacter-loading#worked-case-black-screen-after-installing-a-script).

## Players can't join

For `Connection refused`, first establish whether FXServer is running and listening on the intended interface and port. Compare a local connection with one from another network; a LAN-only success does not prove that public routing works. Continue with [connection diagnostics](/docs/troubleshooting/connection-issues).

## FiveM Server Connection Issues

For `Failed to connect to server`, distinguish a transport failure from license authentication and from a failure after downloading resources. The example default listener is:

```cfg
endpoint_add_tcp "0.0.0.0:30120"
endpoint_add_udp "0.0.0.0:30120"
```

Use your actual port. Check both the host firewall and provider/NAT rules for that port. Keep the license key private and follow [the installation guide](/docs/installation) for current registration instructions. A working network connection followed by a black screen belongs in the loading guide, not in firewall troubleshooting.

## Player Vehicles Table Not Found

For `player_vehicles doesn't exist`, do not paste an arbitrary `CREATE TABLE` statement. First confirm the selected database, then identify the resource owning the query and inspect its SQL at the **same commit**. In the referenced vehicle-shop source, that schema is in `vehshop.sql`.

Run read-only inspection in your database client:

```sql
SELECT DATABASE();
SHOW TABLES LIKE 'player_vehicles';
```

If the table exists, inspect `SHOW CREATE TABLE player_vehicles;` and compare it with the owning resource's migration. If it does not, restore or apply the appropriate schema on staging before scheduling a production change. `CREATE TABLE IF NOT EXISTS` does not update an existing incompatible table. See [database ownership](/docs/database) and [oxmysql schema errors](/docs/troubleshooting/oxmysql#schema-errors-are-not-connection-errors).

## Player Login State Check

`LocalPlayer.state.isLoggedIn` is a client-side readiness signal, not a way to repair a failed login. Do not access client globals in a server script. Prefer the QBCore load/unload events and check for a loaded character when a resource starts after login.

For a temporary client diagnostic:

```lua
RegisterCommand('docs_login_state', function()
    print(('isLoggedIn=%s'):format(tostring(LocalPlayer.state.isLoggedIn)))
end, false)
```

Run `docs_login_state` in F8. A false/nil value during loading means you should inspect the character flow; do not force the flag to true. Remove diagnostic commands after testing. See [player data](/docs/core/player-data).

## NUI GetParentResourceName

`GetParentResourceName()` is available in **FiveM's NUI browser JavaScript**. It is not an ordinary browser API: opening your HTML at localhost or as a file does not provide the FiveM NUI bridge. In client Lua, use `GetCurrentResourceName()` when you need the current resource name.

This minimal request/response pair uses the same callback name on both sides:

```lua
-- client.lua, loaded by your resource's client_scripts entry
RegisterNUICallback('docsPing', function(_, cb)
    cb({ ok = true, resource = GetCurrentResourceName() })
end)
```

```js
// Browser-side NUI JavaScript, loaded by your ui_page HTML
async function pingGame() {
  if (typeof GetParentResourceName !== 'function') {
    throw new Error('This test needs FiveM NUI; a normal browser preview has no game bridge.')
  }

  const response = await fetch(`https://${GetParentResourceName()}/docsPing`, {
    method: 'POST',
    headers: { 'Content-Type': 'application/json; charset=UTF-8' },
    body: JSON.stringify({}),
  })
  return response.json()
}

pingGame().then(console.log).catch(console.error)
```

Expected result inside FiveM NUI: an object with `ok: true` and the resource name. Every Lua callback path must call `cb`, including validation failures. A missing response can leave the UI waiting. Check the actual NUI console/network panel, callback spelling, loaded `client.lua`, manifest `ui_page`/`files` entries and the first JavaScript error.

For browser-only development, provide an explicitly labelled mock transport; never mistake its success for a working game callback. Continue with the [complete NUI form guide](/docs/guides/nui-form-callback).

## Common Database Issues

A missing `players` table and a missing resource-specific table require different source files. Inspect the database selected by the running connection string and consult the [core schema](/docs/database/core-schema). Do not replace an existing player schema with a shortened example.

For `Access denied`, `ECONNREFUSED`, missing tables and unknown columns, use the [oxmysql decision table](/docs/troubleshooting/oxmysql). Keep backups outside the web root and redact passwords, license keys and personal player data from support logs.

## Next Steps

- [Getting Started](/docs/getting-started)
- [Connection Issues](/docs/troubleshooting/connection-issues)
- [Support](/support)

## Sources

- [Cfx.re NUI callbacks](https://docs.fivem.net/docs/scripting-manual/nui-development/nui-callbacks/), checked 2026-09-21: browser-side resource name and callback responses.
- [QBCore core SQL at 9b3cddcc](https://github.com/qbcore-fivem/qb-core/blob/9b3cddcce93e5e12cbcf6b47b866b687d32ac7bf/qbcore.sql).
- [Vehicle-shop schema at e8652970](https://github.com/qbcore-fivem/qb-vehicleshop/blob/e8652970aca3324d2a18a440f3d3871715338da8/vehshop.sql).
