# Troubleshooting

Practical fixes for common setup and runtime issues.

## Turn on debug output first

Set `Config.Debug = true` in `config.lua` and restart the resource. Every step is printed to the F8 console on the client and to the server console. Turn it off again when you are done.

## No presence at all

- The player must use the **Discord desktop app**. Discord in a browser cannot show FiveM Rich Presence.
- In Discord, *User Settings → Activity Privacy → Share your detected activities* must be on.
- Check `Config.Discord.AppId`. If F8 shows `Config.Discord.AppId is not set`, paste your Application ID from the [Discord application](#/docs/wd_richpresence/discord-app) page.
- Restart FiveM after starting Discord, if Discord was opened after the game.

## Presence flickers or shows another server name

Another resource is also setting Discord Rich Presence, and the two keep overwriting each other. On Qbox, this is usually the built-in presence in `qbx_core`, which is on by default. Follow [Turn off other Rich Presence scripts](#/docs/wd_richpresence/installation?section=2-turn-off-other-rich-presence-scripts) for exact steps for Qbox, QBCore and ESX, and how to find any other presence script.

## Logo not showing

The asset name in `config.lua` does not exactly match the name in the Developer Portal, or the asset was uploaded less than 15 minutes ago. Asset names are case sensitive.

## Buttons not visible

Discord never shows you your own buttons. Check from a second account. Also make sure each URL starts with `https://`; other links are skipped.

## Character photo never appears

Check the server console after a restart:

- `Mugshots disabled: Fivemanage API key missing`: add your token. See [Image hosting](#/docs/wd_richpresence/image-hosting).
- `Mugshots disabled: self-hosting needs ServerConfig.SelfHosted.PublicUrl…`: set `PublicUrl` to your HTTPS domain.
- `Mugshot uploads will fail: server/http.js did not load…`: a file is missing from the resource folder. Upload the resource again, complete.
- `Mugshot upload failed`: the host refused the photo. The message includes the host's own reason. Check that your API key is still valid, or that your domain still forwards the photo path.

Also check that `Config.Mugshot.Enabled` is `true`, and wait at least five seconds after loading a character.

## Self-hosted photos do not load

The proxy is not forwarding the photo path. Test it:

1. Set `Config.Debug = true` and restart, then load a character.
2. Copy the `Stored mugshot for …` link from the server console and open it in a browser.

If the browser shows nothing, fix your reverse proxy or DNS record before checking Discord. See [Image hosting](#/docs/wd_richpresence/image-hosting?section=4-test-it). `PublicUrl` must start with `https://`; Discord refuses plain `http://` links.

## Photo shows an old outfit

Your clothing script's save event is missing from `Config.AppearanceEvents`. Add it as described in [Character photos](#/docs/wd_richpresence/mugshots), or wait for the automatic check. Players can also type `/refreshmugshot`. Uploads are limited to one every 2 minutes per player, so a very recent upload delays the next one.

## `rate_limited` in the debug output

This is normal. Each player can upload one photo every 2 minutes, and the resource retries automatically when the cooldown ends.

## Framework shows as standalone

The server console shows `Framework: standalone` or `is not running, using standalone mode`. Start `wd_richpresence` **after** your framework in `server.cfg`, or set `Config.Framework` to your framework.

## Name or job is wrong

- Name shows `Unknown` or job shows `Unemployed`: the character has not finished loading, or the resource is in standalone mode.
- To show a different job name, add it to `JobLabels`. See [Presence text](#/docs/wd_richpresence/presence).

## Restarting the resource

Restarting `wd_richpresence` while players are online is safe. Loaded characters are picked up again automatically, and saved photos are reused without uploading.
