nextcloud / richdocuments

đź“‘ Collabora Online for Nextcloud
https://nextcloud.com/collaboraonline
349 stars 115 forks source link

Unable to create a new file from a template #2918

Open Menzaah opened 1 year ago

Menzaah commented 1 year ago

Steps to reproduce

  1. Create an Excel table template
  2. Import an Excel template into Nextcloud Office settings
  3. Try creating a new spreadsheet from this template

Expected behavior

The spreadsheet is supposed to open and therefore the file is created.

Actual behavior

Via the Nextcloud application it is impossible to create a new file from the templates. On Android it is downright impossible to select a template and on iOS during creation it runs in a vacuum and ends up creating an empty file in the wrong format. On the other hand, via the web interface from a computer, this poses no problem.

Host OS

Ubuntu 20.04

Nextcloud AIO version

Nextcloud AIO v4.8.1

Current channel

Latest channel

Other valuable info

On creation failures via iOS, no error log is generated and no error messages on the device. On the android side I can't even create a file from a template. Here are the only logs I have regarding Richdocuments that I don't understand the origin at all.

Logs richdocuments-error.txt

Thank you in advance for all the help provided, it's not totally blocking but quite disabling.

juliushaertl commented 1 year ago

I could not reproduce this. Can you share which version of richdocuments you are using and which version of the Collabora Online container is in use? Also if you are able to share a copy of the template file you used and how you have configured it (as user template or admin template) this would be helpful.

Menzaah commented 1 year ago

Hello, Nextcloud AIO is in version V.4.9.0 with all containers up-to-date. Regarding Richdocument and Collabora Online, how can I find the specified version? Otherwise you will find attached a copy of the file in question, which is an excel template that we use daily. I added it as an admin template via the Nextcloud Office administration settings.

Thanks for your help !

DEPART.zip

Bingenberger commented 1 year ago

I have the same problem - i think since the last upgrade to richdocument 7.1.3

I am running NC 25.0.5 und Collabora in der Version 22.05.13.1

The behaviour is the same as @Menzaah described above. The iOS-App creates only a .ott-file with 0 bytes. From the webinterface a correct file is created - but after i try to close the document i don't come back to the nextcloud - i only see the background-image of the nextcloud.

From my point of view, the mistake happens before contacting the collaboraserver. Collabora would be contacted only after a new document has been created from the global template. But even that does not work.

Menzaah commented 1 year ago

Hello !

In continuity, after an update to Nextcloud AIO v6.0.0 still the same problem...

juliushaertl commented 1 year ago

@szaimen can you check if you can reproduce this on AIO?

szaimen commented 1 year ago

Yes, I can reproduce this with the following example file: Persönliches Monatsbudget1.zip I get the following logs in the collabora container when I try to create a new file from the template via web:

frk-00020-00020 2023-06-10 14:35:24.551270 +0200 [ forkit ] WRN  The systemplate directory [/opt/cool/systemplate] is read-only, and at least [/opt/cool/systemplate//etc/hosts] is out-of-date. Will have to copy sysTemplate to jails. To restore optimal performance, make sure the files in [/opt/cool/systemplate/etc] are up-to-date.| common/JailUtil.cpp:438
kit-00022-00020 2023-06-10 14:35:25.148851 +0200 [ kitbroker_001 ] ERR  Failed to load: file:///tmp/user/docs/ZbwidLqSFqh4YwCT/New%20spreadsheet.ods, error: loadComponentFromURL returned an empty reference| kit/Kit.cpp:1458
kit-00022-00020 2023-06-10 14:35:25.148918 +0200 [ kitbroker_001 ] ERR  ToMaster-01b: error: cmd=load kind=faileddocloading| common/Session.hpp:165
Failed to load the document. Setting TerminationFlag
kit-00022-00020 2023-06-10 14:35:25.149074 +0200 [ kitbroker_001 ] FTL  Failed to load the document. Setting TerminationFlag| kit/Kit.cpp:1485
kit-00022-00020 2023-06-10 14:35:25.149103 +0200 [ kitbroker_001 ] ERR  ToMaster-01b: Failed to get LoKitDocument instance for [file:///tmp/user/docs/ZbwidLqSFqh4YwCT/New%20spreadsheet.ods]| kit/ChildSession.cpp:816
wsd-00001-00118 2023-06-10 14:35:25.149346 +0200 [ docbroker_001 ] ERR  ToClient-01b: Document load failed: faileddocloading| wsd/ClientSession.cpp:1583
wsd-00001-00118 2023-06-10 14:35:25.149551 +0200 [ docbroker_001 ] ERR  Unexpected message: [o12 close: ].| wsd/DocumentBroker.cpp:2933
wsd-00001-00118 2023-06-10 14:35:25.149723 +0200 [ docbroker_001 ] ERR  #21: Socket write returned -1 (EPIPE: Broken pipe)| net/Socket.hpp:1442
wsd-00001-00118 2023-06-10 14:35:25.150030 +0200 [ docbroker_001 ] ERR  #21: Socket write returned -1 (EPIPE: Broken pipe)| net/Socket.hpp:1442
wsd-00001-00118 2023-06-10 14:35:25.150052 +0200 [ docbroker_001 ] WRN  #21: Shutting down but 4 bytes couldn't be flushed and still remain in the output buffer| net/WebSocketHandler.hpp:857
wsd-00001-00118 2023-06-10 14:35:25.150078 +0200 [ docbroker_001 ] ERR  #21: Socket write returned -1 (EPIPE: Broken pipe)| net/Socket.hpp:1442
wsd-00001-00118 2023-06-10 14:35:25.150188 +0200 [ docbroker_001 ] WRN  #21: DocBroker [https://mynextcloud.com:443/index.php/apps/richdocuments/wopi/files/4915_ocdqopf62h6v] got disconnected from its Kit (22) unexpectedly. Closing| wsd/COOLWSD.cpp:3396
sh: 1: /usr/bin/coolmount: Operation not permitted
sh: 1: /usr/bin/coolmount: Operation not permitted
sh: 1: /usr/bin/coolmount: Operation not permitted
juliushaertl commented 1 year ago

Thanks. Apparently I can also reproduce this, but only when creating a new ods file from the xltx file, i might have had the setting enabled on the last attempt to "Use Office Open XML (OOXML) instead of OpenDocument Format (ODF) by default for new files" in which case it works fine.

Will need to further check if that is actually an upstream issue in Collabora.

szaimen commented 1 year ago

"Use Office Open XML (OOXML) instead of OpenDocument Format (ODF) by default for new files" in which case it works fine.

Indeed I dont have this enabled on my test instance.

Menzaah commented 1 year ago

Hello !

Our nextcloud instance is under the latest version of the "stable" channel (Nextcloud AIO v6.3.0) and the problem still persists.