question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"Lost XXX Edge" error when generating visualisation

See original GitHub issue

First up, thank you so much for State Machine Cat. It is awesome 🎉

I was able to add auto generated state machine visualisations to our code base in just a few hours thanks to your great work!

Expected Behavior

When using the script:

APP,
PLAYER {
  RESTART_STREAM {
    PAUSED => PLAYING: play;
    PLAYING => PAUSED : pause;
  };

  LIVE_STREAM => PLAYING : switch to restart;
  RESTART_STREAM => LIVE_STREAM: stream finished;
  RESTART_STREAM => CONFIRM_SWITCH_TO_LIVE: start to live;
  CONFIRM_SWITCH_TO_LIVE => PLAYING: cancel switch to live;
  CONFIRM_SWITCH_TO_LIVE => LIVE_STREAM: confirm switch to live;
};

APP => LIVE_STREAM: start playback;
PLAYER => APP: on close;

I would expect it to generate a visualisation.

Current Behavior

The following error occurs:

Error: lost LIVE_STREAM PLAYING edge

When testing using https://state-machine-cat.js.org/ with the default settings.

Steps to Reproduce (for bugs)

Copy the script above into https://state-machine-cat.js.org/

Context

We have started using state machines to model our more complex async UI state management. We use unit tests and State Machine Cat to auto generate up to date visualisations for our state machines.

I’ve been investigating adding support for nested states to our code and wanted to see what our state machine would look like with them. While converting the script to use nested states I spotted the error above.

Your Environment

Using https://state-machine-cat.js.org/ on Chrome on macOS. I also get the same bug when running State Machine Cat from node.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
karlcommented, Apr 26, 2018

I put the visualisation generation in the unit tests because it was quick and meant that other devs didn’t need to do anything new to update the docs.

But I’m not sure it is the right place to put it. I’m thinking of trying out a pre commit hook, or a separate command. And then running the same step on CI failing the build if the vis is not up to date.

Thanks for releasing the new version. I’ll check it tomorrow!

0reactions
sverweijcommented, Apr 26, 2018

Ah, so for generating documentation. What’s the reason to do that in the unit test(s)?

(I’m just interested in the concepts. I don’t expect you to open source proprietary code 😃 ).

In other news: Yesterday I’ve published state-machine-cat version 2.6.5 to npm & updated the online interpreter - with which this issue is

Read more comments on GitHub >

github_iconTop Results From Across the Web

FAQ
The following error message simply indicates that there is no residue XXX in the CHARMM force field used in CHARMM-GUI. · This particular...
Read more >
FAQ — MMAction2 0.24.1 documentation
“Why I got the error message 'Please install XXCODEBASE to use XXX' even if I have ... How to visualize the training accuracy/loss...
Read more >
Error message : "Unable to get property 'rows' of undefined ...
Error message : "Unable to get property 'rows' of undefined or null on the reference” received on the scheduled Report Designer reports.
Read more >
Visualizing Dataflow Graphs of Deep Learning Models in ...
velopers can write an abstract program to generate a low-level dataflow ... Clustered flow graphs in other domains can apply edge bundling to....
Read more >
Investigating Confluent Drawings for Network Visualization
connectivity is lost when bundles are created. In this paper, we investigate Confluent (Edge) Drawings (CD), a technique for bundling edges based on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found