statelyai / xstate-viz

Visualizer for XState machines
https://stately.ai/viz
MIT License
434 stars 102 forks source link

[XState Inspect] Bug: Inspector fails when there are raise actions in state definitions. #418

Closed LeonLiuY closed 1 year ago

LeonLiuY commented 1 year ago

Description

When using raise actions in state node transitions, the inspector fails to render anything.

Expected result

The inspector should work.

Actual result

The inspector crashes.

Screenshot 2023-07-06 at 15 25 20

Reproduction

https://codesandbox.io/s/charming-colden-dqgjy5?file=/src/index.js

Additional context

No response

davidkpiano commented 1 year ago

That's strange; I'm guessing it might be because the viz is on an older version.

You can replace raise('event') with send('event') as a semi-workaround.

LeonLiuY commented 1 year ago

You can replace raise('event') with send('event') as a semi-workaround.

Thanks but they are not equivalent. (Just note here to warn other readers before applying this workaround.)

tivac commented 1 year ago

This is still a blocker preventing us from being able to debug most of our statecharts at runtime :(

davidkpiano commented 1 year ago

This is still a blocker preventing us from being able to debug most of our statecharts at runtime :(

Thanks for the feedback; looking into it.