ckeditor / ckeditor5

Powerful rich text editor framework with a modular architecture, modern integrations, and features like collaborative editing.
https://ckeditor.com/ckeditor-5
Other
9.6k stars 3.71k forks source link

Operations were not added to the collaborative session - Question regarding base version difference #16558

Closed w-beom closed 5 months ago

w-beom commented 5 months ago

I am attempting to use the real-time collaboration plugin to enable collaborative editing. However, when User A is working on a document and User B tries to access and edit the same document, all the messages that User A was working on disappear, and the following messages are logged:

{
  "msg": "Operations were not added to the collaborative session - base version difference (documentId: document-id, documentVersion: 223, operationsCount: 4, missingHistoryCount: 2)",
  "traceId": "be83f9c1-21d2-4268-a548-5acc609f7b2e",
  "data": {
    "operationsSizeBytes": 121,
    "missingHistorySizeBytes": 55,
    "environmentId": "your-environmentId",
    "missingHistoryCount": 2,
    "document": {
      "sessionCreatedAt": "2024-06-12T14:52:01.488Z",
      "offset": 0,
      "lastUpdatedAt": "2024-06-13T01:06:18.525Z",
      "hasInitialData": false,
      "bundleVersion": "41.4.2",
      "storeOperations": false,
      "editorBundleExists": false,
      "operationsSize": 5102,
      "version": 223,
      "isLoaded": false,
      "lastSavedVersion": 0,
      "useConnectCompression": false,
      "usePersistentStorage": false,
      "loadedVersion": null
    },
    "operationsCount": 4,
    "documentId": "document-id"
  },
  "level": 30,
  "time": "2024-06-13T01:07:18.940Z",
  "tags": "details",
  "status": "success"
}
{
  "msg": "The user did not add operations due to version difference in the collaborative session (documentId: document-id, baseVersion: 221, userId: 520441435, operationsCount: 4)",
  "traceId": "be83f9c1-21d2-4268-a548-5acc609f7b2e",
  "data": {
    "operationsSizeBytes": 121,
    "environmentId": "your-environmentId",
    "baseVersion": 221,
    "lastOperationId": "956852663bdbca86f",
    "operationsCount": 4,
    "documentId": "document-id",
    "userId": "520441435"
  },
  "level": 30,
  "time": "2024-06-13T01:07:18.941Z",
  "tags": "business",
  "status": "success"
}

How should I resolve this issue?

FilipTokarski commented 5 months ago

Thank you @w-beom for the report. I'm moving this request to the support channel.