Troubleshooting
Common issues and solutions for Oxide Vending.
Database Issues
Tables Not Created
Symptom: Errors about missing tables on startup.
Solution:
- Run
sql/install.sqlin your database - Verify tables exist:
SHOW TABLES LIKE 'vending_%'; - Check MySQL permissions
Progression Table Missing
Symptom: [oxide-vending] WARNING: Could not load progression data
Solution:
- The progression tables are included in
sql/install.sql - If upgrading from older version, verify tables exist:
SELECT * FROM vending_progression LIMIT 1; SELECT * FROM vending_milestones LIMIT 1;
Foreign Key Errors
Symptom: Cannot add or update a child row: a foreign key constraint fails
Solution:
- Delete data in child tables first
- Or use
SET FOREIGN_KEY_CHECKS = 0;temporarily - Ensure parent records exist before creating children
Resource Startup Issues
Resource Won't Start
Symptom: Resource fails to start or immediately stops.
Checklist:
- Verify all dependencies are started first. The required resources depend on your framework:
- Always required:
oxmysql,ox_lib - QBCore:
qb-core,qb-target,qb-inventory,qb-radialmenu,qb-input - QBx:
qbx_core,ox_target,ox_inventory - ESX:
es_extended,ox_target, optionallyox_inventory - Standalone:
ox_inventory,ox_target
- Always required:
- Check for Lua syntax errors in server console
- Verify
fxmanifest.luais valid
Dependencies Not Found
Symptom: SCRIPT ERROR: @oxide-vending/...lua: attempt to index a nil value
Solution:
- Check the server console for the bridge detection message to confirm which framework was detected
- Ensure your framework's core resource is starting before oxide-vending
- Check resource start order in
server.cfg - If auto-detection fails, try setting
Config.BridgeOverrideinconfig/config.lua
Framework Bridge Issues
Framework Not Detected
Symptom: Bridge falls back to standalone when you expected QBCore/ESX.
Solution:
- Ensure your framework resource is started before oxide-vending in
server.cfg - Check that the framework resource name matches what the bridge expects (
qb-core,qbx_core,es_extended) - Set
Config.BridgeOverrideinconfig/config.luato force the correct framework
Standalone Items Not Loading
Symptom: Items list is empty or QBCore.Shared.Items has no entries in standalone mode.
Solution:
- Verify
ox_inventoryis started and has items configured - Check that
Config.StandaloneInventory.GetItemListreturns the correct item registry - Items are synced to clients via the
oxide-vending:bridge:syncItemsevent on player load
ESX Inventory Operations Failing
Symptom: Players can't stock/purchase items on ESX.
Solution:
ox_inventoryis auto-detected when running — no manual config needed- Check that your inventory resource is started before oxide-vending
- Verify items exist in your inventory system's item registry
Warehouse Issues
Warehouse Access Code Not Working
Symptom: Can't enter warehouse with correct code.
Checklist:
- Verify business owns a warehouse: check
vending_warehousestable - Ensure business level meets
Config.Warehouse.RequiredLevel - Check bucket ID assignment in server console
Stuck in Warehouse Instance
Symptom: Player can't leave warehouse or is in wrong routing bucket.
Solution:
- Reconnecting should restore the player to the normal world
- Check
PlayerBucketscache in server for the player's current bucket - As a last resort, admin can use
SetPlayerRoutingBucketto return player to bucket 0
Warehouse Inventory Missing
Symptom: Items added to warehouse don't appear.
Checklist:
- Check
vending_business_inventorytable in database - Verify
BusinessInventorycache is in sync - Check server console for MySQL errors during warehouse operations
Machine Issues
Machines Not Spawning
Symptom: Placed machines don't appear in-game.
Checklist:
- Check
Config.Debug = truefor spawn logs - Verify machine coords in database are valid
- Check for model streaming issues:
-- In client console local model = GetHashKey('prop_vend_soda_01') print('Model valid:', IsModelValid(model)) - Ensure player is in range for entity spawning
Machine Placement Fails
Symptom: Can't place machines, preview doesn't appear.
Checklist:
- Verify player has a business
- Check machine limit (
GetMaxMachines) - Ensure machine type is unlocked
- Check for blocked zones
- Verify minimum distance from other machines
Interaction Not Working
Symptom: Can't interact with placed machines.
Checklist:
- Verify your target resource is running (
qb-targetfor QBCore,ox_targetfor QBx/ESX/Standalone) - Check interaction distance in config
- Ensure machine status is
active - Check for conflicting target zones
Banking Issues
Revenue Not Depositing
Symptom: Revenue collected but money not received.
Diagnosis:
/vendingdebug bank [businessId]
Common causes:
oxide-bankingnot started- Business account doesn't exist
- Owner offline (fallback mode)
Business Account Missing
Symptom: ACCOUNT NOT FOUND in debug output.
Solution:
- Check account name format:
vending-{business_id} - Manually create account in oxide-banking
- Or disable
Config.UseBankingto use fallback
Fallback Mode Issues
Symptom: Banking works but requires owner online.
Explanation: Without oxide-banking:
- Revenue goes to owner's QB bank account
- Owner must be online for some operations
- Consider installing oxide-banking for full functionality
NPC Sales Issues
NPC Sales Not Generating
Symptom: No NPC sales appearing in transactions.
Checklist:
- Verify NPC sales enabled:
/vendingnpc toggle - Check machine has stock
- Check machine status is
active - Force a tick:
/vendingnpc force - Check
Config.NPCSales.Enabled
Low NPC Revenue
Symptom: NPC sales are rare or low value.
Consider:
- Machine location (check hotzones)
- Time of day (night = low sales)
- Machine type (electronics = rare)
- Price competitiveness (high markup = fewer sales)
- Stock availability (empty slots = lower multiplier)
- Competition (nearby cheaper machines)
NPC Sales Stats Show Zero
Symptom: /vendingnpc stats shows 0 sales.
Note: Stats reset on resource restart. This is expected behavior.
Progression Issues
Progression Not Tracking
Symptom: XP and level not updating.
Checklist:
- Verify
Config.Progression.Enabled = true - Check if business has progression record:
/vendingdebug progression status - Create missing records:
/vendingdebug progression init
Business Stuck at Level 1
Symptom: Has enough XP but won't level up.
Explanation: Level up requires BOTH:
- XP threshold met
- Revenue milestone met
Check both values in progression data.
Daily Bonus Not Working
Symptom: Can't claim daily bonus or streak resets.
Diagnosis:
/vendingdebug daily [businessId]
Common issues:
- Already claimed today (check date comparison)
- Timezone issues (uses UTC internally)
- Database date format mismatch
Milestones Not Triggering
Symptom: Reached milestone value but no XP bonus.
Possible causes:
- Milestone already claimed (check
vending_milestonestable) - Progression notifications disabled
- Value crossed during offline period
Dashboard Issues
Dashboard Won't Open
Symptom: /vdb command does nothing.
Checklist:
- Verify player has business or is employee
- Check for NUI errors in F8 console
- Verify HTML files exist in
html/directory - Check for JavaScript errors in browser console
Dashboard Shows No Data
Symptom: Dashboard opens but displays blank.
Checklist:
- Check server callbacks are registered
- Verify database connectivity
- Check for Lua errors in server console
- Ensure business has data to display
Map Not Displaying
Symptom: Map tab shows no machines or broken image.
Checklist:
- Verify
html/img/gta-map.pngexists - Check machine has valid coordinates
- Verify coordinate conversion is correct
Performance Issues
Server Lag
Symptom: Server performance drops with oxide-vending.
Optimization tips:
- Increase
Config.NPCSales.TickInterval - Reduce transaction history
RetentionDays - Enable transaction pruning
- Check for runaway loops in console
Client FPS Drops
Symptom: FPS drops near vending machines.
Possible causes:
- Too many machines in small area
- Complex models streaming
- Dashboard open with lots of data
Common Error Messages
"You do not have access to a vending business"
Player is not an owner or employee of any business.
"Machine type not unlocked"
Business level too low for that machine type. Check Progression for unlock requirements.
"Maximum machines reached"
Business has reached its machine limit for current level.
"Not enough money"
Player or business account lacks funds for purchase.
"Item not allowed in this machine type"
Item is not in the whitelist for that machine type.
"Price out of range"
Set price is below minimum or above maximum markup for the item.
"Rate limited" / "Too many requests"
Player is performing actions too quickly. All actions have configurable cooldowns and window-based limits. Wait a moment and try again. If this happens frequently during normal use, consider adjusting RateLimitConfig values in server/main.lua.
Debug Mode
Enable debug logging for detailed information:
-- config/config.lua
Config.Debug = true
This adds verbose logging for:
- Machine spawning/despawning
- NPC sales simulation
- Cache operations
- Progression changes
Getting Help
If issues persist:
- Check server console for errors
- Check F8 client console for errors
- Enable
Config.Debug = true - Check database for data integrity
- Verify all dependencies are correct versions