Fork me on GitHub
#figwheel-main
<
2019-07-27
>
robertkrahn00:07:02

@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

dimovich07:07:20

@robertkrahn I got similar trace results with :open-url false.

dimovich07:07:39

But with :open-url commented out, the process stops after figwheel.repl/create-connection!.

dimovich07:07:54

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.

robertkrahn12:07:26

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.

dimovich16:07:50

Ok, will try that.

dimovich20:07:36

trace-ns for figwheel.repl and cljs.repl https://dimovich.github.io/fw-trace.txt

robertkrahn22:07:51

hmm that clearly looks different, no cljs.repl/evaluate-form...

robertkrahn23:07:33

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

robertkrahn23:07:08

Does the default-compile call look similar?

dimovich08:07:24

Notice in your last trace that on line 223 figwheel.repl/setup returns true, while in my case it returns {25535 #, 37797 #, 11110 #, ...}

dpsutton14:07:16

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?

dimovich07:07:36

nothing special, unbuntu 16.04 with firefox and chrome

dimovich08:07:48

I'm able to reproduce the issue on Firefox all the time, and sometimes on Chrome.

dimovich20:07:43

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.

robertkrahn23:07:48

hmm, so a timing issue? the websocket server in clojure not starting up fast enough for the browser to catch on?

dimovich07:07:22

yes, seems so.