Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when creating document #206

Closed
JayVii opened this issue May 20, 2020 · 11 comments
Closed

Error when creating document #206

JayVii opened this issue May 20, 2020 · 11 comments

Comments

@JayVii
Copy link

JayVii commented May 20, 2020

Whenever I create a Document, I get following error (also see attached screenshot):
"Failed to load the document. Please ensure the filetype is supported and not corrupted, and try again."

Error in journalctl -xe:

loolwsd[32171]: wsd-32171-32171 2020-05-20 08:23:54.025647 [ loolwsd ] TRC  Have 1 new children.| wsd/LOOLWSD.cpp:3445
 loolwsd[32171]: wsd-32171-32171 2020-05-20 08:23:54.025679 [ loolwsd ] INF  WSD initialization complete: setting log-level to [warning] as configured.| wsd/LOOLWSD.cpp:3452
 loolwsd[32171]: wsd-32171-32185 2020-05-20 08:24:05.215175 [ websrv_poll ] WRN  FileServerRequestHandler: File not found: Invalid URI request: [/loleaflet/b889fbbff/branding.css].| wsd/FileServer.cpp:440
 loolwsd[32171]: wsd-32171-32185 2020-05-20 08:24:05.243501 [ websrv_poll ] WRN  FileServerRequestHandler: File not found: Invalid URI request: [/loleaflet/b889fbbff/branding.js].| wsd/FileServer.cpp:440
 loolwsd[32171]: kit-32183-32175 2020-05-20 08:24:07.523029 [ kitbroker_001 ] ERR  Failed to load: file:///user/docs/DGmpVGiOYG9DiMh7/2.docx, error: Unsupported URL <https://office.example.com/index.php/apps/richdocuments/wopi/template/1050?access_token=m9eyOqytgClIRVjhweqYs3tn9GP06kEc>: "type detection failed"| kit/Kit.cpp:1655
 loolwsd[32171]: kit-32183-32175 2020-05-20 08:24:07.523076 [ kitbroker_001 ] ERR  Failed to get LoKitDocument instance for [file:///user/docs/DGmpVGiOYG9DiMh7/2.docx].| kit/ChildSession.cpp:627
 loolwsd[32171]: kit-32183-32175 2020-05-20 08:24:07.523107 [ kitbroker_001 ] WRN  Document::ViewCallback. Session [-1] is no longer active to process [LOK_CALLBACK_ERROR] [{
 loolwsd[32171]:     "classification": "error",
 loolwsd[32171]:     "cmd": "load",
 loolwsd[32171]:     "kind": "network",
 loolwsd[32171]:     "code": "0x6b03(Error Area:Inet Class:Read Code:3)",
 loolwsd[32171]:     "message": "Server certificate verification failed: issuer is not trusted"
 loolwsd[32171]: }
 loolwsd[32171]: ] message to Master Session.| kit/Kit.cpp:1955
 loolwsd[32171]: wsd-32171-32292 2020-05-20 08:24:07.523140 [ docbroker_001 ] WRN  Document load failed: faileddocloading| wsd/ClientSession.cpp:1125
 loolwsd[32171]: kit-32183-32175 2020-05-20 08:24:07.551325 [ kitbroker_001 ] WRN  Skipping unload on incomplete view.| kit/ChildSession.cpp:102
 loolwsd[32171]: wsd-32171-32292 2020-05-20 08:24:07.551336 [ docbroker_001 ] WRN  Client session [004] not found to forward message: o9 disconnected:| wsd/DocumentBroker.cpp:2073
 loolwsd[32171]: kit-32183-32175 2020-05-20 08:24:07.551350 [ kitbroker_001 ] ERR  No socket associated with WebSocketHandler 0x5631a67827e0| ./net/WebSocketHandler.hpp:131
 loolwsd[32171]: Document [/index.php/apps/richdocuments/wopi/files/2549_oc7ctv9wwbod] has no more views, exiting bluntly.
 loolwsd[32171]: kit-32183-32175 2020-05-20 08:24:09.029828 [ kitbroker_001 ] FTL  Document [/index.php/apps/richdocuments/wopi/files/2549_oc7ctv9wwbod] has no more views, exiting bluntly.| kit/Kit.cpp:838

It appears as if a) the process can not read the empty template file properly or b) the file is not correctly initialized yet when the process tries to open it. I already tried to replace the empty template in my nextcloud richdocument/empty/templates/ folder, but to no avail. If the later is true, a workaround might be to implement a delay before opening the file (I could not find such config in loolwsd.xml)

