The app now has much better logging and error handling for WebSocket connections. Here's what was improved:
- Removed premature authentication - The app was trying to send requests before the OBS WebSocket handshake completed
- Added comprehensive logging - All connection steps now print detailed logs
- Better error handling - Connection errors are caught and displayed with helpful messages
- Proper WebSocket flow - Now correctly waits for Hello → sends Identify → waits for Identified
When you start the bridge, you should see logs like this:
OBS: Starting connection to localhost:4455
OBS: WebSocket connection established
OBS: Received message: {"op":0,"d":{"obsWebSocketVersion":"5.0.0",...
OBS: Received op code: 0
OBS: Received Hello, sending Identify...
OBS: Processing Hello message
OBS: No authentication required (or: Authentication required)
OBS: Sending Identify message (auth: true/false)
OBS: Sending message: {"op":1,"d":{"rpcVersion":1}...
OBS: Message sent successfully
OBS: Received message: {"op":2,"d":{...
OBS: Received op code: 2
OBS: Successfully identified!
Website: Starting connection to ws://localhost:8000/obs
Website: WebSocket connection established
Website: Registering as client obs-client-1
Website: Sending message: {"type":"register","clientId":"obs-client-1"}
Website: Message sent successfully
Cause: The WebSocket server (OBS or website) is not running or not accepting connections.
Solutions:
-
For OBS:
# Check if OBS is running ps aux | grep OBS # If not running, start OBS first open -a OBS
Then in OBS:
- Go to Tools → WebSocket Server Settings
- Check Enable WebSocket server
- Note the port (default: 4455)
- Set or remove password
- Click Apply and OK
-
For Website:
# Check if server is running curl http://localhost:8000/health # If not running, start it cd /path/to/project npm run dev
Cause: OBS has authentication enabled but no password is set in the app.
Solution:
- Open OBS Bridge settings (gear icon)
- Enter the password from OBS WebSocket Settings
- Click Save
- Restart the bridge
Alternative: Disable password in OBS temporarily for testing:
- OBS → Tools → WebSocket Server Settings
- Uncheck or clear the password
- Click Apply
Cause: Usually an authentication failure or OBS rejecting the connection.
Check logs for:
OBS: Received Hello, sending Identify...
OBS: ERROR - Password required but not provided
or
OBS: Connection error: Socket is not connected
Solution:
- Verify password matches between OBS and app
- Try without password first (disable in OBS)
- Check OBS logs: Help → Log Files → View Current Log
Cause: The host or port settings are incorrect.
Solution:
- Check settings:
- Host should be
localhost(if OBS on same machine) - Port should match OBS (usually
4455)
- Host should be
- Don't include
ws://orhttp://in the host field - Port must be a number
Cause: Website server not running or wrong URL.
Solution:
-
Start the website server:
cd /path/to/project npm run dev -
Verify it's running:
curl http://localhost:8000/health # Should return: {"status":"ok","clients":0,...} -
Check URL in settings:
- Should start with
ws://orwss:// - Correct port (usually
8000) - Correct path (usually
/obs) - Example:
ws://localhost:8000/obs
- Should start with
# Is OBS running?
ps aux | grep OBS
# Is website server running?
lsof -i :8000
# Check OBS WebSocket is enabled
# Open OBS → Tools → WebSocket Server SettingsTest OBS WebSocket:
# Install wscat if needed
npm install -g wscat
# Connect to OBS
wscat -c ws://localhost:4455
# You should see a Hello message from OBSTest Website:
# Connect to website
wscat -c ws://localhost:8000/obs
# Send registration
{"type":"register","clientId":"test-client"}Run the app from Terminal to see all logs:
cd bridge
./build/Build/Products/Debug/OBSBridge.app/Contents/MacOS/OBSBridgeOr use Console.app:
- Open Console.app
- Filter for "OBS" or "Website"
- Start the bridge
- Watch for error messages
In OBS Bridge settings, verify:
- OBS Host:
localhost - OBS Port:
4455(or your custom port) - OBS Password: matches OBS (or empty if disabled)
- Website URL: starts with
ws://orwss:// - Client ID: any unique identifier
-
Test without OBS Bridge:
# Run the Python bridge instead cd /path/to/project python obs_bridge.py
If Python bridge works but macOS app doesn't, it's an app issue. If Python bridge also fails, it's a configuration issue.
-
Test without password:
- Disable password in OBS temporarily
- Clear password in app settings
- Try connecting
-
Test local website first:
- Start website locally:
npm run dev - Connect to
ws://localhost:8000/obs - If that works, try remote URL
- Start website locally:
| State | Meaning | What to do |
|---|---|---|
| Disconnected | Not connected | Click "Start Bridge" |
| Connecting | Establishing connection | Wait a few seconds |
| Connected (green) | Successfully connected | Everything working! |
| Error (red) | Connection failed | Check logs and troubleshoot |
Same states as above. Both should be green when working.
OBS: Starting connection to localhost:4455
OBS: WebSocket connection established
OBS: Received Hello, sending Identify...
OBS: Successfully identified!
Website: Starting connection to ws://localhost:8000/obs
Website: WebSocket connection established
Website: Registering as client obs-client-1
Website: Message sent successfully
OBS: Starting connection to localhost:4455
OBS: Connection error: Connection refused
→ Solution: Start OBS first
OBS: WebSocket connection established
Failed to receive message from OBS: Socket is not connected
→ Solution: OBS WebSocket not enabled or rejecting connection
OBS: ERROR - Password required but not provided
→ Solution: Set password in app settings
Website: Connection error: Connection refused
→ Solution: Start website server
-
Check OBS version:
- Needs OBS Studio 28+ for WebSocket v5
- Update from https://obsproject.com
-
Check firewall:
# Temporarily disable firewall for testing # System Settings → Network → Firewall
-
Try different ports:
- Change OBS WebSocket port to 4456
- Update app settings to match
-
Check OBS logs:
- OBS → Help → Log Files → View Current Log
- Search for "websocket" errors
-
Reset everything:
# Close OBS Bridge # Close OBS # Stop website server # Start fresh # 1. Start OBS # 2. Enable WebSocket in OBS # 3. Start website server # 4. Start OBS Bridge with correct settings
If you're still stuck, collect this information:
- OBS version: Help → About (e.g., "28.1.2")
- macOS version:
sw_vers - App logs: Run from Terminal and copy logs
- OBS WebSocket settings: Screenshot
- App settings: Screenshot
- Error message: Exact error from logs
Then check:
- GitHub issues
- OBS forums
- WebSocket protocol documentation