Skip to content

When yjs clientId changed by the yjs library, the awareness crash #19

@ulion

Description

@ulion

I encountered crash here:
TypeError: Cannot read properties of undefined (reading 'clock')

const clock = /** @type {MetaClientState} */ (awareness.meta.get(clientID)).clock

seems right after this happened:
https://github.com/yjs/yjs/blob/9f1548204ac8a5960c3112f96de4c962bbd264e8/src/utils/Transaction.js#L334

the yjs library may change clientId, but the awareness is not ready for that.

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