mermaid-js / mermaid-cli

Command line tool for the Mermaid library
MIT License
2.23k stars 212 forks source link

CLI generation of diagram results in [vue-sequence] error #588

Open rpmurray opened 10 months ago

rpmurray commented 10 months ago

When generating a class diagram using mermaid CLI the following error is encountered regularly: [vue-sequence] Store is a function and is not initiated in 1 second.

The markdown file is ~650 lines long with ~175 objects (classes, namespaces, notes).

When trying the same markdown via the live mermaid editor it compiles and generates a diagram fine.

Steps to Reproduce

  1. Generate a large markdown file
  2. Run the following command to attempt to generate a diagram: docker run --rm -uid -u:id -g-v .:/data minlag/mermaid-cli -i diagram.mmd -o diagram.mmd.svg
  3. See error: [vue-sequence] Store is a function and is not initiated in 1 second.

Expected behavior A diagram SVG should be generated.

Desktop Environment

robross0606 commented 9 months ago

Same error here directly running mermaid-cli via npm script. 430 line markdown file. Running with version 10.2.4 works fine. Running with 10.3.0 or later fails with the "vue-sequence" error.

LingkKang commented 7 months ago

Got same message on mermaid-cli 10.6.1 with a 300 line class diagram.

Aaron-von-Awesome commented 5 months ago

Same error on 10.6.2-beta.12 docker image

mishioo commented 2 months ago

Got the error on mermaid-cli@10.8.0 with a large (1200 lines) flow diagram.

zacharysyoung commented 1 month ago

Running 10.9.1 in the following script, I get the message and I also get my SVGs.

ls *.mmd | while read mmd
do
    svg=$(echo "$mmd" | sed 's/\.mmd/\.svg/')
    cmd="/usr/bin/time mmdc -q -i $mmd -o $svg"

    rm "$svg"   && echo "Removed   $svg"
    eval "$cmd" && echo "Generated $svg"
done

ls -la *.svg
Removed   sd-v1.svg
[@zenuml/core] Store is a function and is not initiated in 1 second.
        1.87 real         1.91 user         0.39 sys
Generated sd-v1.svg
Removed   sd-v2.svg
[@zenuml/core] Store is a function and is not initiated in 1 second.
        1.85 real         1.89 user         0.38 sys
Generated sd-v2.svg
-rw-r--r--  1 zyoung  staff  27316 Jun 13 07:44 sd-v1.svg
-rw-r--r--  1 zyoung  staff  27316 Jun 13 07:44 sd-v2.svg
zacharysyoung commented 1 month ago

Adding some more context: this error appears to be with mermaid-cli/dist/index.html, but reported by Chromium.

I turned on the dumpio option for puppeteer:

{
  "dumpio": true
}

and ran mmdc with that JSON puppeteer-config:

% mmdc -p puppeteer.json -i sd-v1.mmd -o sd-v1.svg

DevTools listening on ws://127.0.0.1:57908/devtools/browser/c09649a6-2178-4d66-8458-2fece9d81666
Generating single mermaid chart
objc[65684]: Class WebSwapCGLLayer is implemented in both /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebCore.framework/Versions/A/Frameworks/libANGLE-shared.dylib (0x7ffb47cee530) and /Users/zyoung/.cache/puppeteer/chrome/mac-1108766/chrome-mac/Chromium.app/Contents/Frameworks/Chromium Framework.framework/Versions/112.0.5614.0/Libraries/libGLESv2.dylib (0x10fd1c9b0). One of the two will be used. Which one is undefined.
[0613/123800.443177:ERROR:command_buffer_proxy_impl.cc(128)] ContextResult::kTransientFailure: Failed to send GpuControl.CreateCommandBuffer.
[0613/123800.443230:ERROR:command_buffer_proxy_impl.cc(128)] ContextResult::kTransientFailure: Failed to send GpuControl.CreateCommandBuffer.
[0613/123801.662297:INFO:CONSOLE(20)] "[@zenuml/core] Store is a function and is not initiated in 1 second.", source: file:///Users/zyoung/lib/node-v18.14.0-darwin-arm64/lib/node_modules/@mermaid-js/mermaid-cli/dist/index.html (20)
[@zenuml/core] Store is a function and is not initiated in 1 second.
aloisklink commented 1 month ago

It sounds like this warning message is just a warning from the ZenUML diagram implementation. I've reported a bug with them: https://github.com/mermaid-js/zenuml-core/issues/169 And it will be printed on any diagram that takes more than 1 second to render.

It shouldn't prevent rendering, which means that if rendering did fail, there must have been some other error message!

If anybody is willing to share a diagram that does fail to render, that would be awesome and would let us debug it to see where and how it fails.