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

# Troubleshooting

Fix common dm-chat installation, focus, command, proximity, name, media, icon, and integration problems.

## Two chat interfaces appear

The default FiveM `chat` resource or another custom chat is still running. Remove its `ensure` line and keep:

```cfg
ensure ox_lib
ensure dm-chat
```

Restart the server after changing the start list.

## Pressing T does not open chat

1. Confirm `dm-chat` is started in the server console.
2. Confirm `ox_lib` starts before it.
3. Check F8 for the first Lua or NUI error.
4. Stop other chat or input resources temporarily to test for a focus conflict.
5. Run `restart dm-chat` and try again.

The input uses FiveM control `245`, normally bound to `T`.

## Plain text closes without sending

This interface submits commands only. Begin the input with `/` and use `/say` for a normal global message:

```
/say Hello everyone
```

Submitting `Hello everyone` without the slash closes the chat without routing a message.

## A disabled command still appears in suggestions

The resource registers its built-in suggestions independently of the feature switches. Setting `Config.EnableGifs = false`, for example, prevents `/gif` from doing anything but does not guarantee its static suggestion disappears.

Restart the resource after changing config. If you also want the suggestion removed, remove or condition the matching `chat:addSuggestion` registration in `server/main.lua`.

## clearall says permission denied

Grant the command ACE to the correct group:

```cfg
add_ace group.admin command.clearall allow
```

Confirm that your framework's administrator principal inherits `group.admin`, or grant `command.clearall` to the principal your server actually uses.

## Player names are Steam or FiveM names

This is the default behavior. `getCharName` currently returns `GetPlayerName(source)`, and `/ooc` calls that native directly. Connect the function to your framework as shown in [Configuration](/devmosaic/resources/devmosaic-dm-chat/configuration.md).

## Nearby players cannot see me, do, or OOC

Check the exact config keys and values:

```lua
Config.MeDoeDistanc = 15.0
Config.OOCDistanc = 20.0
```

Also confirm both players are streamed to one another. The above-head `/me` and `/do` popup uses a separate built-in range of 25 units, while the feed entry uses `MeDoeDistanc`.

## A popup disappears or moves off the player

Popups last five seconds and are hidden when the speaker is outside 25 units, off-screen, or no longer streamed. These limits are part of `client/main.lua`, not `config.lua`.

## A GIF does not display

Use a public direct URL whose path ends in `.gif`. A Tenor, Giphy, or image-host page URL usually returns HTML and will not render as a GIF popup.

Open the exact URL in a private browser window. It should load the image itself without authentication or redirects to a webpage.

## Music does not play

| Check                        | Fix                                                                 |
| ---------------------------- | ------------------------------------------------------------------- |
| Feature disabled             | Set `Config.EnableMusic = true`                                     |
| URL rejected                 | Use a complete URL beginning with `http://` or `https://`           |
| Direct audio fails           | Use a public playable audio URL rather than a download page         |
| YouTube fails                | Use a normal `youtube.com` or `youtu.be` URL that permits embedding |
| Expected everyone to hear it | `/music` is intentionally sent only to the command caller           |

Starting a new music or video command replaces the currently active media card.

## Video is rejected

`/video` accepts only full YouTube links beginning with HTTP(S) and containing `youtube.com` or `youtu.be`. Other video providers and direct MP4 URLs are not accepted by this command.

## Fonts or icons are missing

The NUI loads Google Fonts and Font Awesome from public CDNs. Check client network access to `fonts.googleapis.com` and `cdnjs.cloudflare.com`, then review the F8 console for blocked requests.

## The server reports a missing majesticons SVG

The manifest lists `web/majesticons_chat-line.svg`. If that file is missing from your release, restore it from the original package. If your customized UI does not use it, remove that exact file entry from `fxmanifest.lua` to clear the warning.

## Config changes do not appear

1. Save `config.lua` as UTF-8.
2. Run `restart dm-chat`.
3. Reopen chat so the refreshed settings reach the NUI.
4. Check the server console and F8 for the first error.

For web-file changes, restart the resource to reload the NUI. There is no build command.

## Messages from another resource do not display correctly

Start with the standard `args` format:

```lua
TriggerClientEvent('chat:addMessage', source, {
    color = { 255, 255, 255 },
    args = { 'SYSTEM', 'Test message' }
})
```

If that works, compare the other resource's custom template or message type with [Exports and Integrations](/devmosaic/resources/devmosaic-dm-chat/exports-and-integrations.md). A type set to `true` in `Config.DisabledTypes` is intentionally hidden.
