This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-05-29
Channels
- # announcements (15)
- # babashka (17)
- # beginners (66)
- # calva (18)
- # clojure (20)
- # clojure-dev (2)
- # clojure-europe (27)
- # clojure-nl (1)
- # clojure-norway (24)
- # clojure-sweden (5)
- # clojure-uk (4)
- # clr (1)
- # cursive (3)
- # datomic (10)
- # dev-tooling (9)
- # gratitude (1)
- # honeysql (5)
- # hyperfiddle (13)
- # malli (4)
- # music (1)
- # nrepl (1)
- # off-topic (31)
- # polylith (11)
- # portal (6)
- # re-frame (3)
- # reitit (4)
- # releases (1)
- # shadow-cljs (8)
- # squint (4)
- # tools-build (26)
- # vim (1)
- # yamlscript (52)
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.It's probably https://github.com/djblue/portal/blob/master/src/portal/ui/rpc.cljs#L193 that's giving you issues :thinking_face:
I think the bug might be here https://github.com/djblue/portal/blob/master/src/portal/runtime/index.cljc#L22
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)
So the code looks like?
(when host
(str "window.PORTAL_HOST = " (pr-str (str host ":5678")) ";"))
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