hyperfiddle 2025-04-12

How do I force wss during dev?

I am trying to make my development environment smoother. I like being able to get hotcode reload and develop with my mobile phone in hand for mobile responsive support. Since moving from V2 to V3 I have not been able to connect to the server with hotcode reload over Or through ngrok. Which gives this in my browser terminal.

Mixed Content: The page at '' was loaded over HTTPS, but attempted to connect to the insecure WebSocket endpoint ''. This request has been blocked; this endpoint must be available over WSS.

Is using nginx as a reverseproxy an option?

Maybe. I just know I used to hot code reload over network and ngrok to my phone before and now in V3 I can’t. And would like to. Will investigate what you mentioned. I think that electric may be trying to hook into non-secure websockets during development and maybe it’s more internal to electric. But could be wrong.

Modern browsers reject non-SSL connections issued from an SSL-secured page – https://developer.mozilla.org/en-US/docs/Web/Security/Mixed_content. Electric ws client accounts for this requirement and, as a default, will connect with: • ws:// if the page is served over http://, • wss:// if the page is served over https://. One can customize this behavior by rebinding hyperfiddle.electric-client3/*ws-server-url* before calling into e/boot-client.

Okay it is served over https as above error block shows. Unsure why I get this problem with electric.

Ah my bad, this url is not related to Electric. This is shadow-cljs client connecting to shadow-cljs server for hot code reload.