Skip to content

Incorrect disconnection reason #1565

@mabab

Description

@mabab

Describe the bug

When LiveKit Cloud cannot reconnect to the server after several attempts, it gets an error in the disconnected handler with reason=DUPLICATE_IDENTITY.

Reproduction

There is information about incidents here:
https://livekit-users.slack.com/archives/C048FRL1N2C/p1750258756078379

Logs

System Info

System:
    OS: macOS 15.5
    CPU: (10) arm64 Apple M2 Pro
    Memory: 65.67 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.11.0 - ~/.volta/tools/image/node/22.11.0/bin/node
    Yarn: 1.22.22 - ~/.volta/tools/image/yarn/1.22.22/bin/yarn
    npm: 10.9.0 - ~/.volta/tools/image/node/22.11.0/bin/npm
    pnpm: 10.8.0 - ~/.volta/tools/image/pnpm/10.8.0/bin/pnpm
    bun: 1.0.3 - ~/.bun/bin/bun
    Watchman: 2025.04.28.00 - /opt/homebrew/bin/watchman
  Browsers:
    Safari: 18.5
  npmPackages:
    livekit-client: ^2.13.5 => 2.13.5

Severity

serious, but I can work around it

Additional Information

I am currently processing connected, reconnecting, and reconnected events to get a relevant error. If the reconnecting process starts and there are no connected or reconnected events, then I treat the received DUPLICATE_IDENTITY error as a server unavailable error in order to switch to some fallback option.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions