Skip to content

"An unexpected error has occurred" with statecharts.io/inspect #2931

@huan

Description

@huan

Description

https://statecharts.io/inspect?server=localhost:8888

Can show the state charts when my program has just begun, but after a while when I switch the machine in the state menu at the right panel, it shows an error message:

An unexpected error has occurred.

with the following console log:

image

Object sessionId: "x:9" type: "service.select"
[[Prototype]]: Object
ffe100b7dadf7d66cb287d8c1cac5c9e636a5bca.02734d24c079fd118957.js:formatted:1866 
Object sessionId: "x:8"type: "service.select"
[[Prototype]]: Object
framework.4dd1003cc9c949c7fcd3.js:1
TypeError: t.expr is not a function
    at QkgP.e.resolveLog (ffe100b7dadf7d66cb287d8c1cac5c9e636a5bca.02734d24c079fd118957.js:formatted:6794)
    at ffe100b7dadf7d66cb287d8c1cac5c9e636a5bca.02734d24c079fd118957.js:formatted:5221
    at l (ffe100b7dadf7d66cb287d8c1cac5c9e636a5bca.02734d24c079fd118957.js:formatted:5243)
    at Gi (framework.4dd1003cc9c949c7fcd3.js:1)
    at ko (framework.4dd1003cc9c949c7fcd3.js:1)
    at xu (framework.4dd1003cc9c949c7fcd3.js:1)
    at wu (framework.4dd1003cc9c949c7fcd3.js:1)
    at du (framework.4dd1003cc9c949c7fcd3.js:1)
    at framework.4dd1003cc9c949c7fcd3.js:1
    at t.unstable_runWithPriority (framework.4dd1003cc9c949c7fcd3.js:1)
lo @ framework.4dd1003cc9c949c7fcd3.js:1
main-3416e08504db70d9b9e9.js:1 
TypeError: t.expr is not a function
    at QkgP.e.resolveLog (ffe100b7dadf7d66cb287d8c1cac5c9e636a5bca.02734d24c079fd118957.js:formatted:6794)
    at ffe100b7dadf7d66cb287d8c1cac5c9e636a5bca.02734d24c079fd118957.js:formatted:5221
    at l (ffe100b7dadf7d66cb287d8c1cac5c9e636a5bca.02734d24c079fd118957.js:formatted:5243)
    at Gi (framework.4dd1003cc9c949c7fcd3.js:1)
    at ko (framework.4dd1003cc9c949c7fcd3.js:1)
    at xu (framework.4dd1003cc9c949c7fcd3.js:1)
    at wu (framework.4dd1003cc9c949c7fcd3.js:1)
    at du (framework.4dd1003cc9c949c7fcd3.js:1)
    at framework.4dd1003cc9c949c7fcd3.js:1
    at t.unstable_runWithPriority (framework.4dd1003cc9c949c7fcd3.js:1)
te @ main-3416e08504db70d9b9e9.js:1

The related source code is:

        e.resolveLog = function(t, e, n) {
            return r(r({}, t), {
                value: c.isString(t.expr) ? t.expr : t.expr(e, n.data, {
                    _event: n
                })
            })
        }

Expected Result

The statechart does not throw an error

Actual Result

An unexpected error has occurred.

Reproduction

I can reproduce this error with my unit test file at:

Additional context

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions