Open codello opened 3 years ago
Do you have any directories in /var/lib/onlyoffice/documentserver/App_Data/cache/files/ or /var/lib/onlyoffice/documentserver/App_Data/cache/files/forgotten/ the name of which match any of the problematic files' ID? According to your logs, one of them might be "1989457682". That should be inside the Document Server's container. Also, please try reproducing the issue with your browser's console open, export the .har file from the Network tab and send it to us.
Thanks for your response! I created the logs in a test environment and didn't keep the containers so I can't exactly check this ID. I recreated the test setup and reproduced the error and I also checked in the production environment:
/var/lib/onlyoffice/documentserver/App_Data/cache/files/
and in the forgotten
subfolder.However the folders do match the respective IDs of the files in the task_result
table.
forgotten
folder. The file corresponding to the ID in the JWT in the respective task_result
row corresponds to a docx
file. When I open the file in ONLYOFFICE it is empty (downloading the file however shows that there should be some text inside). The subfolder in the forgotten
folder contains a single output.docx
which is almost the same file as the one downloaded from NextCloud (same content but some formatting is different).files
folder there are subfolders, some of which correspond to rows in the task_result
table that have JWTs with files that can be opened in ONLYOFFICE and some match files that can't be opened.I have a feeling that this issue is somehow related to conflicting versions of the same file or at least ONLYOFFICE thinking that there are conflicts...
Also, please try reproducing the issue with your browser's console open, export the .har file from the Network tab and send it to us.
I have reproduced the problem as shown in the GIF above. Every time a new ONLYOFFICE tab is opened, I have opened the web inspector and reloaded the page. Just before closing an ONLYOFFICE tab I have exported the .har
file.
Again I have replaced the domain names:
cloud.domain.tld
is the address of the NextCloud instanceoffice.domain.tld
is the public address of the ONLYOFFICE document server<serverIP>
is the server's public IP addressI also checked the JS log but except for a ton of jQuery deprecation warnings there does not seem to be anything there.
Please do tell me if I can provide anything else to help. I really appreciate your help!
I am experiencing a bug where ONLYOFFICE sometimes cannot open documents. ONLYOFFICE displays an error message "An error has occurred while opening the file" with no further indication of the problem. This seems to be the same behavior described in #146.
I hope this is the correct place to report this issue. Otherwise I'll gladly report this issue in ONLYOFFICE/DocumentServer.
Reproducing the Problem
I originally observed the issue when modifying a document using Excel with a mapped WebDav drive. The issue also sometimes occurs when replacing a document by manually uploading a new version. However I was not able to consistently reproduce the error this way.
I was however able to (more or less) reliably reproduce the error in the following way:
xlsx
andpptx
files but not withdocx
files.Despite my best efforts I am not able to reproduce the issue 100% reliably. The above steps result in the error most of the time but not always. Outside of a group folder I was not able to reproduce the error using the above steps.
What is the expected behavior?
I expect to be able to open the same document multiple times without issues. Moreover I expect to be able to change a document in NextCloud (e.g. by editing it with Excel over WebDAV) and then be able to open it with ONLYOFFICE.
Additional Context
task_result
table solves the issue at least temporarily. Recreating the ONLYOFFICE docker container does as well (probably because the database gets recreated). However I am able to repeatedly reproduce this issue, even starting with a clean database.docx
files, I have in my testing encountered a situation where adocx
file was suddenly empty. This occurred after the same steps described above.Additional Files
ONLYOFFICE configuration
This is the `local.json` from the docker container. ```json { "services": { "CoAuthoring": { "sql": { "type": "postgres", "dbHost": "localhost", "dbPort": "5432", "dbName": "onlyoffice", "dbUser": "onlyoffice", "dbPass": "onlyoffice" }, "token": { "enable": { "request": { "inbox": true, "outbox": true }, "browser": true }, "inbox": { "header": "Authorization", "inBody": false }, "outbox": { "header": "Authorization", "inBody": false } }, "secret": { "inbox": { "string": "secret" }, "outbox": { "string": "secret" }, "session": { "string": "secret" } } } }, "rabbitmq": { "url": "amqp://guest:guest@localhost" } } ```NextCloud Configuration (relevant parts)
```shell ./occ config:list onlyoffice ``` I replaced the document server url with `https://office.domain.tld`: ```json { "apps": { "onlyoffice": { "DocumentServerInternalUrl": "http:\/\/test-onlyoffice\/", "DocumentServerUrl": "https:\/\/office.domain.tld\/", "StorageUrl": "http:\/\/test-nginx\/", "customizationChat": "true", "customizationCompactHeader": "false", "customizationFeedback": "false", "customizationForcesave": "false", "customizationHelp": "false", "customizationReviewDisplay": "original", "customizationToolbarNoTabs": "false", "defFormats": "{\"csv\":\"false\",\"doc\":\"true\",\"docm\":\"true\",\"docx\":\"true\",\"dotx\":\"false\",\"epub\":\"false\",\"html\":\"false\",\"odp\":\"true\",\"ods\":\"true\",\"odt\":\"true\",\"otp\":\"true\",\"ots\":\"true\",\"ott\":\"true\",\"pdf\":\"false\",\"potm\":\"false\",\"potx\":\"false\",\"ppsm\":\"false\",\"ppsx\":\"false\",\"ppt\":\"true\",\"pptm\":\"false\",\"pptx\":\"true\",\"rtf\":\"false\",\"txt\":\"false\",\"xls\":\"true\",\"xlsm\":\"true\",\"xlsx\":\"true\",\"xltm\":\"false\",\"xltx\":\"false\"}", "demo": "{\"available\":true,\"enabled\":false,\"start\":{\"date\":\"2021-02-13 12:01:27.708514\",\"timezone_type\":3,\"timezone\":\"UTC\"}}", "editFormats": "{\"csv\":\"false\",\"odp\":\"false\",\"ods\":\"false\",\"odt\":\"false\",\"rtf\":\"false\",\"txt\":\"false\"}", "enabled": "yes", "groups": "[]", "installed_version": "6.2.0", "jwt_secret": "secret", "preview": "false", "sameTab": "false", "settings_error": "", "types": "filesystem", "verify_peer_off": "false" } } } ```NextCloud Logs
As far as I can tell the NextCloud logs do not give any indication about the source of the error. Below are the `DEBUG` logs generated when performing step 5. I have removed some deprecation warnings: ```shell cat nextcloud.log | jq 'select(.message | startswith("/appinfo/app.php is deprecated") | not) | select(.message | startswith("Deprecated event type") | not)' > nextcloud-debug.log ``` I also replaced the name of the document in the URLs and messages with `<%2Fpath%2Fto%2Fdoc.xlsx>` and `` respectively: [nextcloud-debug.log](https://github.com/ONLYOFFICE/onlyoffice-nextcloud/files/5976148/nextcloud-debug.log)Document Server Logs
These logs are generated with a log level of `"ALL"` (configured in `/etc/onlyoffice/documentserver/log4js/production.json`). I replaced the name of the document with `Did this work in previous versions of DocumentServer?
I have experienced this issue since version 5.4. I have not tested earlier versions.
Environment
I am running ONLYOFFICE and NextCloud in Docker containers using docker-compose. NextCloud is using S3 object storage as its primary storage (via Minio). NextCloud is served via PHP FPM and nginx.
NextCloud and the document server are running behind a reverse proxy via HTTPS. Internally the NextCloud server is reachable under
http://test-nginx/
and the document server is reachable ashttp://test-onlyoffice/
. Externally the document server is reachable underhttps://office.domain.tld
.NextCloud Version
20.0.6, group folders version 8.2.0
DocumentServer version:
6.1.1
Operating System:
The server runs CentOS 8, NextCloud and ONLYOFFICE run in docker containers.
Browser version:
The client is Safari 14.0.3 on macOS 11.2. Other users have reported the same issue using versions of Firefox and Chrome on macOS and Windows.