Debugging
OnlyOffice Issues
Troubleshooting OnlyOffice integration problems.
Troubleshooting OnlyOffice integration problems.
Editor Not Loading
Configuration Missing
Check:
- OnlyOffice server URL is configured
BACKEND_URLenvironment variable is set- Settings page configuration
Solutions:
- Configure OnlyOffice in Settings (admin)
- Set
BACKEND_URLin.env - Verify OnlyOffice server is accessible
File Not Opening
Check:
- File type is supported (.docx, .xlsx, .pptx, .pdf)
- File exists and is accessible
- OnlyOffice server is running
- File MIME type matches extension
Solutions:
- Verify file type is supported
- Check file permissions
- Verify OnlyOffice server is accessible
- Ensure file content matches extension (e.g., .txt renamed to .docx will fail)
MIME Type Mismatch
Error: "Cannot open file: type mismatch (expected .docx format)"
Cause:
- File content does not match extension
- File was renamed with incorrect extension
Solutions:
- Upload file with correct extension
- Do not rename files to different types
- File content must match declared type
Callback Issues
Callback Not Working
Check:
BACKEND_URLis correct and accessible- OnlyOffice server can reach backend
- Callback endpoint is working
Solutions:
- Verify
BACKEND_URLis publicly accessible - Check firewall rules
- Test callback endpoint manually
Auto-Save Issues
Changes Not Saving Until Close
Expected behavior: Documents save to storage every five minutes by default while being edited.
Check:
- The background worker is running:
npm run workerordocker compose ps worker - The
onlyoffice-forcesavequeue has a schedule for the document key - Callback logs show status 6 with
forcesavetype: 0
If no schedule appears:
- Check app logs for
[ONLYOFFICE-AUTOSAVE] Failed to schedule document - Verify PostgreSQL and the pg-boss schema are reachable from the app
- Open the document again after resolving the queue error
If force-save jobs fail:
- Check the OnlyOffice URL is correct and reachable from the worker
- If OnlyOffice uses HTTPS with a self-signed certificate, verify
rejectUnauthorized: falseis set in the request options - Check OnlyOffice container logs:
docker logs onlyoffice_documentserver
If forcesave commands return non-200:
- Status 403: JWT secret mismatch between backend and OnlyOffice server
- Status 404 on both
/commandand/coauthoring/CommandService.ashx: The proxy is not exposing the command service - Check worker logs and failed jobs in the
onlyoffice-forcesavequeue
Auto-Save Running After Document Closed
Cause: Callback with status 2 or 4 was not received, so the document schedule was not removed. A later force-save response reporting that the document is closed also removes it.
Check:
- OnlyOffice server can reach the callback URL (
BACKEND_URL) - Callback endpoint returns
{ "error": 0 }(required for OnlyOffice to stop retrying) - No network/firewall issues between OnlyOffice container and backend
Only Manual Saves (Ctrl+S) Work
Cause: The auto-save service is not sending forcesave commands, or they are being rejected.
Check:
- Failed jobs in the
onlyoffice-forcesavequeue and worker logs - OnlyOffice JWT secret matches between backend settings and OnlyOffice server config
- OnlyOffice server is accessible from the backend host (not just from the browser)
Related Topics
- OnlyOffice API - API endpoints
- Architecture - System architecture