Error: Incompatible bundle version or engine version detected. You cannot connect to a session created using a different bundle/editor version.

Created on 2 July 2024, 9 months ago

Problem/Motivation

If you upgrade from one version of ckeditor5_premium_features to another it seems to result in this:

bugsnag.js:2688 He: cloud-services-server-error: Incompatible bundle version or engine version detected. You cannot connect to a session created using a different bundle/editor version.
Explanation: Different versions of the editor may interpret the changes differently. To ensure correct document operations processing, it is required to use the same editor version for which the collaboration session was created.
Action: To check the bundle editor version used for the current session, you can use the REST path: https://help.cke-cs.com/api/docs#tag/Collaboration/paths/~1collaborations~1{document_id}~1details/get. If the editor version for the current session is different than the one most recently uploaded, please flush the current session and import the document again.
TraceId: 8b5f7453-0e23-4c5a-b22b-cc5c2348c1a3
Code: 400

Steps to reproduce

In my case, I did a bigger upgrade from drupal core 10.2.x to 10.3.x and this changed along with it. I can create new content but I cannot edit existing content. The content renders fine in the theme, but no content loads in the CK Editor editing panel:

Proposed resolution

Provide the ability to clear the session tracking, or automatically do so with update hooks when any such changes are made?

Remaining tasks

Decide if proposed resolution is correct

User interface changes

TBD

API changes

None

Data model changes

None

🐛 Bug report
Status

Active

Version

1.2

Component

Plugin: Collaboration

Created by

🇬🇧United Kingdom scott_euser

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @scott_euser
  • Assigned to salmonek
  • 🇵🇱Poland salmonek

    Hi @scott_euser

    With the Core update a CKEditor 5 version had changed, which currently is used as bundle version for the sessions.
    On render, the content is taken from database without any request to the cloud or on-premise server so that is expected to work fine.
    Inability to edit content is indeed caused by issue related to that error message. The module contains code to flush collaborative sessions in case cloud version and local are different, however if there is another user currently in session it won't happen.
    What is more in current state there is global flush call implemented, and if some session has active user it won't force flush that sessions and all unprocessed sessions (I don't know what is the order of flushing all sessions), that may include the session for the node user tries to edit. The implementation is bad also because it will attempt to flush also sessions for nodes created after the update.

    I'll post a fix that should resolve the issue changing the flush command to act only on collaboration document that is being loaded.

  • 🇬🇧United Kingdom scott_euser

    Thanks for the details. It's just in a staging env as the client is trialling your offer (you've sent them the quote), so I do think it's just 1 user so perhaps this is not applying:

    however if there is another user currently in session it won't happen

    But hard to say for sure.

    It would be good to have some way to trigger the flush then as of course we would have an unhappy client if all of a sudden they are no longer able to edit e.g. 5 nodes and forced to recreate them. E.g. A drush command (but maybe that's what you mean by the global flush command).

    In any case thanks for looking into it!

  • 🇵🇱Poland salmonek

    By flushing session I meant an API call to the cloud or on-prem server which will allow to connect users with new bundle version.

    I've added a drush command cke5_premium_ffacs which force flushes all sessions (even with connected users), however with single session flushing at a time the issue you encountered should be resolved. Unless there is an active user in the document which user is trying to edit - for such case I'll see if we can add a notification message that will appear in the editor window.

  • Status changed to Needs review 9 months ago
  • 🇬🇧United Kingdom scott_euser

    Hard to test this until next upgrade but it seems like it should not hurt to get this in and we can re-open if the issue recurs?

  • 🇵🇱Poland salmonek

    Drupal 11 will have CKEditor 5 updated to v42.0.0 - final relase this week.
    However you can simulate library version change for premium features module with the simple patch I attached.

  • 🇬🇧United Kingdom scott_euser

    For now their trial has expired so I am unable to test even with that sorry.

  • Status changed to Closed: cannot reproduce 3 months ago
  • Closing as we could not reproduce the issue.

Production build 0.71.5 2024