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.

autonumber doesn't seem to work

See original GitHub issue

Trying to render a sequence diagram with autonumber.


sequenceDiagram autonumber Caller->>+Receiver:Invoke

Throws this error:

(node:13159) UnhandledPromiseRejectionWarning: Error: Evaluation failed: Error: Parse error on line 2:
...agram    autonumber    Caller->>+Recei
----------------------^
Expecting 'SOLID_OPEN_ARROW', 'DOTTED_OPEN_ARROW', 'SOLID_ARROW', 'DOTTED_ARROW', 'SOLID_CROSS', 'DOTTED_CROSS', got 'NL'
    at x.parseError (file:///usr/local/lib/node_modules/mermaid.cli/mermaid.min.js:1:423219)
    at x.parse (file:///usr/local/lib/node_modules/mermaid.cli/mermaid.min.js:1:424385)
    at Object.e.draw (file:///usr/local/lib/node_modules/mermaid.cli/mermaid.min.js:1:720085)
    at Object.render (file:///usr/local/lib/node_modules/mermaid.cli/mermaid.min.js:1:760928)
    at s (file:///usr/local/lib/node_modules/mermaid.cli/mermaid.min.js:8:233)
    at Object.init (file:///usr/local/lib/node_modules/mermaid.cli/mermaid.min.js:8:318)
    at __puppeteer_evaluation_script__:17:20
    at ExecutionContext._evaluateInternal (/usr/local/lib/node_modules/mermaid.cli/node_modules/puppeteer/lib/ExecutionContext.js:122:13)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)

version: ‘8.7.0’,

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
MindaugasLaganeckascommented, Nov 23, 2020

@grangerjs : can we close this issue?

1reaction
grangerjscommented, Sep 1, 2020

I’m also seeing this issue when running mmdc -i account-statement-token.mmd -o account-statement-token.png -c config.json. If I remove autonumber from account-statement-token.mmd with no other changes, the diagram is successfully generated.

account-statement-token.mmd

sequenceDiagram
  autonumber
  title: GET /account-statement-token/:accountId
  participant C as client
  participant R as router
  participant S as validation/serialization
  participant H as handler
  participant A as inner-api auth
  participant I as inner-api
  C ->> R: GET /account-statement-token/:accountId
  R ->> S: validate params
  S ->> H: params validated
  H ->> A: request auth token
  A -->> H: auth token returned
  H ->> I: request statement token
  I -->> S: statement token returned
  S -->> C: 200 - OK
  Note over S: serialize response

config.json

{
  "logLevel": 0,
  "sequence": { "actorMargin": 50, "showSequenceNumbers": true }
}

error output

❯ mmdc -i account-statement-token.mmd -o account-statement-token.png -c config.json
(node:19175) UnhandledPromiseRejectionWarning: Error: Evaluation failed: Error: Parse error on line 2:
...Diagram  autonumber  title: GET /accou
----------------------^
Expecting 'SOLID_OPEN_ARROW', 'DOTTED_OPEN_ARROW', 'SOLID_ARROW', 'DOTTED_ARROW', 'SOLID_CROSS', 'DOTTED_CROSS', got 'NL'
    at x.parseError (file:///Users/jeremygranger/.nvm/versions/node/v12.16.2/lib/node_modules/mermaid.cli/mermaid.min.js:1:423219)
    at x.parse (file:///Users/jeremygranger/.nvm/versions/node/v12.16.2/lib/node_modules/mermaid.cli/mermaid.min.js:1:424385)
    at Object.e.draw (file:///Users/jeremygranger/.nvm/versions/node/v12.16.2/lib/node_modules/mermaid.cli/mermaid.min.js:1:720085)
    at Object.render (file:///Users/jeremygranger/.nvm/versions/node/v12.16.2/lib/node_modules/mermaid.cli/mermaid.min.js:1:760928)
    at s (file:///Users/jeremygranger/.nvm/versions/node/v12.16.2/lib/node_modules/mermaid.cli/mermaid.min.js:8:233)
    at Object.init (file:///Users/jeremygranger/.nvm/versions/node/v12.16.2/lib/node_modules/mermaid.cli/mermaid.min.js:8:318)
    at __puppeteer_evaluation_script__:17:20
    at ExecutionContext._evaluateInternal (/Users/jeremygranger/.nvm/versions/node/v12.16.2/lib/node_modules/mermaid.cli/node_modules/puppeteer/lib/ExecutionContext.js:122:13)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async ExecutionContext.evaluate (/Users/jeremygranger/.nvm/versions/node/v12.16.2/lib/node_modules/mermaid.cli/node_modules/puppeteer/lib/ExecutionContext.js:48:12)
    at async ElementHandle.evaluate (/Users/jeremygranger/.nvm/versions/node/v12.16.2/lib/node_modules/mermaid.cli/node_modules/puppeteer/lib/JSHandle.js:55:12)
    at async ElementHandle.$eval (/Users/jeremygranger/.nvm/versions/node/v12.16.2/lib/node_modules/mermaid.cli/node_modules/puppeteer/lib/JSHandle.js:478:20)
  -- ASYNC --

When autonumber is removed from the .mmd file, this is the output: image

Read more comments on GitHub >

github_iconTop Results From Across the Web

Autonumber not working anymore - Power Platform Community
Solved: Hi everybody, In the dataverse, i have a table that uses an autonumber column as primary name column. It worked fine until...
Read more >
Autonumbering does not always work? - Smartsheet Community
Hi there. I have an order reference column set to auto number. It is prefixed by the date and then an autonumber for...
Read more >
Auto Number Search doesn't seem to work | Access World Forums
Hi, Could someone please explain why I can't search and auto number field? I need to be able to do this and ......
Read more >
Restart or reset an 'Auto-Number' field - Salesforce Help
For step 3, select 'Auto-Number' for the Data Type. Note: This does not work for Objects installed by managed released packages (because the...
Read more >
Auto number position outside head does not seem to work
Your margins are too small. Plus, you need to add a value for the left margin. ... - mc-auto-number-offset: defines the point to...
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