Skip to content

Missing editorDataRedis module in compiled binary (pkg) #267

Description

@joaquinniicolas

Setting services.CoAuthoring.server.editorDataStorage to "editorDataRedis" in local.json causes the DocService to crash on startup with a MODULE_NOT_FOUND error. The module editorDataRedis.js is not included in the native .deb package (compiled binary via pkg), making it impossible to use Redis for co-editing session persistence.

The same configuration works fine in the Docker image (ghcr.io/euro-office/documentserver:v9.3.2), confirming the module exists in the source but is excluded from the native package build.

This means:

  • Editing sessions are stored in volatile RAM only (native package)
  • Session data is lost on DocService restart or timeout
  • Users get "File version has changed. The page will be refreshed" error when re-opening a file
  • Forcesave callbacks still work (data is persisted to disk), but session tracking is lost

Environment

  • Package: euro-office-documentserver
  • Version: 9.3.1-dev (build 37)
  • OS: Ubuntu 24.04 LTS (Noble)
  • Installation: Native package (.deb) on bare metal
  • Architecture: amd64
  • Docker image (working): ghcr.io/euro-office/documentserver:v9.3.2

Steps to Reproduce

  1. Install Euro-Office 9.3.1-dev via .deb package on Ubuntu
  2. Edit local.json and set:
    {
      "services": {
        "CoAuthoring": {
          "server": {
            "editorDataStorage": "editorDataRedis"
          },
          "redis": {
            "host": "localhost",
            "port": 6379
          }
        }
      }
    }
  3. Restart DocService:
    sudo systemctl restart ds-docservice
  4. Check the logs:
    sudo journalctl -u ds-docservice --no-pager | tail -20

Actual Behavior

DocService crashes immediately with:

Error: Cannot find module './../../DocService/sources/editorDataRedis'
Require stack:
- /snapshot/server/Common/sources/notificationService.js
- /snapshot/server/DocService/sources/utilsDocService.js
- /snapshot/server/DocService/sources/DocsCoServer.js
- /snapshot/server/DocService/sources/server.js

code: 'MODULE_NOT_FOUND',
pkg: true

Then systemd restarts it in a loop (exit code 1):

systemd[1]: ds-docservice.service: Failed with result 'exit-code'.

Root Cause

The .deb package is compiled with pkg, which bundles all JavaScript files into a single executable binary. The file editorDataRedis.js (in DocService/sources/) was not included in the pkg compilation for the native package, but it IS included in the Docker image build.

This is a build configuration discrepancy: the Docker image (v9.3.2) and the native package (9.3.1-dev) use different build pipelines or pkg manifests, and editorDataRedis.js is excluded from the native build.

Additional Context

  • The redis: { host, port } configuration in local.json works correctly for other Redis features (locks, presence, pub/sub, etc.)
  • The issue is exclusively with the editorDataRedis.js module being omitted from the .deb package pkg binary
  • Callbacks from the DocService to the backend API work correctly (confirmed via nginx logs showing 200 OK responses)

Logs

Jul 02 11:48:07 vps-4609488-x sh[227775]: Error: Cannot find module './../../DocService/sources/editorDataRedis'
Jul 02 11:48:07 vps-4609488-x sh[227775]: Require stack:
Jul 02 11:48:07 vps-4609488-x sh[227775]: - /snapshot/server/Common/sources/notificationService.js
Jul 02 11:48:07 vps-4609488-x sh[227775]: - /snapshot/server/DocService/sources/utilsDocService.js
Jul 02 11:48:07 vps-4609488-x sh[227775]: - /snapshot/server/DocService/sources/DocsCoServer.js
Jul 02 11:48:07 vps-4609488-x sh[227775]: - /snapshot/server/DocService/sources/server.js
Jul 02 11:48:07 vps-4609488-x sh[227775]: code: 'MODULE_NOT_FOUND',
Jul 02 11:48:07 vps-4609488-x sh[227775]: pkg: true

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    📄 To do

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions