Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read properties of null (reading 'parent') during flushLocalChanges #386

Open
rcbevans opened this issue Feb 23, 2023 · 0 comments
Open

Comments

@rcbevans
Copy link

rcbevans commented Feb 23, 2023

I'm using

    "@slate-yjs/core": "^0.3.1",
    "@slate-yjs/react": "^0.3.0",
    "slate": "^0.91.3",
    "slate-history": "^0.86.0",
    "slate-hyperscript": "^0.77.0",
    "slate-react": "^0.91.3",
    "y-protocols": "^1.0.5",
    "y-websocket": "^1.4.5",
    "yjs": "^13.5.47",

I am seeing infrequent errors (Cannot read properties of null (reading 'parent')) coming from yjs YText (yjs/src/types/YText.js) that I have been unable to reproduce, but are cropping up occasionally in production telemetry when users are collaborating on a document.

Call stack is

Crashed in non-app:
../../../node_modules/yjs/src/types/YText.js
in deleteText
<anonymous> in Array.forEach
Called from:
../../../node_modules/@slate-yjs/core/src/plugins/withYjs.ts
in f
<anonymous> in Array.forEach
Called from:
../../../node_modules/@slate-yjs/core/src/plugins/withYjs.ts
in e.flushLocalChanges

The crashing line is

  const parent = /** @type {AbstractType<any>} */ (/** @type {Item} */ (currPos.left || currPos.right).parent)

I'm not sure this is a slate-yjs specific (or even necessarily related) issue given the erroring code is in yjs:::YText, I will post an issue there too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant