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.

Error Rendering Mermaid Diagram

See original GitHub issue

I have an issue when trying to use mermaid diagrams in a document. When I run relaxed in the official “Report” example, the project will build just fine, but when I update the .mermaid file, it detects the change and tries to render the diagram before it times out with the following error:

Launching ReLaXed...

Processing /report.pug...
... HTML generated in 0.4s
... Document loaded in 0.6s
... Network idled in 0.2s
... PDF written in 0.3s (130.64 KB)
... Done in 1.61s

Now idle and waiting for file changes.

Processing /diagrams/diagram.mermaid...
(node:17087) UnhandledPromiseRejectionWarning: TimeoutError: waiting for selector "#graph svg" failed: timeout 30000ms exceeded
    at new WaitTask (/home/zicklag/.nvm/versions/node/v10.15.3/lib/node_modules/relaxedjs/node_modules/puppeteer/lib/DOMWorld.js:561:28)
    at DOMWorld._waitForSelectorOrXPath (/home/zicklag/.nvm/versions/node/v10.15.3/lib/node_modules/relaxedjs/node_modules/puppeteer/lib/DOMWorld.js:490:22)
    at DOMWorld.waitForSelector (/home/zicklag/.nvm/versions/node/v10.15.3/lib/node_modules/relaxedjs/node_modules/puppeteer/lib/DOMWorld.js:444:17)
    at Frame.waitForSelector (/home/zicklag/.nvm/versions/node/v10.15.3/lib/node_modules/relaxedjs/node_modules/puppeteer/lib/FrameManager.js:628:47)
    at Frame.<anonymous> (/home/zicklag/.nvm/versions/node/v10.15.3/lib/node_modules/relaxedjs/node_modules/puppeteer/lib/helper.js:111:23)
    at Page.waitForSelector (/home/zicklag/.nvm/versions/node/v10.15.3/lib/node_modules/relaxedjs/node_modules/puppeteer/lib/Page.js:1046:29)
    at Object.mermaidHandler [as handler] (/home/zicklag/.nvm/versions/node/v10.15.3/lib/node_modules/relaxedjs/src/builtin_plugins/mermaid/index.js:23:14)
    at process._tickCallback (internal/process/next_tick.js:68:7)
(node:17087) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejectinga promise which was not handled with .catch(). (rejection id: 1)
(node:17087) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
DanielRufcommented, May 19, 2019

Not sure how this can be related. Probably an issue in puppeteer which we would have to inspect much deeper.

0reactions
zicklagcommented, May 19, 2019

Hi @DanielRuf, thanks for looking into this, I got this error running relaxed right in the report example directory. If it isn’t happening to anybody else it might be related to the performance of my machine.

An interesting note, though this might be a separate issue, is that when I start Relaxed while my Firefox browser is running, as soon as relaxed renders the page and goes into an idle state, it somehow causes Firefox to start running all four cores on my CPU at 100% for no explainable reason. It is really strange. If Relaxed uses Chrome for rendering the page and it is idle anyway, how does it cause some weird reaction in Firefox. Even if I close relaxed afterwards, Firefox will not calm down until I close and restart it. Also if I start Firefox after starting Relaxed, there are no problems, it is only if I start Relaxed while Firefox is running.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Mermaid syntax error on trying render a diagram on Github ...
Currently, I struggle on a similar problem. With GitHub, do you mean GitHub pages? Could you find a solution to it?
Read more >
Syntax Error in Graph / Mermaid Version 9.0.1 · Issue #2963
Unable to render graphs: erDiagram, gantt when integrating Mermaid with Ionic/StencilJS. Some other graphs all render perfectly. To Reproduce
Read more >
mermaid in wiki showing error for valid flowchart
I am getting this error for a flow chart that shows up correctly in most other markdown rendering tools: Parse error on line...
Read more >
Standard mermaid syntax for flowchart links not rendered in ...
While using standard syntax for ranking link, an error is produced at rendering, and no flowchart is displayed.
Read more >
Mermaid renders in live preview, errors in reading/exporting
Steps to reproduce try this mermaid graph, it renders with no errors when in live preview sequenceDiagram autonumber rect rgb(191, 223, ...
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