hyperfiddle

grounded_sage 2025-04-12T18:14:18.636069Z

How do I force wss during dev?

grounded_sage 2025-04-12T18:16:47.655549Z

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.

Hendrik 2025-04-14T04:41:12.438539Z

Is using nginx as a reverseproxy an option?

grounded_sage 2025-04-14T06:11:43.409179Z

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.

Geoffrey Gaillard 2025-04-14T07:31:46.205339Z

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.

grounded_sage 2025-04-14T07:56:57.653999Z

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

Geoffrey Gaillard 2025-04-14T08:31:04.963569Z

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

Geoffrey Gaillard 2025-04-14T08:37:21.550659Z

Maybe this? https://github.com/thheller/shadow-cljs/issues/496