Skip to content

replaceFile() seems to silently fail on existing collaborative documents. #2568

@andreHelios

Description

@andreHelios

What happened?

Calling activeEditor.replaceFile(file) on a document that is already open in a collaborative session (liveblocks) completes without any errors, but the editor continues to display the old content. The new imported docx file never replaces the existing document.

The last time this was working from what I can tell was in version: 1.17.0

Steps to reproduce

  1. Open an existing collaborative document (we use liveblocks).
  2. Wait for the editor and liveblocks to sync.
  3. Call superdoc.activeEditor.replaceFile(docxFile) with a valid docx file.
  4. The promise resolves, but the document content does not change. The old content remains.

SuperDoc version

1.22.0 and 1.23.0

Browser

Chrome

Additional context

Importing into a brand new document (empty liveblocks room) using replaceFile() works. The issue only seems to occur when importing into a room that already has synced Yjs content.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions