portal

m.q.warnock 2024-05-29T21:28:09.214249Z

I bound portal to a specific interface (private ip-on-infiniband network) with the host option (port set to 5678); when I open the url, I get a blank page and this at the console:

Uncaught (in promise) DOMException: Failed to construct 'WebSocket': The URL ':NaN/rpc?854b01b2-07ca-4129-80eb-3fbfb853d1d4' is invalid.
    at 
    at new Promise (<anonymous>)
    at h1.j ()
    at h1.I ()
    at c1 ()
    at 
    at new Promise (<anonymous>)
    at AQa ()
    at d1 ()
    at CNa ()
Note the NaN where the port should be. I'm happy to open an issue and/or do more debugging (later probably), if I'm not missing something known.

djblue 2024-05-29T21:35:50.479849Z

It's probably https://github.com/djblue/portal/blob/master/src/portal/ui/rpc.cljs#L193 that's giving you issues 🤔

djblue 2024-05-29T21:37:14.762589Z

I think the bug might be here https://github.com/djblue/portal/blob/master/src/portal/runtime/index.cljc#L22

m.q.warnock 2024-05-29T21:40:15.147509Z

hmm, yeah; seems to expect the port to be included there, but not elsewhere (adding ":5678" to the end adds an extra one to the url portal prints)

djblue 2024-05-29T21:42:48.998909Z

So the code looks like?

(when host
  (str "window.PORTAL_HOST    = " (pr-str (str host ":5678")) ";"))

m.q.warnock 2024-05-29T21:43:46.619899Z

that'd be my guess, but it's your baby 😉 I'll try that patch in a bit if you haven't - need to run an errand