Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI hangs on rendering sequence diagrams, but works with flowcharts #14

Closed
jerluc opened this issue Sep 12, 2017 · 6 comments
Closed

CLI hangs on rendering sequence diagrams, but works with flowcharts #14

jerluc opened this issue Sep 12, 2017 · 6 comments

Comments

@jerluc
Copy link

jerluc commented Sep 12, 2017

Description

When trying to render the example sequence diagram from the README, the CLI just hangs indefinitely. However, when rendering other kinds of diagrams, such as the flowchart or dot graphs, the CLI runs just fine. I'm not 100% sure as to whether this is a direct bug or an upstream bug in js-sequence-diagrams, as neither has seen a similar issue previously, but I'll just report it here in case @francoislaberge has anymore information that might help solve this issue.

It does look like this is one of the few render implementations that requires a tiny electron window to be opened, so perhaps this is somehow the cause of some issue?

System info

  • Arch Linux (kernel 4.12.8-2)
  • npm v5.3.0

Steps to reproduce

Install CLI

npm install -g diagrams

Create sequence diagram source (input.sequence)

cat > input.sequence <<EOF
Alice->Bob: Hello Bob, how are you?
Note right of Bob: Bob thinks
Bob-->Alice: I am good thanks!
EOF

Run command to render SVG

diagrams sequence input.sequence sequence.svg

@seflless
Copy link
Owner

Thanks for the good repro steps. I was able to recreate. I think I have it fixed. Try out the latest release: diagrams@0.9.6.

@jerluc
Copy link
Author

jerluc commented Sep 16, 2017

Beautiful! So glad I can finally use this!

@jerluc jerluc closed this as completed Sep 16, 2017
@jerluc
Copy link
Author

jerluc commented Sep 16, 2017

@francoislaberge for my own curiosity, what was the underlying issue?

@seflless
Copy link
Owner

To be honest, I never quite figured it out. I've had this weird issue in the past too, where the main.js you start an electron skill with gets the path to electron instead of the module for electron when you do const electron = require('electron'). In this case, the first thing to fail was:

const app = require('electron').app;

// app is undefined as require('electron') === path to the electron app, thus a string
app.on('blah', ()=>{
}); 

I upgraded from 0.37.0 of electron to 1.3.0 and the issue went away after much debugging and trying to figure it out.

@seflless
Copy link
Owner

Did you verify that it works for you?

@jerluc
Copy link
Author

jerluc commented Oct 31, 2017

Yes @francoislaberge it works as intended!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants