Conversion error - when saving a document to custom wopi host - x2t

Do you want to: Report a bug

Document Server version: Docker (9.0.2) official image - docker compose file
OS: Linux amd64 - Contabo - Ubuntu 24.04
Browser version: Chrome Latest
Additional information: I’m using custom WOPI host provider using Laravel (nagi1/laravel-wopi)

The Problem:
When editing any file (docx, xlsx, pptx) in the Document Server, the file gets corrupted after saving. Showing this image.

[2025-06-30T13:15:47.914] [DEBUG] [localhost] [63849] [Unknown User] nodeJS - error spawnAsync Error: /var/www/onlyoffice/documentserver/server/FileConverter/bin/x2t /tmp/ASC_CONVERT2025530-lydja8.egiag/params.xml exited with non-zero code: 89
    at ChildProcess.completionListener (/snapshot/server/FileConverter/node_modules/@expo/spawn-async/build/spawnAsync.js:42:23)
    at Object.onceWrapper (node:events:639:26)
    at ChildProcess.emit (node:events:524:28)
    at maybeClose (node:internal/child_process:1104:16)
    at ChildProcess._handle.onexit (node:internal/child_process:304:5)
    ...
    at spawnAsync (/snapshot/server/FileConverter/node_modules/@expo/spawn-async/build/spawnAsync.js:7:23)
    at spawnProcess (/snapshot/server/FileConverter/sources/converter.js)
    at spawnProcess.next (<anonymous>)
    at ExecuteTask (/snapshot/server/FileConverter/sources/converter.js)
    at ExecuteTask.next (<anonymous>)
    at /snapshot/server/FileConverter/sources/converter.js
    at Generator.next (<anonymous>)
    at onFulfilled (/snapshot/server/FileConverter/node_modules/co/index.js:65:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Steps to reproduce:

  1. Open a document in the Document Server.
  2. Make any changes to the document.
  3. Save the document. (auto save or manual save)

Expected result:
The document should save without corruption and retain all changes made.

Actual result:
The document gets corrupted after saving, and the following error is displayed

I’m running docker logs with logs4js debug level, here’s the full log output:

==> /var/log/onlyoffice/documentserver/converter/out.log <==
[2025-06-30T13:15:47.680] [INFO] [localhost] [63849] [Unknown User] nodeJS - Start Task

==> /var/log/onlyoffice/documentserver/docservice/out.log <==
[2025-06-30T13:15:47.692] [DEBUG] [localhost] [63849] [Unknown User] nodeJS - End command

==> /var/log/onlyoffice/documentserver/converter/out.log <==
[2025-06-30T13:15:47.701] [DEBUG] [localhost] [63849] [Unknown User] nodeJS - getWopiFileUrl url=https://wopi-host.com/wopi/files/63849/contents?access_token=2IN6iVS0l4JnuOJ7Y7OM2yaf1Ku6DGz1EkTOVRBV; headers={"X-WOPI-MaxExpectedSize":104857600,"X-WOPI-Proof":"gHz7knsLTQKQaWfChxo8PmHjL/HeCLVfIAiMsNXIl4S3ltyVzduF5T+dE3bmFZqwlRQSTbNkz17ZmwGM1sDYbHp3m2MV0afawf6RP+Pw0Kawbq1De9QvpCifcLKEhVo+pVb5KNNLa/InEVQmQcm18ydDQx0nXYplrb6LgBksWoafEeRj1Fd2BdAQrxMRy65CnMdJmIXFu41vy6det7mTcI/IFb/KuTUuhWgojtOXbzVtGjr46pH25NnasdSE3p6dRM2Govv3SvSmQK14eVtQ91Z4cOeAbpohqpHibcmdBZu3190APh5W80zH2EZobAuuZSTV3mbOi6ZtksciyrDv7A==","X-WOPI-ProofOld":"gHz7knsLTQKQaWfChxo8PmHjL/HeCLVfIAiMsNXIl4S3ltyVzduF5T+dE3bmFZqwlRQSTbNkz17ZmwGM1sDYbHp3m2MV0afawf6RP+Pw0Kawbq1De9QvpCifcLKEhVo+pVb5KNNLa/InEVQmQcm18ydDQx0nXYplrb6LgBksWoafEeRj1Fd2BdAQrxMRy65CnMdJmIXFu41vy6det7mTcI/IFb/KuTUuhWgojtOXbzVtGjr46pH25NnasdSE3p6dRM2Govv3SvSmQK14eVtQ91Z4cOeAbpohqpHibcmdBZu3190APh5W80zH2EZobAuuZSTV3mbOi6ZtksciyrDv7A==","X-WOPI-TimeStamp":"638868861476900000","X-WOPI-ClientVersion":"9.0.2.9"}
[2025-06-30T13:15:47.704] [DEBUG] [localhost] [63849] [Unknown User] nodeJS - isAllowDirectRequest url in jwt token res=true
[2025-06-30T13:15:47.868] [DEBUG] [localhost] [63849] [Unknown User] nodeJS - downloadFile complete filesize=38375 sha256=cf4dee97b768157250b7d1cd913dc2bee4904b28fe9903ce9187ce870076b3f4
[2025-06-30T13:15:47.914] [DEBUG] [localhost] [63849] [Unknown User] nodeJS - error spawnAsync Error: /var/www/onlyoffice/documentserver/server/FileConverter/bin/x2t /tmp/ASC_CONVERT2025530-lydja8.egiag/params.xml exited with non-zero code: 89
    at ChildProcess.completionListener (/snapshot/server/FileConverter/node_modules/@expo/spawn-async/build/spawnAsync.js:42:23)
    at Object.onceWrapper (node:events:639:26)
    at ChildProcess.emit (node:events:524:28)
    at maybeClose (node:internal/child_process:1104:16)
    at ChildProcess._handle.onexit (node:internal/child_process:304:5)
    ...
    at spawnAsync (/snapshot/server/FileConverter/node_modules/@expo/spawn-async/build/spawnAsync.js:7:23)
    at spawnProcess (/snapshot/server/FileConverter/sources/converter.js)
    at spawnProcess.next (<anonymous>)
    at ExecuteTask (/snapshot/server/FileConverter/sources/converter.js)
    at ExecuteTask.next (<anonymous>)
    at /snapshot/server/FileConverter/sources/converter.js
    at Generator.next (<anonymous>)
    at onFulfilled (/snapshot/server/FileConverter/node_modules/co/index.js:65:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[2025-06-30T13:15:47.915] [DEBUG] [localhost] [63849] [Unknown User] nodeJS - stdout:
[2025-06-30T13:15:47.915] [DEBUG] [localhost] [63849] [Unknown User] nodeJS - stderr:
[2025-06-30T13:15:47.915] [DEBUG] [localhost] [63849] [Unknown User] nodeJS - ExitCode (code=89;signal=null;error:-89)
[2025-06-30T13:15:47.916] [DEBUG] [localhost] [63849] [Unknown User] nodeJS - copyOrigin complete
[2025-06-30T13:15:47.930] [DEBUG] [localhost] [63849] [Unknown User] nodeJS - processUploadToStorage complete
[2025-06-30T13:15:47.934] [DEBUG] [localhost] [63849] [Unknown User] nodeJS - output (data={"ctx":{"tenant":"localhost","docId":"63849","userId":"Unknown User","wopiSrc":"https://wopi-host.com/wopi/files/63849"},"cmd":{"wopiParams":{"commonInfo":{"lockId":"63849","fileInfo":{"BaseFileName":"bigdata pap.docx","OwnerId":"10003","Size":38375,"Version":"3","UserId":"Unknown User","UserFriendlyName":"Leanne Reynolds III","ReadOnly":false,"UserCanNotWriteRelative":true,"UserCanWrite":true,"FileExtension":".docx","LastModifiedTime":"2025-06-30T13:14:15+00:00","DisablePrint":false,"HidePrintOption":false,"DisableExport":false,"HideExportOption":false,"DisableCopy":false,"SupportsUserInfo":false,"SupportsDeleteFile":false,"SupportsLocks":true,"SupportsGetLock":true,"SupportsUpdate":true,"SupportsRename":false,"SupportsExtendedLockLength":true,"ClosePostMessage":true}},"userAuth":{"wopiSrc":"https://wopi-host.com/wopi/files/63849","access_token":"2IN6iVS0l4JnuOJ7Y7OM2yaf1Ku6DGz1EkTOVRBV","access_token_ttl":0,"userSessionId":"63849","mode":"edit"},"LastModifiedTime":"2025-06-30T13:14:15+00:00"},"c":"open","id":"63849","userid":"Unknown User","format":"docx","url":"https://wopi-host.com/wopi/files/63849/contents?access_token=2IN6iVS0l4JnuOJ7Y7OM2yaf1Ku6DGz1EkTOVRBV","title":"bigdata pap.docx","outputformat":8193,"outputpath":"Editor.bin","embeddedfonts":false,"status_info":-89,"lcid":9,"nobase64":true,"convertToOrigin":".pdf.xps.oxps.djvu"}})
[2025-06-30T13:15:47.935] [DEBUG] [localhost] [63849] [Unknown User] nodeJS - postProcess
[2025-06-30T13:15:47.940] [DEBUG] [localhost] [63849] [Unknown User] nodeJS - deleteFolderRecursive
[2025-06-30T13:15:47.941] [INFO] [localhost] [63849] [Unknown User] nodeJS - End Task

==> /var/log/onlyoffice/documentserver/docservice/out.log <==
[2025-06-30T13:15:47.945] [INFO] [localhost] [63849] [Unknown User] nodeJS - receiveTask start: {"ctx":{"tenant":"localhost","docId":"63849","userId":"Unknown User","wopiSrc":"https://wopi-host.com/wopi/files/63849"},"cmd":{"wopiParams":{"commonInfo":{"lockId":"63849","fileInfo":{"BaseFileName":"bigdata pap.docx","OwnerId":"10003","Size":38375,"Version":"3","UserId":"Unknown User","UserFriendlyName":"Leanne Reynolds III","ReadOnly":false,"UserCanNotWriteRelative":true,"UserCanWrite":true,"FileExtension":".docx","LastModifiedTime":"2025-06-30T13:14:15+00:00","DisablePrint":false,"HidePrintOption":false,"DisableExport":false,"HideExportOption":false,"DisableCopy":false,"SupportsUserInfo":false,"SupportsDeleteFile":false,"SupportsLocks":true,"SupportsGetLock":true,"SupportsUpdate":true,"SupportsRename":false,"SupportsExtendedLockLength":true,"ClosePostMessage":true}},"userAuth":{"wopiSrc":"https://wopi-host.com/wopi/files/63849","access_token":"2IN6iVS0l4JnuOJ7Y7OM2yaf1Ku6DGz1EkTOVRBV","access_token_ttl":0,"userSessionId":"63849","mode":"edit"},"LastModifiedTime":"2025-06-30T13:14:15+00:00"},"c":"open","id":"63849","userid":"Unknown User","format":"docx","url":"https://wopi-host.com/wopi/files/63849/contents?access_token=2IN6iVS0l4JnuOJ7Y7OM2yaf1Ku6DGz1EkTOVRBV","title":"bigdata pap.docx","outputformat":8193,"outputpath":"Editor.bin","embeddedfonts":false,"status_info":-89,"lcid":9,"nobase64":true,"convertToOrigin":".pdf.xps.oxps.djvu"}}

==> /var/log/onlyoffice/documentserver/converter/out.log <==
[2025-06-30T13:15:47.950] [INFO] [localhost] [63849] [Unknown User] nodeJS - ackTask addResponse

==> /var/log/onlyoffice/documentserver/docservice/out.log <==
[2025-06-30T13:15:47.954] [DEBUG] [localhost] [63849] [Unknown User] nodeJS - getCallbackByUserIndex: userIndex = undefined callbacks = {"userIndex":1,"callback":"{\"lockId\":\"63849\",\"fileInfo\":{\"BaseFileName\":\"bigdata pap.docx\",\"OwnerId\":\"10003\",\"Size\":38375,\"Version\":\"3\",\"UserId\":\"Unknown User\",\"UserFriendlyName\":\"Leanne Reynolds III\",\"ReadOnly\":false,\"UserCanNotWriteRelative\":true,\"UserCanWrite\":true,\"FileExtension\":\".docx\",\"LastModifiedTime\":\"2025-06-30T13:14:15+00:00\",\"DisablePrint\":false,\"HidePrintOption\":false,\"DisableExport\":false,\"HideExportOption\":false,\"DisableCopy\":false,\"SupportsUserInfo\":false,\"SupportsDeleteFile\":false,\"SupportsLocks\":true,\"SupportsGetLock\":true,\"SupportsUpdate\":true,\"SupportsRename\":false,\"SupportsExtendedLockLength\":true,\"ClosePostMessage\":true}}"}{"userIndex":2,"callback":"{\"wopiSrc\":\"https://wopi-host.com/wopi/files/63849\",\"access_token\":\"2IN6iVS0l4JnuOJ7Y7OM2yaf1Ku6DGz1EkTOVRBV\",\"access_token_ttl\":0,\"userSessionId\":\"63849\",\"mode\":\"edit\"}"}
[2025-06-30T13:15:47.954] [DEBUG] [localhost] [63849] [Unknown User] nodeJS - getCallbackByUserIndex: userIndex = 1 callbacks = {"userIndex":1,"callback":"{\"lockId\":\"63849\",\"fileInfo\":{\"BaseFileName\":\"bigdata pap.docx\",\"OwnerId\":\"10003\",\"Size\":38375,\"Version\":\"3\",\"UserId\":\"Unknown User\",\"UserFriendlyName\":\"Leanne Reynolds III\",\"ReadOnly\":false,\"UserCanNotWriteRelative\":true,\"UserCanWrite\":true,\"FileExtension\":\".docx\",\"LastModifiedTime\":\"2025-06-30T13:14:15+00:00\",\"DisablePrint\":false,\"HidePrintOption\":false,\"DisableExport\":false,\"HideExportOption\":false,\"DisableCopy\":false,\"SupportsUserInfo\":false,\"SupportsDeleteFile\":false,\"SupportsLocks\":true,\"SupportsGetLock\":true,\"SupportsUpdate\":true,\"SupportsRename\":false,\"SupportsExtendedLockLength\":true,\"ClosePostMessage\":true}}"}{"userIndex":2,"callback":"{\"wopiSrc\":\"https://wopi-host.com/wopi/files/63849\",\"access_token\":\"2IN6iVS0l4JnuOJ7Y7OM2yaf1Ku6DGz1EkTOVRBV\",\"access_token_ttl\":0,\"userSessionId\":\"63849\",\"mode\":\"edit\"}"}
[2025-06-30T13:15:47.954] [DEBUG] [localhost] [63849] [Unknown User] nodeJS - getCallbacks: callbacks = {"userIndex":1,"callback":"{\"lockId\":\"63849\",\"fileInfo\":{\"BaseFileName\":\"bigdata pap.docx\",\"OwnerId\":\"10003\",\"Size\":38375,\"Version\":\"3\",\"UserId\":\"Unknown User\",\"UserFriendlyName\":\"Leanne Reynolds III\",\"ReadOnly\":false,\"UserCanNotWriteRelative\":true,\"UserCanWrite\":true,\"FileExtension\":\".docx\",\"LastModifiedTime\":\"2025-06-30T13:14:15+00:00\",\"DisablePrint\":false,\"HidePrintOption\":false,\"DisableExport\":false,\"HideExportOption\":false,\"DisableCopy\":false,\"SupportsUserInfo\":false,\"SupportsDeleteFile\":false,\"SupportsLocks\":true,\"SupportsGetLock\":true,\"SupportsUpdate\":true,\"SupportsRename\":false,\"SupportsExtendedLockLength\":true,\"ClosePostMessage\":true}}"}{"userIndex":2,"callback":"{\"wopiSrc\":\"https://wopi-host.com/wopi/files/63849\",\"access_token\":\"2IN6iVS0l4JnuOJ7Y7OM2yaf1Ku6DGz1EkTOVRBV\",\"access_token_ttl\":0,\"userSessionId\":\"63849\",\"mode\":\"edit\"}"}
[2025-06-30T13:15:47.954] [DEBUG] [localhost] [63849] [Unknown User] nodeJS - parseWopiCallback wopiParams:{"commonInfo":{"lockId":"63849","fileInfo":{"BaseFileName":"bigdata pap.docx","OwnerId":"10003","Size":38375,"Version":"3","UserId":"Unknown User","UserFriendlyName":"Leanne Reynolds III","ReadOnly":false,"UserCanNotWriteRelative":true,"UserCanWrite":true,"FileExtension":".docx","LastModifiedTime":"2025-06-30T13:14:15+00:00","DisablePrint":false,"HidePrintOption":false,"DisableExport":false,"HideExportOption":false,"DisableCopy":false,"SupportsUserInfo":false,"SupportsDeleteFile":false,"SupportsLocks":true,"SupportsGetLock":true,"SupportsUpdate":true,"SupportsRename":false,"SupportsExtendedLockLength":true,"ClosePostMessage":true}},"userAuth":{"wopiSrc":"https://wopi-host.com/wopi/files/63849","access_token":"2IN6iVS0l4JnuOJ7Y7OM2yaf1Ku6DGz1EkTOVRBV","access_token_ttl":0,"userSessionId":"63849","mode":"edit"},"LastModifiedTime":"2025-06-30T13:14:15+00:00"}
[2025-06-30T13:15:47.955] [DEBUG] [localhost] [63849] [Unknown User] nodeJS - receiveTask publish: {"type":"open","status":"needparams"}

==> /var/log/onlyoffice/documentserver/converter/out.log <==
[2025-06-30T13:15:47.950] [INFO] [localhost] [63849] [Unknown User] nodeJS - ackTask ack

==> /var/log/onlyoffice/documentserver/docservice/out.log <==
[2025-06-30T13:15:47.956] [INFO] [localhost] [63849] [Unknown User] nodeJS - receiveTask end
[2025-06-30T13:15:47.959] [DEBUG] [localhost] [63849] [Unknown User] nodeJS - pubsub message start:{"type":7,"ctx":{"tenant":"localhost","docId":"63849","userId":"Unknown User","wopiSrc":"https://wopi-host.com/wopi/files/63849"},"cmd":{"wopiParams":{"commonInfo":{"lockId":"63849","fileInfo":{"BaseFileName":"bigdata pap.docx","OwnerId":"10003","Size":38375,"Version":"3","UserId":"Unknown User","UserFriendlyName":"Leanne Reynolds III","ReadOnly":false,"UserCanNotWriteRelative":true,"UserCanWrite":true,"FileExtension":".docx","LastModifiedTime":"2025-06-30T13:14:15+00:00","DisablePrint":false,"HidePrintOption":false,"DisableExport":false,"HideExportOption":false,"DisableCopy":false,"SupportsUserInfo":false,"SupportsDeleteFile":false,"SupportsLocks":true,"SupportsGetLock":true,"SupportsUpdate":true,"SupportsRename":false,"SupportsExtendedLockLength":true,"ClosePostMessage":true}},"userAuth":{"wopiSrc":"https://wopi-host.com/wopi/files/63849","access_token":"2IN6iVS0l4JnuOJ7Y7OM2yaf1Ku6DGz1EkTOVRBV","access_token_ttl":0,"userSessionId":"63849","mode":"edit"},"LastModifiedTime":"2025-06-30T13:14:15+00:00"},"c":"open","id":"63849","userid":"Unknown User","format":"docx","url":"https://wopi-host.com/wopi/files/63849/contents?access_token=2IN6iVS0l4JnuOJ7Y7OM2yaf1Ku6DGz1EkTOVRBV","title":"bigdata pap.docx","outputformat":8193,"outputpath":"Editor.bin","embeddedfonts":false,"status_info":-89,"lcid":9,"nobase64":true,"convertToOrigin":".pdf.xps.oxps.djvu"},"output":{"type":"documentOpen","data":{"type":"open","status":"needparams"}},"needUrlKey":"63849/origin.docx","needUrlMethod":1,"needUrlType":1}
[2025-06-30T13:15:47.961] [DEBUG] [localhost] [63849] [Unknown User] nodeJS - sendData: type = documentOpen
[2025-06-30T13:16:48.952] [DEBUG] [localhost] [docId] [userId] nodeJS - expireDoc connections.length = 1
[2025-06-30T13:16:49.221] [INFO] [localhost] [docId] [userId] nodeJS - checkDocumentExpire start
[2025-06-30T13:16:49.221] [INFO] [localhost] [docId] [userId] nodeJS - checkDocumentExpire end: startSaveCount = 0, removedCount = 0

Note: https://wopi-host.com is masked link from the original it sometimes works and save the file but in many situations it corrupts the file.

Problem:

Corrupted File:
bigdata pap-coruputed.docx (37.5 KB)

Original File:
bigdata pap-coruputed.docx (37.5 KB)

Hi @nagi

Code -89 is related to the error that means that additional parameters for opening txt file are required.

Hello @Nikolas
I’m not trying to convert anything. All I want is a dead-simple setup where I can open Office files Docs, Sheets, PowerPoints, edit them in the browser, and save them back to my server. That’s it.

After weeks of digging through logs and trying every possible config, I think I’ve traced the root issue to a specific dependency. I’m not 100% sure, but what I am sure of is this: the files keep getting corrupted, all types of office files.

I’ve tried disabling all conversions completely. I’ve tested both the official Docker images and installed everything manually on a clean Ubuntu server (8 GB RAM, 4 CPUs, plenty of storage). Same result every time: corruption.

I even hacked together a workaround using the command service to force-save on close. Still no luck.

I just need help fixing that or at least a where I can start looking!

Any update here?

Thank you @Constantine For taking the time to reply and support:

I was using collabora office without any problem but as soon as I tried onlyoffice the corrupted files issue eated my brain away.

I tried every possible solution I know

I’m sorry my bad for the wrong files here’s the correct files:

bigdata pap-original.docx (36.7 KB)
bigdata pap-coruputed.docx (37.5 KB)

  • I’m using custom wopi host using laravel that implements wopi protocol 100% and passing microsoft testing.
  • I’m using a very simple put function that saves the raw content comes from onlyoffice client to the file

as part of my effort of solving this issue I tried to use Command Service to force save the whole file when exit saving or auto save.

When I open any office file (docx, pptx, xlsx) and make any change and then either:

  • auto save the file and then close it
  • force save the file and then close it

when I tried to open the file again using onlyoffice client it just get corrupted.

Here’s more logs:

When I open the file

Open-file-logs.log (38.1 KB)

When I tried to auto save the file and then close it

auto-save-close-file.log (46.1 KB)

When I open the file it get’s corrupted:

open-file-after-courrpt.log (42.8 KB)

Please @Constantine, @Nikolas

Any direction I could take?

@nagi

Sorry for the delay in getting back to you — I’m now reviewing your case carefully to see how we can help.
Thanks for providing the detailed info, logs, and files. I’ll take a closer look and get back to you as soon as I have more insights.

Hello @Nikolas is there updates from side or a direction i could take?

Hello @nagi, I’ll join this thread too. Can you confirm whether the issue also occurs in the test example?

Sorry for late reply, I didnt get notification,

on the example it works most of the time 1/10 it get’s corrupted

I have just all attached files – both original and corrupted DOCX files can be opened without TXT options and in all 3 latest logs I was unable to find any relevant information about error 89.

Can you please reproduce the issue from your end and share fresh logs with error 89?

Also, please describe which changes you make, because I cannot reproduce the issue with integrated test example and WOPI in there.

UPD: It is possible that the file after save is saved as TXT, but with DOCX extension. To verify this you can try removing"txt" as an option for editing, for that you should add following line into local.json config of your Document Server into wopi array:

  "wopi": {
    "enable": true,
    ...
    "wordEdit": ["docx", "dotx", "docm", "odt"] // no txt
  },

After that you should restart services of Document Server with supervisoctl restart all and reproduce the issue. If after save opening file does not render the editor, then file is eventually saved as TXT.

Thank you @Constantine for your time!

1- I updated to latest 9.0.4
2- removed “txt” from wopi wordEdit
3- did restarts
4- when the file autosaved it get corrupted of any type (word, presentation, cells)
5- when I click save and wait until it gives me “changes saved” the file opens normally but when I click save and hit exit the file gets corrupted!

here’s the logs I hope it helps!

docservice-out.log (468.8 KB)
converter-out.log (50.2 KB)

Can you record this behavior on a video? It is not quite clear how you exit, possibly I am missing something. “Changes saved” appears either automatically in Fast mode or after using save button in Strict mode, this is expected – in this case scenario the changes are sent to the backend service. However, what happens after that? Do you close the editor? If so, what “click save and hit exit the file” refers to?