I just upgraded to 4.4.0 and I’m having trouble using Piggieback. It seems if I throw an exception in a CLJS session it prints the error but it ends up hanging nREPL somehow. Conjure stops evaluating anything for me. The only solution is to kill the REPL process.
Example:
; --------------------------------------------------------------------------------
; eval (current-form): (throw (ex-info "boom" {}))
; (err) #error {:message "boom", :data {}}
; --------------------------------------------------------------------------------
; eval (current-form): (throw (ex-info "boom" {}))
; --------------------------------------------------------------------------------
; eval (current-form): (throw (ex-info "boom" {}))
; --------------------------------------------------------------------------------
; eval (current-form): (throw (ex-info "boom" {}))
Hmm nothing changed around here :thinking_face: if you roll back does it start working again?
I'll try to repro it soon
I’ll try downgrading in a little bit
So in shadow-cljs I see this
; --------------------------------------------------------------------------------
; eval (current-form): (throw (ex-info "boom" {}))
#error {:message "boom", :data {}}
And everything continues to work
; --------------------------------------------------------------------------------
; eval (current-form): (a-thing-that-doesnt-exist)
; (err) ------ WARNING - :undeclared-var -----------------------------------------------
; (err) Resource: <eval>:1:2
; (err) Use of undeclared Var dev.sandbox/a-thing-that-doesnt-exist
; (err) --------------------------------------------------------------------------------
; (err)
nil
this when I get an exceptionAnd when I use piggieback + node repl
; --------------------------------------------------------------------------------
; eval (current-form): (throw (ex-info "boom" {}))
; (err) Execution error (ExceptionInfo) at (<cljs repl>:1).
; (err) boom
; (err)
but the REPL still worksSo I think it's to do with your local REPL? But I can't be sure, of course.
Yeah, must be my local. I found I was behind on versions of nrepl, piggleback, and figwheel, but upgrading those didn’t help. I even disabled my error reporting to http://rollbar.com but still no joy.
Is it normal to see something like this in the browser console?
:thinking_face: I don't think I saw it (got to work now so can't go into repro mode again just yet) Interesting that react devtools are in the stack there... what happens if you turn that off?
Doesn’t seem to make a difference. REPL still hangs on second exception.
Okay, I'll try my best to repro this, I didn't actually try piggieback + figwheel so I'll give that a go later
Might be a couple of days before I can investigate and either fix or let you know what the issue is though :thinking_face: I'll try!
Awesome, thanks! Let me know if there’s anything I can do to help.
I created a minimal reproducer. Unzip, lein repl, run figpig.server/start, hit http://localhost:6789 from your browser, then see instructions at the end of server.clj to repro the bug.
I get the same behaviour in both Chrome and FireFox on Macos
Awesome, thanks a lot! I'll try to repro soon
I can reproduce it with your example! Now to rule out Conjure...
I think it's the figwheel setup and nothing to do with Conjure, it might be something you have to ask in #figwheel about. I've added a feature to develop though that means if your CLJS hangs you can still list sessions and kill them.
Basically added a timeout feature to dead sessions so one dead session won't hold the rest to ransom (which froze Conjure effectively because Conjure likes to query the sessions)
If I throw in a setTimeout it's okay, so figwheel on it's own / CLJS / the browser isn't having a problem
Next step is to nREPL in from the CLI using some other nREPL client
Reproduced entirely out of Conjure! In the lein repl
prompt after hooking up figwheel any error causes figwheel to crash entirely.
It's not Conjure I'm afraid 😞 it's something in figwheel but I don't know enough about it to know.
It might not help but here's a working deps.edn version, could come in handy! https://gist.github.com/pyrmont/73d10c74d14f26772fd276c38ee3490d
Wow, great, that’s very helpful! Thanks again for your time.
Let me know if there’s anything I can do to help debug.