Skip to content

Conversation

@StarbirdTech
Copy link

Fixes #11

This resolves the silent crash when selecting a channel by switching from ws:// to wss:// and adding error handling to http requests for slash commands which is another possible source of silent crashes I noticed.

Changes

1. Switch from WS to WSS

  • Changed from ws://irc-ws.chat.twitch.tv:80 to wss://irc-ws.chat.twitch.tv:443
  • The ws:// connection was causing "websocket: bad handshake" errors, Twitch seems to want TLS

2. Add error handling to HTTP requests

  • Added nil checks in fireRequest() for slash commands like /ban, /info, etc.

3. Add error UI for WebSocket connection failures

  • Added connectionError field to ChatModel to track connection state
  • Displays an error message with troubleshooting guidance
  • Shows debug log location for additional details
  • Press Esc to return to channel selection instead of the app exiting

Testing

macOS Tahoe v26.0.1

Built and tested with ws:// and confirmed error ui displays and functions correctly.
Built and tested with wss:// and confirmed bad handshake is resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Silent crash on channel select

1 participant