-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Open
Labels
Description
XState version
XState version 5
Description
I am hitting a problematic scenario in production - yet failing to reproduce in a simple test case.
But basically, this is what I believe is happening:
- For some reasons, restoringSnapshot from persisted layer takes some time (see ability to set `reviveContext` while providing higher-level restoreSnapshot logic #5227 )
- A global error is thrown from an Iframe while restoring state (SecurityError: Blocked a frame with origin from accessing a cross-origin frame) - firebase handling some part of auth stuff
- the Security error is caught here and the machine ends up in an error state
Expected result
I am expecting the machine to end up in an error state only when the context is not able to be restored.
Actual result
Machine ends up in error state when global errors - not related to state restauration - are thrown
Reproduction
sorry, unable to give a simple repro
Additional context
No response