Error when running the flowchart plugin


  • Platform: macOS
  • Platform version: High Sierra 10.13.6
  • App Version: 3.23.1


Install the plugin:

➜  ~ ipm install flowchart
Installing flowchart to /Users/kork/Library/Application Support/inkdrop/packages ✓

Restart inkdrop. Then create a new note with these contents:


Then on the preview side this error message appears:

Failed to render Markdown
The error thrown by a plugin: flowchart

TypeError: Cannot read property 'key' of null
    at getDisplaySymbol (/Users/kork/Library/Application Support/inkdrop/packages/flowchart/node_modules/flowchart.js/src/flowchart.parse.js:29:26)
    at constructChart (/Users/kork/Library/Application Support/inkdrop/packages/flowchart/node_modules/flowchart.js/src/flowchart.parse.js:63:24)
    at Object.drawSVG (/Users/kork/Library/Application Support/inkdrop/packages/flowchart/node_modules/flowchart.js/src/flowchart.parse.js:116:9)
    at Flowchart.renderDiagram (/Users/kork/Library/Application Support/inkdrop/packages/flowchart/lib/index.js:25:13)
    at Flowchart.componentDidMount (/Users/kork/Library/Application Support/inkdrop/packages/flowchart/lib/index.js:13:10)
    at CallbackQueue.notifyAll (/Applications/
    at ReactReconcileTransaction.close (/Applications/
    at ReactReconcileTransaction.closeAll (/Applications/
    at ReactReconcileTransaction.perform (/Applications/
    at ReactUpdatesFlushTransaction.perform (/Applications/
    at ReactUpdatesFlushTransaction.perform (/Applications/
    at Object.flushBatchedUpdates (/Applications/
    at ReactDefaultBatchingStrategyTransaction.closeAll (/Applications/
    at ReactDefaultBatchingStrategyTransaction.perform (/Applications/
    at Object.batchedUpdates (/Applications/
    at Object.enqueueUpdate (/Applications/
    at enqueueUpdate (/Applications/
    at Object.enqueueSetState (/Applications/
    at Constructor.ReactComponent.setState (/Applications/
    at Constructor.onChange (/Applications/
    at /Applications/
    at Array.forEach (native)
    at Object.publish (/Applications/
    at emitChange (file:///Applications/
    at Object.dispatchToken.e.dispatcher.register.e [as ID_5] (file:///Applications/
    at Dispatcher._invokeCallback (/Applications/
    at Dispatcher.dispatch (/Applications/
    at batchingFunction (file:///Applications/
    at e.batchingFunction.e.batchingFunction.e [as batchingFunction] (file:///Applications/
    at e.dispatch (file:///Applications/
    at c (file:///Applications/
    at Object.u [as renderSuccess] (file:///Applications/
    at file:///Applications/
    at <anonymous>

Hi derkork,

Thank you for reporting.
That’s an invalid flowchart.
You can reproduce it here:
Please make sure if you write a correct flowchart like so:

st=>start: Start:>[blank]
op1=>operation: My Operation
sub1=>subroutine: My Subroutine
cond=>condition: Yes
or No?:>
io=>inputoutput: catch something...


I see, my bad. Maybe in a future version this could be indicated by a somewhat more helpful error message maybe even with an indication on what exactly is wrong. This would improve usability of the plugin. I’ll go learn the proper syntax now :smiley:

Yeah, you are right.
I published v0.1.4 which will show you more friendly message like this:

Unfortunately flowchart.js doesn’t support describing which part of your code is incorrect.

That’s great, thank you very much :+1: