rlaffers / xstate-ninja

Devtool for XState state machines
ISC License
69 stars 2 forks source link

Crash with "TypeError: Cannot add property parent, object is not extensible" #2

Closed UberMouse closed 2 years ago

UberMouse commented 2 years ago

Love the look of this, but I can't try it out in our production app because I'm getting this crash on one of our primary machines. Believe the error is coming from here

The child it's crashing on is a spawned callback. Let me know if you need any more info to repro.

rlaffers commented 2 years ago

More info is needed indeed. What does the error say? Can you make a minimal repro on Codesandbox?

UberMouse commented 2 years ago

Yep, looks the problem is with an interaction with @xstate/immer, worked fine with the normal assign from xstate but crashed when I switched to the assign from @xstate/immer

https://codesandbox.io/s/immutable-breeze-mim7nw?file=/src/App.js

rlaffers commented 2 years ago

Should be fixed by https://github.com/rlaffers/xstate-ninja/commit/739b07731ac2023db27fd841560136305378f373 New version of xstate-ninja will go out soon.