bhauman / lein-figwheel

Figwheel builds your ClojureScript code and hot loads it into the browser as you are coding!
Eclipse Public License 1.0
2.88k stars 210 forks source link

0.5.15 crashing and causing weird reload issues #661

Closed mtruyens closed 6 years ago

mtruyens commented 6 years ago

Hi there,

Just installed 0.5.15 and tried it out on my (rather large) Clojurescript project, for which I encountered no issues with 0.5.14.

Figwheel crashed the very first time I tried the new version, and then later on sporadically crashed as well. (Attached you can find the stacktrace of such a crash.)

In addition to the crashes, I also noticed weird reload issues: Chrome seems to revert back to a previous state when I just changed a simple CLJS file, with some data within the browser session that should not be cleared, being partially cleared. This is also very noticeable by the fact that the intro messages given in Chrome Devtools (are, rather, Dirac) about the DevTools and Dirac Runtime versions, are being re-printed at the moment this erroneous reload happens.

My setup is a Linux box, Re-frame 0.10.5, Reagent 0.7, React 16.2, CLJS DevTools 0.9.9, Dirac 1.2.29, Chromium 66.3335.

stacktrace.txt

bhauman commented 6 years ago

dang sorry about that, and other details? how are you starting figwheel?

bhauman commented 6 years ago

this is rather intense, would you be able to do me a favor and do a git bisect between 0.5.14 and 0.5.15 to see where things are going wrong?

bhauman commented 6 years ago

Also, please make sure you cleaned out old assets before starting figwheel

bhauman commented 6 years ago

@mtruyens I have just confimed that stacktrace is from figwheel 0.5.14

bhauman commented 6 years ago

https://github.com/bhauman/lein-figwheel/blob/v0.5.14/sidecar/src/figwheel_sidecar/repl.clj#L187

https://github.com/bhauman/lein-figwheel/blob/v0.5.15/sidecar/src/figwheel_sidecar/repl.clj#L187

mtruyens commented 6 years ago

After having manually deleted all assets, it does indeed work correctly. Sorry for this.

mtruyens commented 6 years ago

Closed it too soon.

The reloading issue seems to re-appear after a while (worked perfectly for about four hours this morning, but then suddenly re-appeared out of nowhere). It seems that somehow the temporary files used by Figwheel get corrupted?

This could get tricky to detect under which circumstances.

bhauman commented 6 years ago

I would need more information. I'm assuming the stacktrace above isn't produced.

mtruyens commented 6 years ago

The behaviour of the new version varies heavily: over the past two days, it behaved wonderfully -- and then suddenly the reload problem was present again, without a specific reason. I really have no idea what is causing it, and it is almost impossible to reproduce it, but due to the fact that a (reset-autobuild) causes it to go away, I am closing the issue for now.