JonyEpsilon / gorilla-repl

A rich REPL for Clojure in the notebook style.
http://gorilla-repl.org
MIT License
888 stars 104 forks source link

proxy error when launching gorilla (maybe fetching MathJax?) #200

Closed jonwoodring closed 5 years ago

jonwoodring commented 9 years ago

I think this may be due to fetching MathJax, as I see a similar error with ipython and I forget to configure my proxy correctly. I'm using http_proxy, https_proxy, and no_proxy environment variables.

Though, I'm not 100% certain what the cause of this is: Gorilla seems to work fine, and a small amount of LaTeX that I tried is rendered correctly. So, I'm not sure what is causing it (unless Gorilla caches an old version of MathJax and it's trying to fetch the newest?)

[woodring@vierge gorilla]$ lein gorilla
Gorilla-REPL: 0.3.4
Started nREPL server on port 43129
Mon Mar 23 09:53:24 MDT 2015 [client-worker-1] ERROR - GET ---PROXY ADDRESS WAS HERE---
java.lang.IllegalArgumentException: Don't know how to create ISeq from: clojure.lang.Symbol
    at clojure.lang.RT.seqFrom(RT.java:505)
    at clojure.lang.RT.seq(RT.java:486)
    at clojure.core$seq.invoke(core.clj:133)
    at clojure.core$apply.invoke(core.clj:624)
    at gorilla_repl.version$check_for_update$fn__5660.invoke(version.clj:25)
    at org.httpkit.client$request$deliver_resp__5564$fn__5565.invoke(client.clj:151)
    at org.httpkit.client$request$deliver_resp__5564.invoke(client.clj:151)
    at org.httpkit.client$request$reify__5569.onSuccess(client.clj:176)
    at org.httpkit.client.Handler.run(RespListener.java:42)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Running at http://127.0.0.1:47029/worksheet.html .
Ctrl+C to exit.
Saving: test.clj ... done. [Mon Mar 23 09:54:09 MDT 2015]
^C[woodring@vierge gorilla]$ 
at gorilla_repl.version$check_for_update$fn__5660.invoke(version.clj:25)

Maybe here for the update to MathJax?

Mon Mar 23 09:53:24 MDT 2015 [client-worker-1] ERROR - GET ---PROXY ADDRESS WAS HERE---

And to be clear, that is the response/redirect address from our web proxy if you fail to use the proxy.

JonyEpsilon commented 9 years ago

Gorilla pings an 'update server' to see if there's a newer version of Gorilla available, and I think this is what's causing the problem. It's supposed to fail quietly, as everything works fine without the check, but it looks like I must have messed up the error handling. I'll take another look and try and quieten it down.

MathJax is loaded by the browser, so it will use whatever proxy configuration your browser uses. Most browsers will cache stuff like MathJax, and Gorilla explicitly disables LaTeX rendering if it's not available. The update check is done by the Gorilla server, though, so it will potentially use different proxy information (say from the environment).

benfb commented 5 years ago

In the latest version of gorilla (used by adding the line [org.clojars.benfb/lein-gorilla "0.5.1"] in the plugins block in project.clj), you can disable the version check by adding this text to your project.clj (specifically the :phone-home false part):

:profiles {:uberjar {:aot :all}
             :user
              {:gorilla-options
                {:phone-home false}}})