Skip to content

xstate-inspect server example fails with latest version of ws ^8.0.0 #2698

@marklawlor

Description

@marklawlor

Description

https://github.com/statelyai/xstate/blob/main/packages/xstate-inspect/examples/server.ts

Using this example with ws: ^8.0.0 does not work and will silently fail.

The error appears to be these lines, as message is of type Buffer not string

if (typeof message !== 'string') {
return;
}

Expected Result

https://statecharts.io/inspect?server=localhost:8888 should correctly visualise the example

Actual Result

https://statecharts.io/inspect?server=localhost:8888 is stuck on "waiting for connection"

Additional context

Downgrading to the ws version used the example fixes the issue.

Metadata

Metadata

Assignees

No one assigned

    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