Skip to main content

Troubleshooting Guide

Common issues and solutions for Hyperscape development and deployment.

Quick Diagnosis

Symptoms → Solutions

WebGPU Issues

Black Screen / “WebGPU is REQUIRED”

Symptoms:
  • Browser shows black screen
  • Console error: “WebGPU is REQUIRED but not available”
  • Game doesn’t render
Diagnosis:
Solutions:
  1. Update Browser:
  2. Enable Hardware Acceleration:
    • Chrome: chrome://settings → Advanced → System → “Use hardware acceleration”
    • Safari: Preferences → Advanced → “Use hardware acceleration”
  3. Update GPU Drivers:
  4. Check Browser Flags (Chrome):
    • Visit chrome://flags
    • Search “WebGPU”
    • Ensure “Unsafe WebGPU” is enabled

WebGPU Initialization Failed

Symptoms:
  • WebGPU detected but renderer fails to initialize
  • Error: “Renderer initialization FAILED”
Solutions:
  1. Check GPU Compatibility:
  2. Try Different Browser:
    • Chrome usually has best WebGPU support
    • Edge is second-best
    • Safari requires macOS 15+
  3. Disable Browser Extensions:
    • Some extensions interfere with WebGPU
    • Try incognito/private mode

Streaming Issues

”Cannot establish WebGPU-capable rendering mode”

Symptoms:
  • Vast.ai deployment fails
  • Error in deploy logs
  • Streaming doesn’t start
Diagnosis:
Solutions:
  1. Verify NVIDIA GPU:
  2. Check Vulkan ICD:
  3. Verify Display Server:
  4. Check DRI Devices:

Audio Not Capturing

Symptoms:
  • Stream has video but no audio
  • FFmpeg error: “pulse: Connection refused”
Diagnosis:
Solutions:
  1. Restart PulseAudio:
  2. Fix Permissions:
  3. Verify Sink:

Stream Stalls/Buffering

Symptoms:
  • Viewers experience buffering
  • Stream freezes intermittently
  • FFmpeg warnings about buffer
Solutions:
  1. Increase GOP Size:
  2. Enable Low Latency:
  3. Check Network:
  4. Reduce Bitrate:

CDP Capture Stalls

Symptoms:
  • “CDP capture stalled” warnings
  • No frames for 30+ seconds
  • Automatic recovery attempts
Automatic Recovery:
  • System tries soft recovery (restart screencast)
  • Falls back to hard recovery (restart browser)
  • Switches to MediaRecorder after 6 failures
Manual Recovery:

Authentication Issues

Characters Vanishing

Symptoms:
  • Characters disappear after page refresh
  • Character select shows no characters
  • New character created every time
Cause: Missing Privy credentials → anonymous mode → new user ID each refresh Solution:
  1. Get Privy Credentials:
  2. Configure Client:
  3. Configure Server:
  4. Restart:

Asset Loading Issues

404 Errors for Models/Avatars

Symptoms:
  • Console errors: “Failed to load resource: 404”
  • Missing 3D models
  • Avatars don’t appear
Cause: CDN container not running Solution:

Git LFS Files Not Downloaded

Symptoms:
  • Asset files are tiny (< 1KB)
  • Models don’t load
  • Textures are missing
Solution:

Database Issues

Schema Errors / Stale Data

Symptoms:
  • “column does not exist” errors
  • “relation does not exist” errors
  • Old data after pulling updates
Cause: Database schema out of sync with code Solution (⚠️ Deletes all local data):

Connection Refused

Symptoms:
  • “ECONNREFUSED” errors
  • “Connection refused” in logs
Solutions:
  1. Check Docker:
  2. Check Port:
  3. Check DATABASE_URL:

Port Conflicts

”Address already in use”

Symptoms:
  • Error: “EADDRINUSE”
  • Server won’t start
Diagnosis:
Solutions:

Build Issues

Build Fails

Symptoms:
  • TypeScript errors
  • “Cannot find module” errors
  • Build hangs
Solutions:
  1. Clean Build:
  2. Build Order:
  3. Check Bun Version:

PhysX Build Fails

Symptoms:
  • PhysX WASM build errors
  • Missing physx-js-webidl.wasm
Solution: PhysX is pre-built and committed. If you need to rebuild:

Test Failures

Tests Timeout

Symptoms:
  • Tests hang indefinitely
  • Playwright timeout errors
