figwheel-main

figwheel-main http://figwheel.org
robertkrahn 2019-07-27T00:19:02.014900Z

@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

2019-07-27T07:11:20.016900Z

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

2019-07-27T07:11:39.017300Z

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

2019-07-27T07:11:54.017800Z

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.

2019-07-28T08:22:24.028300Z

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

robertkrahn 2019-07-27T12:23:26.018100Z

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.

dpsutton 2019-07-27T14:59:16.018900Z

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?

2019-07-28T07:40:36.027900Z

nothing special, unbuntu 16.04 with firefox and chrome

2019-07-28T08:12:48.028100Z

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

2019-07-27T16:40:50.019300Z

Ok, will try that.

2019-07-27T20:44:43.024900Z

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.

2019-07-28T07:05:22.027700Z

yes, seems so.

2019-07-27T20:47:36.025400Z

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

2019-07-27T21:10:45.026Z

@ashley could you try figwheel-main 0.2.3 instead of 0.1.9?

robertkrahn 2019-07-27T22:53:51.026500Z

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

robertkrahn 2019-07-27T23:00:33.026900Z

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

robertkrahn 2019-07-27T23:01:08.027300Z

Does the default-compile call look similar?

robertkrahn 2019-07-27T23:05:48.027500Z

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