Error reference / sequenceDiagram

Trying to inactivate an inactive participant

A deactivate call has no matching activate for that participant, so Mermaid has no active lifeline to turn off.

Trying to inactivate an inactive participant (A)

Why this happens

Sequence diagram activation bars are stack-based: activate A (or the shorthand +A on a message) pushes an active lifeline for A, and deactivate A (or -A) pops it. Calling deactivate without a matching activate first -- or deactivating twice -- leaves nothing to pop.

This commonly happens after editing a sequence diagram: an activate line gets deleted or moved, but the matching deactivate is left behind.

How to fix it

Add the missing activate A before the deactivate, or remove the extra deactivate. For simple call/return pairs, the shorthand A->>+B: request ... B-->>-A: response is easier to keep balanced than separate activate/deactivate lines.

Broken

Fails to parse

Rendering preview...
sequenceDiagram
    participant A
    A-->>A: hi
    deactivate A

Fixed

Renders correctly

Rendering preview...
sequenceDiagram
    participant A
    activate A
    A-->>A: hi
    deactivate A
Open fixed version in studio

More errors