Solutions:
  1. Kill Existing Servers:
  2. Increase Timeout:
  3. Check Logs:

Visual Tests Fail

Symptoms:
  • Screenshot comparison failures
  • “WebGPU not available” in tests
Solutions:
  1. Use Headful Browser:
  2. Enable WebGPU Flags:

AI Agent Issues

Agents Not Responding

Symptoms:
  • Agents stand still
  • No LLM calls in logs
  • “Action lock” messages
Diagnosis:
Solutions:
  1. Check API Keys:
  2. Check Movement State:
  3. Restart Agents:

High LLM Costs

Symptoms:
  • Unexpected API bills
  • Many LLM calls per minute
Solutions:
  1. Enable Optimizations:
    • Action locks (automatic)
    • Fast-tick mode (automatic)
    • Short-circuit decisions (automatic)
  2. Check Call Frequency:
  3. Reduce Agent Count:

Deployment Issues

Railway Deployment Fails

Symptoms:
  • Build fails in Railway
  • “Out of memory” errors
Solutions:
  1. Check Build Logs:
    • Railway dashboard → Deployments → View logs
  2. Increase Memory:
    • Railway dashboard → Settings → Resources
    • Increase memory limit
  3. Check Environment Variables:
    • Railway dashboard → Variables
    • Verify all required vars are set

Vast.ai Deployment Fails

Symptoms:
  • GitHub Actions workflow fails
  • SSH connection errors
  • GPU validation errors
Solutions:
  1. Check GitHub Secrets:
    • Repository → Settings → Secrets
    • Verify: VAST_HOST, VAST_PORT, VAST_SSH_KEY
  2. Check Vast.ai Instance:
    • Vast.ai dashboard → Instances
    • Verify instance is running
    • Check SSH port is correct
  3. Check GPU:

Performance Issues

Low FPS

Symptoms:
  • Game runs slowly
  • FPS < 30
Solutions:
  1. Check GPU Usage:
    • Browser DevTools → Performance
    • Should show GPU activity
  2. Reduce Graphics Settings:
    • In-game settings → Graphics
    • Lower shadow quality
    • Reduce view distance
  3. Check CPU Usage:

High Memory Usage

Symptoms:
  • Browser uses >4GB RAM
  • “Out of memory” errors
Solutions:
  1. Restart Browser:
    • Close and reopen browser
    • Clears WebGPU memory leaks
  2. Reduce Instance Count:
    • Fewer trees/rocks in view
    • Lower LOD distances
  3. Check for Leaks:

Network Issues

WebSocket Connection Failed

Symptoms:
  • “WebSocket connection failed”
  • “Connection refused”
  • Can’t connect to server
Solutions:
  1. Check Server Running:
  2. Check WebSocket URL:
  3. Check Firewall:

High Latency

Symptoms:
  • Actions feel delayed
  • Rubber-banding
  • Lag spikes
Solutions:
  1. Check Network:
  2. Check Server Load:
  3. Reduce Tick Rate:

CSP Violations

”Refused to load script”

Symptoms:
  • Console error: “Refused to load the script”
  • External resources blocked
Solutions:
  1. Check CSP Policy:
  2. Add to Allowlist:
  3. Verify Source is Trusted:
    • Only add trusted CDNs
    • Verify HTTPS
    • Check for SRI hashes

Common Error Messages

”No screens found” (Xorg)

Cause: DRI/DRM devices not available Solution: Script automatically falls back to Xvfb

”swrast” in Xorg logs

Cause: NVIDIA driver failed, using software rendering Solution: Script detects this and switches to Xvfb

”Execution context was destroyed”

Cause: Page navigation during operation Solution: Transient error, automatically retried

”Target page, context or browser has been closed”

Cause: Browser closed during operation Solution: Restart streaming process

Getting Help

Before Asking for Help

  1. Check this guide for your specific issue
  2. Check logs:
  3. Check documentation:

Reporting Issues

Include in your issue report:
  1. Environment:
    • OS and version
    • Browser and version
    • Node/Bun version
    • GPU model
  2. Steps to Reproduce:
    • Exact commands run
    • Configuration used
    • Expected vs actual behavior
  3. Logs:
    • Server logs (bunx pm2 logs)
    • Browser console errors
    • Test output (if applicable)
  4. Screenshots:
    • Error messages
    • Browser DevTools
    • Visual issues

Support Channels

Diagnostic Commands

System Info

Service Status

Network Diagnostics

References