If I re-open the exact same file seconds later, it starts up fine. and works as intentional.

Here my build-config:

set_online_regex='collabora/code-4.2.1'
lo_src_branch='distro/collabora/cp-6.2'
lo_src_tag='cp-6.2-5'
set_core_regex='cp-6.2$'
lool_src_branch='distro/collabora/code-4.2.0-4'
lool_src_tag='CODE-4.2.0-4'
lool_configure_opts='--with-lokit-path=/opt/libreoffice/include --disable-werror'
poco_version='1.9.4'

Screenshot_2020-05-20_01

@DmDS
Copy link
Contributor

DmDS commented May 22, 2020

same thing... CODE-4.2.3-2.
4.1.* does not have this problem

@JayVii
Copy link
Author

JayVii commented May 22, 2020

@DmDS

same thing... CODE-4.2.3-2.
4.1.* does not have this problem

I cannot find any tag in https://github.com/LibreOffice/online containing CODE-4.1, can you post your working settings? That way, I at least have a workaround for the time being

EDIT:

lool_src_branch='distro/collabora/collabora-online-4'

results in LOOLWSD 4.1.0, however the issue still persists. This did unfortunately not fix the issue.

@JayVii
Copy link
Author

JayVii commented May 22, 2020

I tried with

lool_src_branch='distro/collabora/collabora-online-4-0'

Version LOOLWSD 4.0.11 (last commit 2 months ago), but the issue persists.

@DmDS
Copy link
Contributor

DmDS commented May 22, 2020

Try this conf. the script will use default settings for lool (collabora-online-4). with this config files are created without errors.

lool_configure_opts='--disable-werror'
set_core_regex='cp-6.2'
lo_src_tag='cp-6.2-11'
lo_src_branch='distro/collabora/cp-6.2'
lool_forcebuild=true

@JayVii
Copy link
Author

JayVii commented May 23, 2020

Indeed, rebuilding LO itself with your above settings fixed the issue. However, also LO 6.4.4 works fine in combination with loolwsd 4.1.0 (which did not work with older LO versions).

To me it looks like LO was the issue rather than LOOLWSD. I am closing the issue, as everything works as expected now. Thanks @DmDS!

current working setup:

lo_src_branch='distro/collabora/cp-6.4'
lool_src_branch='distro/collabora/collabora-online-4'
lool_configure_opts='--with-lokit-path=/opt/libreoffice/include --disable-werror'
poco_version='1.9.4'

@JayVii JayVii closed this as completed May 23, 2020
@DmDS
Copy link
Contributor

DmDS commented Jun 3, 2020

i got it working with 4.2.*
…/nextcloud/apps/richdocuments/lib/Controller/WopiController.php
need to comment this code (lines 213-218. app ver 3.7.0)

//** if ($wopi->hasTemplateId()) {
$templateUrl = ‘index.php/apps/richdocuments/wopi/template/’ . $wopi->getTemplateId() . ?access_token=’ . $wopi->getToken();
$templateUrl = $this->urlGenerator->getAbsoluteURL($templateUrl);
$response[‘TemplateSource’] = $templateUrl;
}*/

@JayVii
Copy link
Author

JayVii commented Jun 3, 2020

I can confirm, this fixes the issue entirely on 4.2.*

Thanks! I'll go ahead and open an issue on https://github.com/nextcloud/richdocuments

@Ark74
Copy link
Contributor

Ark74 commented Jun 3, 2020

I can't reproduce the issue.

  • Richdocuments: 3.7.0
  • Core: 6.2-14
  • Online: 4.2.4-2

@DmDS
Copy link
Contributor

DmDS commented Jun 3, 2020

I can't reproduce the issue.

do you use https?

@Ark74
Copy link
Contributor

Ark74 commented Jun 3, 2020

yep

@DmDS
Copy link
Contributor

DmDS commented Jun 3, 2020

I have installed collabora on ubuntu and on debian, changed the default locales, installed two nextcloud instances. (but did not try to change the locale). nothing helped. there was no error with http. with https I got in the logs: "Failed to load: file:///user/docs/GS5jKjq3a8CY05rA/test.docx, error: Unsupported URL <https:// domain/index.php/apps/richdocuments/wopi/template/433?access_token = b4xTyicfRdRAMQb0uQ08U89hEorDaFQf>: "type detection failed" and "Server certificate verification failed: issuer is not trusted".
Certificates made by let's encrypt. i configured reverse proxy on apache, ngnix, haproxy... I don’t know .. maybe there is a problem in the nextcloud locale and special characters... and
issue only with creating the new documents. with templates i guess...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants