@dimovich tried your repo and for me the cljs repl appears correctly after localhost:9500 opens as well. a trace of the figwheel.repl / cljs.repl functions I'm getting is here: https://gist.github.com/rksm/ac0e66b1bb69de76bdf5ebba08cffe9c
@robertkrahn I got similar trace results with :open-url false
.
But with :open-url
commented out, the process stops after figwheel.repl/create-connection!
.
Thanks for the gist. Never used tools.trace before. Pretty neat 🙂. In the end I guess it's an issue with my environment / browser. Good that it works for both of you.
Notice in your last trace that on line 223 figwheel.repl/setup
returns true
, while in my case it returns {25535 #, 37797 #, 11110 #, ...}
Alright, let me know if you want more traces for comparison. You can probably use trace-ns
of figwheel.repl and/or cljs.repl to get to the cause.
random question. is your environment weird? I think i saw someone run into this issue with a chromebook because there were essentially two localhosts involved. any chance you're in a strange env?
nothing special, unbuntu 16.04 with firefox and chrome
I'm able to reproduce the issue on Firefox all the time, and sometimes on Chrome.
Ok, will try that.
noticed that after browser opens automatically the cljs-repl starts normally only when this function call to start the browser is wrapped in a future
. Tested with figwheel 0.2.0 and 0.2.3. Same results. If there's no future
the cljs-repl doesn't start.
yes, seems so.
https://github.com/bhauman/figwheel-repl/blob/master/src/figwheel/repl.cljc#L1275
trace-ns for figwheel.repl and cljs.repl https://dimovich.github.io/fw-trace.txt
hmm that clearly looks different, no cljs.repl/evaluate-form
...
I think it comes from (figwheel.main/default-compile)[https://github.com/bhauman/figwheel-main/blob/v0.2.0/src/figwheel/main.cljc#L1839] and then (serve-action => serve)[https://github.com/bhauman/figwheel-main/blob/v0.2.0/src/figwheel/main.cljc#L1606]. It starts to get unwieldy but here is a trace with an additionally traced figwheel.main
Does the default-compile call look similar?
hmm, so a timing issue? the websocket server in clojure not starting up fast enough for the browser to catch on?