Troubleshooting
Common issues and solutions across all UG Labs SDKs and APIs.
SDK-Specific Troubleshooting
General Issues
Connection Issues
WebSocket connection fails
- Verify your API key is correct
- Check network connectivity and firewall settings
- Ensure you're using the correct environment URL:
- Staging:
wss://pug.stg.uglabs.app - Production:
wss://pug.uglabs.app
- Staging:
- WebSocket requires HTTPS (secure context) for voice features
Authentication Errors
"Invalid API key" or 401 errors
- Verify the API key from UG Labs Console
- Check that the key hasn't expired or been revoked
- Ensure you're using the correct key for your environment (staging vs production)
"Unauthorized federatedId"
- Ensure the
federatedIdmatches your registered user ID pattern - Check that your application is correctly registered in the Console
Audio Issues
Microphone not working
- Grant microphone permissions when prompted
- Ensure HTTPS (required for WebRTC/microphone access)
- Try using headphones to avoid echo
- Check browser console for specific permission errors
Safari doesn't record or play audio
Safari requires HTTPS for voice recording and playback. When developing locally:
- Start your local dev server with HTTPS enabled:
- Vite:
vite --https - Create React App:
HTTPS=true npm start - Next.js: Use
next dev --experimental-httpsor configure a local certificate
- Vite:
- Accept the self-signed certificate warning in Safari
- Grant microphone permissions when prompted
This is a Safari-specific security requirement and doesn't affect Chrome or Firefox in local development.
No audio output
- Check system volume and audio output device
- Verify
capabilities.audio: truein configuration - Check browser console for audio playback errors
Performance Issues
High latency responses
- Check network connection quality
- Consider using
onOutputUtilitiesinstead ofonInputUtilities(non-blocking) - Review prompt complexity - shorter prompts respond faster
Memory usage growing
- Ensure you're calling
dispose()when conversations end - Check for event listener leaks (remove listeners when components unmount)
Getting Help
If you can't resolve your issue:
- Check the WebSocket Protocol documentation for API details
- Review the JavaScript SDK Configuration reference
- Contact UG Labs support with:
- Error messages (include error IDs if shown)
- SDK version
- Browser/platform information
- Steps to reproduce