Hi, I am trying the dirac-sample for leaning how to use dirac for my other cljs proj., but haven't succeeded with the err msg like "Unable to bootstrap ClojureScript REPL due to a timeout." On repl console, I found the msg.
user=> Dec 09, 2016 3:04:03 AM clojure.tools.logging$eval436$fn__440 invoke
SEVERE: [NREPLTunnelServer#1 of [NREPLTunnel#1]] Received a bootstrap timeout from client [WebSocketServerClient#1] :
{:op :bootstrap-timeout}
I'm not sure the issue is caused by the timeout, but.. do anyone know how I could change the timeout param?@tf0054 I would first suggest looking at output from your Dirac Agent console
we could also run agent with debug logging enabled to see more
@darwin Thank you! I will check the Agent param for having debug logging.
wait a bit, I have to find it, it is probably not documented well
so what do you see now in your nREPL terminal (or agent terminal)
@darwin Ah, I didnt write exactly but the quoted msg on my previous post was on the nREPL
that was just a reaction to client timeouting, there should be something more interesting before it
@tf0054 ok, put this to your nrepl :init
https://github.com/binaryage/dirac-sample/blob/master/project.clj#L118-L119
or run repl-dev
if you are playing with the sample
Hmm. I hope so, but whole msg is like
tf0054@ff204842e21b:~/work/dirac-sample$ lein repl
nREPL server started on port 8230 on host 127.0.0.1 - <nrepl://127.0.0.1:8230>
REPL-y 0.3.7, nREPL 0.2.12
Clojure 1.9.0-alpha13
OpenJDK 64-Bit Server VM 1.8.0_111-8u111-b14-2ubuntu0.16.04.2-b14
Docs: (doc function-name-here)
(find-doc "part-of-name-here")
Source: (source function-name-here)
Javadoc: (javadoc java-object-or-class-here)
Exit: Control+D or (exit) or (quit)
Results: Stored in vars *1, *2, *3, an exception in *e
user=>
Dirac Agent v0.8.5
Connected to nREPL server at <nrepl://localhost:8230>.
Agent is accepting connections at <ws://localhost:8231>.
user=>
user=> Dec 09, 2016 3:04:03 AM clojure.tools.logging$eval436$fn__440 invoke
SEVERE: [NREPLTunnelServer#1 of [NREPLTunnel#1]] Received a bootstrap timeout from client [WebSocketServerClient#1] :
{:op :bootstrap-timeout}
user=>
hmm, not useful
I agree 🙂
@tf0054 ah, it would need checkouts, because “dirac.logging” is not part of the public release
you should make it work with this:
mkdir checkouts
cd checkouts
git clone <https://github.com/binaryage/dirac.git>
git clone <https://github.com/binaryage/cljs-devtools.git>
this should make lein repl-dev
work
I should probably package dirac.logging[1] with dirac library next time https://github.com/binaryage/dirac/tree/master/src/logging/dirac
@darwin Oh. I see, but do you mean I need to compile the Chrome extension to get additional logs? I will try!
no
I want to see what is happening on your nREPL + agent side
at this point
btw. the timeout should be 30s which should be more than enough
https://github.com/binaryage/dirac/blob/master/src/runtime/dirac/runtime/prefs.cljs#L24
you think it timeouts sooner than 30s in your case?
Yes, normally it needs around 10sec.
hmm
ok, try to run that lein repl-dev
we will see more
I feel the msg(Unable to bootstrap...) on Dirac console would be shown in 10sec, not 30sec
Thanks I will
chances are, that it does not respect the default from runtime prefs and uses this super-default 5s timeout: https://github.com/binaryage/dirac/blob/master/src/implant/dirac/implant/nrepl_tunnel_client.cljs#L149
let me check that real quick
Oh.. I didnt know why but I could start repl-dev now (in "checkouts" dir) now according your advice.
btw. that 30s timeout setting propagates on my machine (dev build): https://dl.dropboxusercontent.com/u/559047/dirac-agent-timeout-opts.png
you don’t have to be in checkouts dir
checkouts dir is a lein’s mechanism how to replace some deps with your “dev” versions
we need dirac checkout because dirac.logging is missing in public dirac.jar
I’m looking at the code and don’t see any reason why it should timeout early
I am using the clojure on my docker container on win10 and win10:8080 is mapped to docker's 9977
hmm, so the problem must be in the extension, it gets :bootstrap-info
and probably throws or fails somehow
can you look into devtools console of the dirac window? (change the type in extension prefs)
@tf0054 just to make sure, are you using the latest Chrome Canary, right?
btw. Docker is great, but you could be running into some networking issues as well
I am using Chromium Version 57.0.2941.0 (64-bit) downloaded through your release note!
are you docker run
your container with —network=host ? or using the default bridge config?
Sorry I will come back online in few hours, but now I have to go bc the cafe is closing now 🙂
ok, np, see you then
on a treadmill
will be back in 30mmins
Aw 🙂 nice.
@tf0054 I’m back, you need port 8231 for agent connection (aka nrepl tunnel) and then 8232-8242 for weasel server(s), agent also needs to connect to nREPL server (8230), but that happens on the host machine so it should not be a problem in docker scenario
@darwin I see. thanks! I appreciate your great support and am excited to have Dirac. The breakpoint is the thing I really want to use.
cool, you are welcome
btw. bleeding edge devtools could be buggy from time to time, better stick to latest versions or stick to specific chromium builds https://github.com/binaryage/dirac/blob/master/docs/faq.md#how-do-i-stick-to-a-particular-dirac-version
I see and will use the extension installed locally. thanks!