# Troubleshooting

> Check UI access, MP3 filenames and delivery, live radio/HLS sources, music-reactive effects, boomboxes and client performance.

## UI and access

For a missing **Music import** tab, in-game upload errors or a saved song that was not added to its playlist, use the [MP3 upload checklist](/docs/scripts/sky-dj/features/music-import#limits-and-recovery). The tab requires On-demand MP3; player uploads also require the global switch, club permission and normal booth access.

<accordion>
<accordion-item label="/djadmin or another UI does not open">

Check that `sky_dj` started, then read the first server/F8 error. Confirm the effective `AdminCommand`, `CommandPermissions.djadmin` groups through Sky Base, the `sky_dj.djadmin` ACE or `AdminAce`; saved SQL settings may retain a different command. On `0.1.1`, an authorized menu request can establish initial character readiness; an unloaded character still cannot open it. Keep the matching manifest, new `config/sv_functions.lua` and complete source together.

After an update, install the complete matching runtime, including `source/html/index.html` and its hashed assets. The UI is already built; customers do not need a frontend toolchain. A mouse cursor alone does not confirm that the page loaded.

</accordion-item>

<accordion-item label="A DJ cannot operate a club">

Check the assigned job, minimum grade, console distance and routing bucket. Visible controls do not bypass server permissions.

</accordion-item>

<accordion-item label="Config changes do not apply">

With `Config.IngameSettings = true`, saved SQL settings override the managed file values. Use the in-game editor or deliberately select file mode in [Configuration](/docs/scripts/sky-dj/setup/configuration). Club/device layouts remain in SQL in either mode.

</accordion-item>

<accordion-item label="Saving reports a conflict or database error">

For a revision conflict, reload that section and reapply your edit. For a database error, inspect the first error and stored record before retrying: a timed-out write may already have committed, and that section can remain locked until restart.

Back up `sky_dj_state` before updates. Do not delete settings, clubs or playlists as an installation fix.

</accordion-item>
</accordion>

## Music and audio

On-demand delivery is optional. Both modes use original MP3s in the same `sky_dj/config/music/` folder. They require no separate converter or music-hosting service.

<accordion>
<accordion-item label="Music is missing or silent">

- Check the effective delivery mode/directory, assigned playlist, loaded track and deck-ready state.
- Verify the original `.mp3` exists in `config/music/`, with the exact saved filename. Linux paths are case-sensitive. The catalogue accepts at most 500 files and 50 MiB per file; it does not scan nested folders or symlinks.
- Check the [MP3 filename rules](/docs/scripts/sky-dj/setup/installation#mp3-filename-check). Parentheses, umlauts, `&`, `#`, typographic quotes and uppercase `.MP3` are rejected even when the manifest entry is present. Try one simple filename such as `Adrenalize - Epic Sax Song Original Mix.mp3`, then restart its owning resource and check the library.
- Keep the supplied optional music-pack manifest. Restart the owning resource after adding or replacing music so its pack and catalogue are rebuilt; changing the in-game delivery checkbox alone needs no restart.
- Install matching Lua, server JavaScript and the complete built `source/html/` together. A partial update can break the transfer protocol or metadata callbacks even when the mixer opens.
- Check deck faders, crossfader, master and speaker mute/level/range. Stand inside the speaker's listening area and check direction, room boundary and routing bucket.

Both modes need the original MP3 library. Do not delete saved playlists or SQL records to repair missing files. See [Installation](/docs/scripts/sky-dj/setup/installation).

</accordion-item>

<accordion-item label="Players still download music while connecting">

With the supplied manifest and `config/music/`, neither mode requests the music library automatically during connection. Normal requests the complete optional pack at first local MP3 use, including PFL. On-demand requests only songs currently needed by a deck, preview or audible club.

Test with a fresh-cache client outside a playing club. Spawning inside an audible club can start its music load after joining, which is different from an unconditional connection download.

Check for additional copies in ordinary client `files`, streamed assets or another resource. Advanced published-folder overrides also cause their own connection downloads. The checkbox cannot remove those copies, cancel an already started Normal pack download or erase FiveM's existing native cache.

</accordion-item>

<accordion-item label="The deck shows DURATION LOADING or its progress stops">

A cold On-demand track must finish transferring before duration, seeking and playback become ready. Increasing **MP3: loading …%** is progress, even when the total load takes more than 65 seconds. The player-facing label is neutral; the on-demand warning remains in administration. Each accepted block refreshes the playback reporter's inactivity timer; **65 seconds is not a total download limit**.

In Normal mode, the first optional-pack download can take longer. The player waits for that mount separately, with a bounded 30-minute observation period, then allows metadata to load. The entire library may be involved, even if only one track was selected.

If progress stalls, inspect the first F8 and server errors. On-demand transfer checks include an opening timeout, a 45-second wait for a pending block and a 60-second idle limit; the playback reporter also rejects a player with no metadata or loading progress for 65 seconds, except while a Normal pack mount is pending. An explicit **PLAYER ERROR** needs attention; increasing volume does not repair it. Check server load, network delivery and the complete matching resource/frontend update, then try loading the track again.

On-demand sends the prepared Ogg Opus data, or the original MP3 when conversion would not reduce its size, in 48 KiB blocks with at most four blocks ahead per transfer. The transfer metadata identifies the actual codec. These bounds and the configured per-player/global budgets do not guarantee a download time. Metadata alone starts no audio transfer.

</accordion-item>

<accordion-item label="On-demand transfers time out, report busy or fill the cache">

Keep original files within **50 MiB** each. **On-demand cache limit** defaults to **128 MiB per player** and accepts **64–512 MiB**. Loading reserves twice the delivered compressed file size, so an original 50 MiB MP3 needs 100 MiB only if it is delivered at that size; a smaller prepared Opus uses its actual transferred size. Active decoder memory is additional; tracks still used by decks or PFL cannot be evicted.

Unload unused decks and close private previews before retrying a cache-full error. Idle compressed tracks can be evicted; this temporary NUI cache is not a persistent music folder or IndexedDB store. A busy error can occur when the bounded transfer/hash queues are full. Retry after other loads complete; increasing every limit is not proof of multiplayer capacity.

On-demand delivery uses FiveM's latent events. Check whether your server configuration explicitly disabled [network-event reassembly](https://docs.fivem.net/docs/server-manual/server-commands/#sv_enableneteventreassembly-truefalse), which defaults to `true`. If it was disabled, restore `setr sv_enableNetEventReassembly true` so server and clients enable it. This restores the required transport; it is not a speed setting. Keep event limits bounded and check your artifact version if its behaviour differs.

</accordion-item>

<accordion-item label="On-demand encoder setup or preparation fails">

Normal mode does not need FFmpeg. For On-demand, retain `package.json` and `yarn.lock`, allow FiveM's built-in `yarn` builder to finish, and add `add_unsafe_child_process_permission "sky_dj"` to `server.cfg` before a full FXServer restart. A resource-only restart cannot apply a missing startup permission.

The first uncached song downloads the pinned server encoder automatically. Check outbound HTTPS, resource-folder write access and the first setup/preparation error. Advancing setup bytes or encoding progress represents work; a song queued behind another conversion is not an additional encoder process. One job runs at a time, with eight waiting jobs. The preparation path has bounded inactivity and total deadlines.

Do not publish `data/ffmpeg/`, `data/music-cache/`, installed dependencies or your private MP3s as client assets. Keep the original library selected, not the prepared cache directory. If the Yarn marker exists but dependencies are missing, stop the resource and follow [On-demand server preparation](/docs/scripts/sky-dj/setup/installation#on-demand-server-preparation).

</accordion-item>

<accordion-item label="Changing the delivery mode resets loading or seems not to apply">

Use `/djadmin` → **Settings → Music & Playlists → On-demand MP3**, confirm when enabling it, and save. With `Config.IngameSettings = true`, SQL owns this choice; editing the managed value in `config.lua` does not replace the saved setting. Existing saved choices survive updates, while a fresh installation defaults to Normal.

A successful save switches loaded sources live, cancels stale transfers and requests fresh player metadata. Current tracks may need to load again; preparation or an active automatic transition is reset while tracks and queues are retained. Reload a track if its interrupted request reports cancellation. You do not need another resource, a different music folder or a restart just to switch modes.

Switching to Normal can start its complete optional-pack download as soon as a deck or PFL opens an MP3. Switching back to On-demand cannot undo that download or erase the native cache. Adding or replacing music files remains a separate operation that needs the owning resource restarted. Never reset SQL to change delivery modes.

</accordion-item>

<accordion-item label="Audio crackles, drifts or transitions badly">

Start with neutral EQ, reasonable gains and an unclipped source file. Avoid unnecessary overlapping identical speakers; verify tower alignment delays, which deliberately change arrival time.

Compare two clients with the same track: steady playback, entering/leaving range, seek, loop and tempo changes. Note whether Main PA, booth or private PFL is affected. Shared timing cannot guarantee sample-exact playback or repair a corrupt source file.

</accordion-item>
</accordion>

## Livestreams and radio

Start with the [livestream setup guide](/docs/scripts/sky-dj/features/livestreams-and-radio). Direct broadcasts use the provider's HTTPS connection; they do not use the local MP3 pack or its on-demand encoder.

<accordion>
<accordion-item label="Enable livestreams or Add livestream is missing">

Install the complete matching Sky DJ update from your customer download if **Enable livestreams** does not exist. Preserve `config/music`, customer configuration and `sky_dj_state`; follow [Updating an existing installation](/docs/scripts/sky-dj/setup/installation#updating-an-existing-installation).

An administrator enables the feature under **Settings → Music & Playlists → Library & Queues**, then saves. The importer appears on **Playlists** after selecting an administrator-managed playlist. DJs can load assigned sources but cannot administer the shared library. With `IngameSettings = true`, changing the managed value in `config.lua` does not replace the saved SQL choice.

</accordion-item>

<accordion-item label="A live source is silent, fails or keeps reconnecting">

- Check a direct public HTTPS audio endpoint, not a provider's web page, and choose **Audio (MP3 / AAC / M4A)** or **HLS (.m3u8)** correctly. Choose HLS explicitly for an extensionless HLS endpoint.
- Confirm the provider supports browser playback and the required CORS access. HLS manifests, segments and keys must also be reachable; an HTTPS page alone does not establish that.
- Check the client's outbound connection to the provider and any separate delivery hosts. No extra incoming game-server port is needed. CORS is set by the stream provider, not a FiveM server firewall rule.
- Confirm the playlist is assigned to the club, the live deck is playing and Main PA/speaker output is audible. Pause and resume to open a fresh source connection after checking the provider.

A station opening in a normal browser does not guarantee that every FiveM client/build can play it. Read the first client/F8 error and check the exact installed client and complete resource update. Repeated reconnection does not repair an offline service, unsupported codec or denied access.

</accordion-item>

<accordion-item label="Live music plays but the lights do not follow it">

Livestream playback and Music Sync are separate options, both defaulting to off. Use global **Settings → Music synchronization**, the custom club's **Lights & effects → Music Sync**, or the festival **FOH → Music Sync** as appropriate; a venue's own response can work while the global enable switch is off.

Check the audible selected deck/mix, enabled response channels and device ON/Automatic state. Saving FOH Music Sync releases festival manual channel ownership; individual device OFF still wins. Test a clear rhythmic passage, not only speech or silence. YouTube/Spotify embedded players do not feed this analyzer. See [Live Music Sync](/docs/scripts/sky-dj/features/livestreams-and-radio#make-lights-and-effects-follow-the-broadcast).

</accordion-item>

<accordion-item label="Listeners hear the broadcast or its beat at different times">

Each listener and private PFL connection can buffer the upstream service independently. The shared show follows its eligible audio source, but cannot guarantee the same heard beat at the same instant for every listener. Moving speaker delay or a Music Sync sensitivity slider is not a general fix for the provider's different buffers.

Compare the same source and client build, test venue reentry and source recovery, and choose a provider suitable for the event. Live decks have no seek/loop/tempo controls to align individual connections manually.

</accordion-item>
</accordion>

## Effects and client performance

For a DJ microphone problem, first verify the selected Sky Base voice provider and matching Base update. PMA needs its public mute getter and recipient player scope; SaltyChat/Yaca use their normal PTT or voice activation and a range-based mode. Read [Microphone announcements](/docs/scripts/sky-dj/features/mixer-and-audio#microphone-announcements) before treating a voice issue as an MP3 or speaker-decoding failure.

<accordion>
<accordion-item label="Flames or CO₂ do not fire">

Trigger one device **without music** first. If it works but a preset does not, check the FOH's disabled-device counts and restore the relevant family or device to **Automatic**. Presets intentionally preserve device OFF.

Device OFF and All devices off cancel a manual burst. FOH channel OFF stops its show cues, but a separately triggered test can finish its timed window.

</accordion-item>

<accordion-item label="Music Sync does not react">

Check a ready playing track, audible deck/mix, enabled sync/channels and device ON/Automatic. Test a rhythmic passage as well as a quiet one.

**Normal clubs:** use global Settings → Music synchronization or that club's own Lights & effects → Music Sync controls. **Festival:** use the separate FOH → Music Sync page. A venue's own response can work while global synchronization is off. Save on the FOH page to release festival manual channel ownership; a global settings save does not do this. Individual device opt-outs still remain. For a live source, check the separate [livestream requirements](/docs/scripts/sky-dj/features/livestreams-and-radio). See [Lights and effects](/docs/scripts/sky-dj/features/lights-and-effects).

</accordion-item>

<accordion-item label="How do I capture an effect diagnostic?">

Run `vantisfxstats` in client F8 **during an expected burst**. This legacy-named, on-demand report shows defined/streamed/visible devices, requested/alive effects, dictionary/model waits, budget waits and native start failures.

Zero requested effects is normal between finite cues. Include the preset, participation counts and whether the single-device test worked; a visible prop alone does not mean emission was requested.

</accordion-item>

<accordion-item label="The festival raises resmon time or lowers FPS">

**Festival grounds can increase client resmon time and GPU load.** Compare the same position with grounds disabled/enabled and effects idle/active. Check FPS too: stable resmon does not establish low GPU cost, and no fixed resmon/FPS value is guaranteed.

Include an in-game measurement and effect diagnostic. Browser previews and mock-native tests cannot prove FiveM visibility or performance.

</accordion-item>
</accordion>

## Boombox and map checks

<accordion>
<accordion-item label="The boombox menu, range or Spotify behaves unexpectedly">

The menu opens after placement is accepted. Cancelling a new placement should create no device and consume no item. Range is server-wide, with no per-device slider. Spotify Embed is personal playback, not a shared spatial stream. See [Boombox](/docs/scripts/sky-dj/features/boombox).

</accordion-item>

<accordion-item label="Old map geometry or LODs remain after an update">

Install the full updated resource, completely exit FiveM and relaunch. Check for duplicate older copies or another map editing the area. Compare with `sky_dj` stopped; report terrain/LOD issues separately from audio.

</accordion-item>
</accordion>

## Support

Include the resource version, reproduction steps, affected track/device, delivery mode and relevant server/F8 errors. For effects, add the diagnostic above and an in-game screenshot or measurement. Omit passwords, database credentials and private URLs.

<u-button color="neutral" icon="i-simple-icons-discord" label="Join Discord" target="_blank" to="https://discord.gg/sky-systems" variant="subtle">



</u-button>
