# troubleshooting

Common issues and how to fix them. Check the server console (`F8` in client) for error messages first.

## Boombox item does nothing

* Confirm `Config.BoomboxItem` matches the item name in your database exactly — it is case-sensitive.
* Verify the item is registered in your framework (see Items Setup).
* Check the server console on startup for any registration errors from moh-boombox.
* Make sure the player actually has the item in their inventory — use `/giveitem` to test.

## No sound plays

* Ensure `xsound` is started **before** `moh-boombox` in `server.cfg`.
* Confirm the YouTube URL is valid and in a supported format (see NUI Panel).
* Open the client console (`F8`) and look for CORS errors or fetch failures.
* Test with a known-working URL: `https://www.youtube.com/watch?v=dQw4w9WgXcQ`

## No interaction zone appears

* Check the server console for: *No target system configured*.
* Set `Config.TargetSystem` explicitly (e.g. `'ox_target'`) if auto-detection fails.
* Confirm the target resource is listed in `server.cfg` and shows as started.
* Make sure the target resource has no errors of its own in the console.

## Saved songs not loading

* Verify `oxmysql` is running and shows no startup errors.
* Check that the `boombox_songs` table exists in your database (it auto-creates on first start).
* Look for MySQL errors in the server console — they'll appear on resource start or on save attempts.

## `/stopallboombox` says "no permission"

* Check your `Config.IsAdmin` setup in `config.lua`.
* For ESX, the player's group must be `admin` or `superadmin`.
* For QBCore, the player must have `admin` or `god` permission.
* For ACE-based permissions: add `add_ace group.admin moh-boombox.admin allow` to `server.cfg`.

## Discord webhook not posting

* Confirm `Config.LogPlays = true`.
* Verify `Config.Webhook` is a valid Discord webhook URL — it should not still say `'WEBHOOK_HERE'`.
* Test the webhook URL in a tool like **Postman** with a sample POST request.
* Check that the Discord channel still has the webhook enabled and hasn't been deleted.

## Resource crashes on start

* Check `fxmanifest.lua` — verify all file paths match the actual file locations in your resource folder.
* Make sure `xsound` and `oxmysql` are both started and showing no errors before moh-boombox loads.
* Ensure you haven't accidentally edited files outside of `config.lua` (escrow-protected files can't be modified).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mohssins.gitbook.io/mohscriptsdocs/moh-boombox/troubleshooting.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
