GCMod

Troubleshooting

Common issues and implementation notes for gcm-reports.


Admin panel does not open

Possible Causes

  • ox_lib did not load before gcm_reports.
  • Framework detection failed during startup.
  • Staff resolution path (Custom.getStaffLevel or DB group mapping) is incorrect.

Fix

  • Ensure ox_lib starts before gcm_reports.
  • Confirm framework detection in startup logs.
  • Validate staff level and group assignment data.

SQL errors on startup or empty panel data

Possible Causes

  • Table names differ between SQL schema and runtime code.
  • Schema was not imported or was imported partially.

Fix

  • Align DB table names with runtime queries.
  • Re-import schema and validate expected tables/columns.

Screenshot returns empty URL

Possible Causes

  • screenshot-basic is not running.
  • Config.discordWebhook is invalid or unreachable.
  • Target player is offline.
  • Staff group lacks screenshot permission.

Fix

  • Start screenshot-basic and retest.
  • Validate webhook format and connectivity.
  • Confirm target player is connected.
  • Grant screenshot permission to the staff group.

Inventory quick action does nothing

Possible Causes

  • Detected inventory backend is qs-inventory or codem-inventory, which is not currently bridged for admin inventory opening.
  • Your server replaced the shipped custom/server.lua adapter with a partial implementation.
  • The detected backend export or identifier lookup fails for the target player.

Fix

  • Use one of the currently supported open-inventory adapters: ox_inventory, qb-inventory, ps-inventory, origen_inventory, core_inventory, tgiann-inventory, or jpr-inventory.
  • If your stack uses qs-inventory or codem-inventory, add a backend-specific Custom.openPlayerInventory(source, target) implementation.
  • Validate Custom.getIdentifier(source) for frameworks that depend on identifier-based inventory access.

Clothing quick action fails

Possible Causes

  • Detected clothing resource is not one of the bridged menu paths.
  • Custom server removed or broke Custom.openClothingMenu(source).
  • The backend uses a different event than the stock adapter expects.

Fix

  • Validate the detected clothing resource in startup logs.
  • Review custom/server.lua and confirm Custom.openClothingMenu(source) still matches your clothing script.
  • If using a customized appearance resource, replace the trigger with the correct menu event.

Revive quick action fails

Possible Causes

  • No supported ambulance resource is active.
  • Your framework fallback event does not match the installed medical script.
  • Custom.revivePlayer(source) was overwritten or removed.

Fix

  • Start one supported ambulance backend: qb-ambulancejob, qbx_medical, wasabi_ambulance, or esx_ambulancejob.
  • If your server uses a different medical system, adapt Custom.revivePlayer(source) to its event/export.
  • Confirm the detected ambulance backend is printed during resource startup.

Staff cannot access admin features

Possible Causes

  • Custom.getIdentifier is unstable.
  • Staff group JSON is invalid.
  • Missing group_id assignment in gcm_reports_staff.

Fix

  • Ensure identifier resolution is deterministic.
  • Validate JSON payloads and schema values.
  • Assign group_id properly and refresh permissions callbacks.

Spectate flow not tracked server-side

Possible Causes

  • Spectate action runs only through client trigger (txcl:spectate:start).
  • No additional server audit hooks are implemented.

Fix

  • Add explicit server-side audit/cleanup handlers for spectate transitions.
  • Register internal logging for start/stop spectate events.

Implementation Risk Notes

These notes highlight potential edge cases or improvements in the current implementation.

Schema Drift Risk

Current documentation and code indicate potential schema mismatch risk between shipped SQL and runtime table access.

Inventory Adapter Gap

Admin inventory opening is still not bridged for qs-inventory and codem-inventory in the current implementation. Detection alone is not enough for that quick action.