Add fallback for websocket communication #361

Closed
opened 2026-02-05 17:29:43 +03:00 by OVERLORD · 0 comments
Owner

Originally created by @based-us3r on GitHub (Jun 19, 2025).

Quite often, when I open the panel, I see the error "Could not connect to websocket!" In the terminal, Firefox reports NS_ERROR_CONNECTION_REFUSED. I'm not exactly sure what's causing it, but this issue doesn’t occur for other users on Chrome. Interestingly, if I use the same domain for the WebSocket but over plain HTTPS (instead of WebSocket), everything works. The WebSocket connection consistently fails right at the end of the DNS lookup stage. Sometimes it starts working again briefly, but then fails again. This significantly disrupts my workflow, so I’d really appreciate having a fallback mechanism similar to what Socket.IO offers—where, if the WebSocket connection fails, it can fall back to HTTP long-polling or WebTransport.

Originally created by @based-us3r on GitHub (Jun 19, 2025). Quite often, when I open the panel, I see the error "Could not connect to websocket!" In the terminal, Firefox reports `NS_ERROR_CONNECTION_REFUSED`. I'm not exactly sure what's causing it, but this issue doesn’t occur for other users on Chrome. Interestingly, if I use the same domain for the WebSocket but over plain HTTPS (instead of WebSocket), everything works. The WebSocket connection consistently fails right at the end of the DNS lookup stage. Sometimes it starts working again briefly, but then fails again. This significantly disrupts my workflow, so I’d really appreciate having a fallback mechanism similar to what Socket.IO offers—where, if the WebSocket connection fails, it can fall back to HTTP long-polling or WebTransport.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/panel-pelican-dev#361