> For the complete documentation index, see [llms.txt](https://mango-5m.gitbook.io/mango5m-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mango-5m.gitbook.io/mango5m-docs/resources/mango-mdt/reference/troubleshooting.md).

# Troubleshooting

Fixes for every common Mango MDT setup problem, matched to the exact console message where possible.

Work top-down: most integration problems are answered by one console command —

```
mango_bridges
```

— which prints every bridge category and the provider actually bound. If a category you configured shows nothing, the resource wasn't running (or was started after `mango_mdt`).

## Install and access

<details>

<summary><strong>"Schema not found - import sql/install.sql to finish setup."</strong></summary>

The core SQL was never imported into the database this server connects to. Import `sql/install.sql` (safe to re-run) and restart. Plugin tables are **not** the issue — those migrate automatically.

</details>

<details>

<summary><strong>The MDT won't open for a player</strong></summary>

In order:

1. If `Config.RequireItem` is enabled (`config/core.lua`): are they **carrying** the MDT item? The denial notify says *"You are not carrying your MDT device."* in that case.
2. Do they have an `mdt_users` row for their exact identifier? On **ESX** that's the `license:` identifier; on **QBCore/Qbox** it's the character's **citizenid** (not the license).
3. Is the row's `department_id` set, and does that department's `name` **equal their framework job name**? (`police` ≠ `lspd`.)
4. Does their `rank_grade` match a `grade` under `Config.Ranks.<department>` in `config/ranks.lua`, and does that rank include `mdt.access`?
5. Is the row `active = 1`?

</details>

<details>

<summary><strong>A rank displays as "Grade N" instead of a name</strong></summary>

That grade number doesn't exist for the department's job in your framework (ESX's `job_grades` table; QBCore/Qbox's `shared/jobs.lua` grades) — permissions still work, but align the number or add the grade to the job. See [Ranks and Permissions](/mango5m-docs/resources/mango-mdt/configuration/ranks-and-permissions.md).

</details>

## Billing and fines

<details>

<summary><strong>"Bridge.Billing: no provider active"</strong></summary>

`Config.Bridge.Billing` names a provider whose resource isn't running, or `'auto'` found no biller. Fix the value in `config/bridge.lua` (values are the provider names: `okokbilling`, `codem`, `esx_billing`, `qb`), make sure the billing resource starts **before** `mango_mdt`, and confirm with `mango_bridges`.

</details>

<details>

<summary><strong>Fines don't appear in Codem Billing</strong></summary>

The required one-line edit is missing from `codem-billing/editable/server_editable.lua` — see [Billing Integration](/mango5m-docs/resources/mango-mdt/configuration/billing-integration.md). A Codem update can silently remove it; re-add and restart both resources. Also confirm the officer's job is in Codem's `Config.AllowBillingJobs` as the **bare** job name.

</details>

<details>

<summary><strong>A paid fine stays Unpaid in the MDT</strong></summary>

Codem paid-sync is **polled** — allow up to \~1 minute. On `qb` there is no paid signal at all. esx\_billing should flip instantly; if not, the bill may have been created outside the MDT.

</details>

## Dispatch and alerts

<details>

<summary><strong>ps-dispatch is set but no alerts show</strong></summary>

On **QBCore/Qbox** first check your job names are in ps-dispatch's own valid-jobs list and its on-duty rules match how your server tracks duty. On a **pure-ESX server**, mainline ps-dispatch cannot work at all — its client is QBCore-native and never initialises (the MDT's own map still works because it doesn't go through ps-dispatch); use an ESX-compatible fork, or set `Dispatch = 'mdt'`. See [Dispatch Integration](/mango5m-docs/resources/mango-mdt/configuration/dispatch-integration.md).

</details>

<details>

<summary><strong>Players' dispatch keybinds reset after an update</strong></summary>

FiveM stores per-player rebinds against the **command name** — if an update renames a command, affected players re-bind once in Settings → Key Bindings → FiveM.

</details>

## Items, media and notifications

<details>

<summary><strong>Using the bodycam/warrant item does nothing (ox_inventory)</strong></summary>

The item definition is missing its `server = { export = 'mango_mdt.bodycam' }` (or `.warrant`) line — ox routes item use through that export. Add it and restart `ox_inventory`. See [Inventory Items](/mango5m-docs/resources/mango-mdt/configuration/inventory-items.md).

</details>

<details>

<summary><strong>Notifications appear in the wrong place</strong></summary>

Where officer-facing messages render is the Notifications bridge: `'mdt'` shows them inside the tablet UI; `'ox_lib'` / `'okokNotify'` / `'mythic_notify'` show them in that resource's HUD style. Set it in `config/bridge.lua`.

</details>

<details>

<summary><strong>No images on warrants / bodycam / CCTV</strong></summary>

Media needs a [Fivemanage](https://fivemanage.com) API key in `config/core.lua` (`Config.Fivemanage.apiKey`). Blank key = uploads disabled by design; invalid key = upload errors in the server console. Records themselves work fine without media.

</details>

<details>

<summary><strong>Discord exports don't post</strong></summary>

The webhook for that feature is blank or wrong: `Config.DiscordWebhooks.warrants` (`config/warrants.lua`) / `Config.DiscordWebhooks.bodycam` (`config/bodycam.lua`). A blank webhook is a deliberate "disabled" — no error is raised.

</details>

## Odds and ends

<details>

<summary><strong>oxmysql "slow query" warnings mentioning mdt_ tables</strong></summary>

Those warnings mean your **database server** answered slowly (oxmysql flags anything over \~150 ms) — common on shared hosting. The MDT batches its startup writes specifically to keep this quiet; occasional slow-query flags under load are your DB's latency, not a fault in the queries.

</details>

***

Still stuck? Include the output of `mango_bridges`, your `config/bridge.lua`, and the exact console error when you open a support ticket.
