# Troubleshooting

:::accordion{title="The resource does not start or the inventory is empty"}
- `oxmysql` and `koja-lib` must be started before `koja-inventory-v2`.
- Only one inventory can run. Make sure the real `ox_inventory` (or another inventory) is not started. The ox bridge is fine.
- Read the startup banner: `Database unreachable` means oxmysql cannot connect.
:::

:::accordion{title="New files or commands do not exist after an update"}
After an update that adds files, run `refresh` and then `ensure koja-inventory-v2` (or restart the server). A plain `ensure` does not load new files listed in the manifest.
:::

:::accordion{title="No access to /invadmin or admin commands"}
Add the ACE `command.koja-inventory-v2` to your group in `server.cfg`, or give the player a group listed in `Config.AdminGroups`. The old ACE `command.koja_grid_inventory` from earlier builds no longer works.
:::

:::accordion{title="Scripts using exports.ox_inventory fail"}
- `Config.Ox.enabled` and `Config.Ox.exports` must be `true`.
- Resources with `dependency 'ox_inventory'` need the bridge: see [Migrating from ox_inventory](/new/inventory-v2/migrating-from-ox).
- Scripts that call `exports.koja_grid_inventory` must change to `exports['koja-inventory-v2']`.
:::

:::accordion{title="Items have no picture"}
Check `Config.ImagePath`. With the default `images/`, the file must be `web/build/images/<item>.png`. Items without an image show a category icon.
:::

:::accordion{title="An imported ox item has the wrong size"}
Sizes of imported items are guessed from weight and weapon type. Define the item in `shared/items.lua` with the `size` you want; it wins over the import.
:::

:::accordion{title="Clothes from another script disappear or come back"}
- Clothes are synced only after they stay on the character for `Config.Clothing.watch.settle` ms and while no menu has focus.
- Nothing syncs in vehicles, while ragdolled or falling, and for `grace` ms after.
- To sync right after your script changes clothes, call `exports['koja-inventory-v2']:SyncClothing()` on the client.
- To ignore other scripts completely, turn off **Read clothes from other scripts** in Settings → Clothing.
:::

:::accordion{title="Backpack or vest looks wrong on the character"}
The look comes from the item's `ped` field. Set drawables that exist on your server, or turn off **Show backpack and vest** in Settings → Clothing.
:::

:::accordion{title="Trunk props show up in the cabin"}
Stand at the trunk of that model and run `/trunkarea`. Move the box onto the trunk floor and press `Enter` to save it for the model.
:::

:::accordion{title="Crafting does nothing"}
- Check every ingredient chip is white, not red. Ingredient aliases (`Config.Crafting.aliases`) let ox items like `scrapmetal` count.
- Tools must not be broken.
- Stay within a few metres of the bench until the progress bar ends; walking away cancels it.
:::

:::accordion{title="There is no Repair option"}
Repair shows for weapons and tools tracked by durability. It is greyed out when the item is at 100% or you carry no fitting repair item (for weapons: `weapon_kit` or `repairkit`). Repair items are set in `Config.Durability.repairs`.
:::

:::accordion{title="Settings, admin locations or runtime items are gone"}
They are stored in resource KVP, which belongs to the resource name. If the folder was renamed (for example from `koja_grid_inventory`), they start empty. Inventories in the database are not affected.
:::
