Fork me on GitHub

Is anyone running Portal on a Windows/WSL2 setup, with the REPL/Portal running on Linux?


I saw the announcement and figured I'd try Portal again but when I try it in a WSL2 REPL like this:

$ clj -Sdeps '{:deps {djblue/portal {:mvn/version "0.15.0"}}}'
Clojure 1.10.3
user=> (require '[portal.api :as p])
user=> (p/open)
{:session-id #uuid "d2c48f95-a60e-4187-a3a8-39ffbc08e23f"}
and it pops open a browser window but it's blank. Even after adding the tap and sending some values, nothing appears.


I get this error showing up in the REPL:

Sun Sep 19 21:35:02 PDT 2021 [worker-2] ERROR - GET /main.js
java.lang.IllegalArgumentException: Not a file: jar:file:/home/seanc/.m2/repository/djblue/portal/0.15.0/portal-0.15.0.jar!/portal/main.js
        at $fn__11416.invokeStatic(io.clj:61)
        at $fn__11416.invoke(io.clj:44)
        at $fn__11390$G__11372__11395.invoke(io.clj:35)
        at $file.invokeStatic(io.clj:424)
        at $file.invoke(io.clj:418)
        at portal.runtime.jvm.server$main_js.invokeStatic(server.clj:85)
        at portal.runtime.jvm.server$main_js.invoke(server.clj:81)
        at portal.runtime.jvm.server$handler$fn__1687.invoke(server.clj:107)
        at portal.runtime.jvm.server$handler.invokeStatic(server.clj:111)
        at portal.runtime.jvm.server$handler.invoke(server.clj:102)
        at clojure.lang.Var.invoke(


It looks like I did push up a broken release for all platforms, not sure if this is a WSL only issue. should fix it, hopefully for WSL as well 🤞. Sorry 😬


I got a similar error in 0.15.0 but it works in 0.14.0.


I can confirm that it works on WSL2 with 0.15.1 -- opening a Google Chrome window with the inspector displayed correctly! Thank you!


(that doesn't happen every time it seems -- depends whether I specify a port or maybe it depends which port I specify)


I tried 0.14.0 and got the same behavior.


Should it be possible to run a portal server in one process, e.g. using portal.api/start as exec-fn on the command-line, and then connect to it, something like (add-tap #'portal/submit) (tap> "Hello, Portal!"), in another process, e.g. in a clojure repl?


I've done this. I can connect to portal with a web browser, but tap> doesn't appear to send anything to portal


You'd need to add-tap a function that sent values over the wire to the other process (and then tap>'d them on that side). What you're doing now just tap>'s the values into a (presumably) non-running Portal in "this" JVM's process.


Understood. I had added portal as a component and that worked. Now I'd like to make the two processes (portal and the app) separate. I don't need this to be "remote," just between different processes, so shared memory could work, for example. I was hoping portal had something built in, but I guess not. Thanks @U04V70XH6


Hi @U0P7ZBZCK, the remote runtime work I recently added to portal is more along the lines of connecting via a socket repl to an existing process without portal and injecting the runtime code and linking up the remote runtime with a local client.


Hey @U1G869VNV. My motivation is to ensure that portal is never shipped with the production app, and would only be available in local development. I just realized I can put everything in the user namespace, and only have portal on the classpath when a repl is started. I think this accomplishes my goal. Thanks for the response and thanks for portal!

👍 2