Important: When you send a message, you won't see an HTTP/API request in the Network tab. Messages use WebSocket protocol.
In Chrome/Firefox DevTools:
- Open DevTools (F12)
- Go to Network tab
- Click WS filter (WebSocket)
- Refresh the page
- You should see a connection to
ws://localhost:3002/ws - Click on it to see frames (messages) being sent/received
Open the Console tab and look for:
[ChatPage] Initializing chat[WebSocketClient] sendChatMessage:- when you send a message[WebSocketClient] Sending message via WS:- when message goes over the wire[handleRealtimeEvent] Received event:- when events come back
In your server terminal, you should see:
WebSocket authenticated: <username> (<userId>)Subscribed to room: <roomId>Message sent to room <roomId>: ...
- Are you logged in? (Can you see your username at bottom of sidebar?)
- Do you see channels in the sidebar?
- Is a channel selected (highlighted with blue background)?
- Does connection status show "Connected" in green in top-right?
- Is the input field enabled (not grayed out)?
- WebSocket isn't connecting
- Check server is running on port 3002
- Check browser console for WebSocket errors
- Rooms aren't loading from API
- Check Network tab for HTTP request to
/api/rooms - Check browser console for errors
- WebSocket might not be subscribed to room
- Check browser console for subscription messages
- Check server logs for "Subscribed to room" message
- RealTimeBus might not be broadcasting
- Check server logs for "Message sent to room" message
- Check if other user is subscribed to same room
- Login on two different browsers (or incognito window)
- Create a channel (e.g., "test-room")
- Select the channel in both browsers
- Check connection status is "Connected" in both
- Type and send a message from Browser 1
- Check Browser 1 - message should appear immediately
- Check Browser 2 - message should appear in real-time
In the WS tab of DevTools, you should see frames like:
Sent (Browser → Server):
{"type": "auth", "token": "..."}
{"type": "subscribe", "roomId": "..."}
{"type": "message.send", "roomId": "...", "content": "Hello"}Received (Server → Browser):
{"type": "authenticated", "userId": "...", "username": "..."}
{"type": "subscribed", "roomId": "..."}
{"type": "event", "event": {"type": "message.created", "message": {...}}}If messages still don't work after checking all above:
- Share browser console logs
- Share server logs
- Share WebSocket frames from DevTools