Troubleshooting Guide
Common issues and solutions for Hyperscape development and deployment.Quick Diagnosis
Symptoms → Solutions
| Symptom | Likely Cause | Solution |
|---|---|---|
| Black screen in browser | WebGPU unavailable | WebGPU Issues |
| Characters vanishing | Missing Privy credentials | Authentication Issues |
| Assets not loading (404) | CDN not running | Asset Loading Issues |
| Stream not working | GPU/display issues | Streaming Issues |
| Database errors | Schema mismatch | Database Issues |
| Port conflicts | Services already running | Port Conflicts |
WebGPU Issues
Black Screen / “WebGPU is REQUIRED”
Symptoms:- Browser shows black screen
- Console error: “WebGPU is REQUIRED but not available”
- Game doesn’t render
-
Update Browser:
- Chrome 113+ (recommended)
- Edge 113+
- Safari 18+ (macOS 15+)
- Check: https://webgpureport.org
-
Enable Hardware Acceleration:
- Chrome:
chrome://settings→ Advanced → System → “Use hardware acceleration” - Safari: Preferences → Advanced → “Use hardware acceleration”
- Chrome:
- Update GPU Drivers:
-
Check Browser Flags (Chrome):
- Visit
chrome://flags - Search “WebGPU”
- Ensure “Unsafe WebGPU” is enabled
- Visit
WebGPU Initialization Failed
Symptoms:- WebGPU detected but renderer fails to initialize
- Error: “Renderer initialization FAILED”
-
Check GPU Compatibility:
-
Try Different Browser:
- Chrome usually has best WebGPU support
- Edge is second-best
- Safari requires macOS 15+
-
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
-
Verify NVIDIA GPU:
-
Check Vulkan ICD:
-
Verify Display Server:
-
Check DRI Devices:
Audio Not Capturing
Symptoms:- Stream has video but no audio
- FFmpeg error: “pulse: Connection refused”
-
Restart PulseAudio:
-
Fix Permissions:
-
Verify Sink:
Stream Stalls/Buffering
Symptoms:- Viewers experience buffering
- Stream freezes intermittently
- FFmpeg warnings about buffer
-
Increase GOP Size:
-
Enable Low Latency:
-
Check Network:
-
Reduce Bitrate:
CDP Capture Stalls
Symptoms:- “CDP capture stalled” warnings
- No frames for 30+ seconds
- Automatic recovery attempts
- System tries soft recovery (restart screencast)
- Falls back to hard recovery (restart browser)
- Switches to MediaRecorder after 6 failures
Authentication Issues
Characters Vanishing
Symptoms:- Characters disappear after page refresh
- Character select shows no characters
- New character created every time
-
Get Privy Credentials:
- Sign up: https://dashboard.privy.io
- Create app
- Copy App ID and App Secret
-
Configure Client:
-
Configure Server:
-
Restart:
Asset Loading Issues
404 Errors for Models/Avatars
Symptoms:- Console errors: “Failed to load resource: 404”
- Missing 3D models
- Avatars don’t appear
Git LFS Files Not Downloaded
Symptoms:- Asset files are tiny (< 1KB)
- Models don’t load
- Textures are missing
Database Issues
Schema Errors / Stale Data
Symptoms:- “column does not exist” errors
- “relation does not exist” errors
- Old data after pulling updates
Connection Refused
Symptoms:- “ECONNREFUSED” errors
- “Connection refused” in logs
-
Check Docker:
-
Check Port:
-
Check DATABASE_URL:
Port Conflicts
”Address already in use”
Symptoms:- Error: “EADDRINUSE”
- Server won’t start
Build Issues
Build Fails
Symptoms:- TypeScript errors
- “Cannot find module” errors
- Build hangs
-
Clean Build:
-
Build Order:
-
Check Bun Version:
PhysX Build Fails
Symptoms:- PhysX WASM build errors
- Missing physx-js-webidl.wasm
Test Failures
Tests Timeout
Symptoms:- Tests hang indefinitely
- Playwright timeout errors
-
Kill Existing Servers:
-
Increase Timeout:
-
Check Logs:
Visual Tests Fail
Symptoms:- Screenshot comparison failures
- “WebGPU not available” in tests
-
Use Headful Browser:
-
Enable WebGPU Flags:
AI Agent Issues
Agents Not Responding
Symptoms:- Agents stand still
- No LLM calls in logs
- “Action lock” messages
-
Check API Keys:
-
Check Movement State:
-
Restart Agents:
High LLM Costs
Symptoms:- Unexpected API bills
- Many LLM calls per minute
-
Enable Optimizations:
- Action locks (automatic)
- Fast-tick mode (automatic)
- Short-circuit decisions (automatic)
-
Check Call Frequency:
-
Reduce Agent Count:
Deployment Issues
Railway Deployment Fails
Symptoms:- Build fails in Railway
- “Out of memory” errors
-
Check Build Logs:
- Railway dashboard → Deployments → View logs
-
Increase Memory:
- Railway dashboard → Settings → Resources
- Increase memory limit
-
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
-
Check GitHub Secrets:
- Repository → Settings → Secrets
- Verify:
VAST_HOST,VAST_PORT,VAST_SSH_KEY
-
Check Vast.ai Instance:
- Vast.ai dashboard → Instances
- Verify instance is running
- Check SSH port is correct
-
Check GPU:
Performance Issues
Low FPS
Symptoms:- Game runs slowly
- FPS < 30
-
Check GPU Usage:
- Browser DevTools → Performance
- Should show GPU activity
-
Reduce Graphics Settings:
- In-game settings → Graphics
- Lower shadow quality
- Reduce view distance
-
Check CPU Usage:
High Memory Usage
Symptoms:- Browser uses >4GB RAM
- “Out of memory” errors
-
Restart Browser:
- Close and reopen browser
- Clears WebGPU memory leaks
-
Reduce Instance Count:
- Fewer trees/rocks in view
- Lower LOD distances
-
Check for Leaks:
Network Issues
WebSocket Connection Failed
Symptoms:- “WebSocket connection failed”
- “Connection refused”
- Can’t connect to server
-
Check Server Running:
-
Check WebSocket URL:
-
Check Firewall:
High Latency
Symptoms:- Actions feel delayed
- Rubber-banding
- Lag spikes
-
Check Network:
-
Check Server Load:
-
Reduce Tick Rate:
CSP Violations
”Refused to load script”
Symptoms:- Console error: “Refused to load the script”
- External resources blocked
-
Check CSP Policy:
-
Add to Allowlist:
-
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 processGetting Help
Before Asking for Help
Reporting Issues
Include in your issue report:-
Environment:
- OS and version
- Browser and version
- Node/Bun version
- GPU model
-
Steps to Reproduce:
- Exact commands run
- Configuration used
- Expected vs actual behavior
-
Logs:
- Server logs (bunx pm2 logs)
- Browser console errors
- Test output (if applicable)
-
Screenshots:
- Error messages
- Browser DevTools
- Visual issues
Support Channels
- GitHub Issues: https://github.com/HyperscapeAI/hyperscape/issues
- GitHub Discussions: https://github.com/HyperscapeAI/hyperscape/discussions
- Documentation: docs/
Diagnostic Commands
System Info
Service Status
Network Diagnostics
References
- Main Documentation: README.md
- Development Guide: CLAUDE.md
- Recent Changes: docs/RECENT_CHANGES.md
- Environment Variables: docs/configuration/environment-variables.md