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

Improve error message on invalid WOPI host #7709

Closed
juliusknorr opened this issue Nov 23, 2023 · 2 comments · Fixed by #7842
Closed

Improve error message on invalid WOPI host #7709

juliusknorr opened this issue Nov 23, 2023 · 2 comments · Fixed by #7842
Assignees
Labels
enhancement New feature or request unconfirmed

Comments

@juliusknorr
Copy link
Member

Is your feature request related to a problem?

When setting up Collabora with Nextcloud there are plenty of configuration pitfalls. In case the connectivity works but coolwsd is rejecting the host because it is not an allowed wopi host, the error reporting could be improved.

Describe the solution you'd like

  • A clear error type for the post message, the current websocketconnectionfailed is not very specific and the proxy configuration hint is not helpful in this case
  • A better error message than try again as retrying will not help here and the admin needs to take action to configure this properly

Describe alternatives you've considered

None except to just rely on the logs.

Additional context

Current error message:

Screenshot 2023-11-23 at 10 38 11

Current post message:

Action_Load_Resp  { errorType: "websocketconnectionfailed", success: false, errorMsg: "Failed to establish socket connection or socket connection closed unexpectedly. The reverse proxy might be misconfigured, please contact the administrator. For more info on proxy configuration please checkout https://sdk.collaboraonline.com/docs/installation/Proxy_settings.html", result: "" }

Log hint is the only valuable information right now:

nextcloud-collabora-1  | wsd-00001-00148 2023-11-23 09:38:00.606399 +0000 [ docbroker_00c ] ERR  No acceptable WOPI hosts found matching the target host [nextcloud] in config| wsd/Storage.cpp:290
nextcloud-collabora-1  | wsd-00001-00148 2023-11-23 09:38:00.606603 +0000 [ docbroker_00c ] ERR  loading document exception: No acceptable WOPI hosts found matching the target host [nextcloud] in config| wsd/DocumentBroker.cpp:2631
nextcloud-collabora-1  | wsd-00001-00148 2023-11-23 09:38:00.606622 +0000 [ docbroker_00c ] ERR  Failed to add session to [http%3A%2F%2Fnextcloud%3A80%2Findex.php%2Fapps%2Frichdocuments%2Fwopi%2Ffiles%2F704_oc7gkvlb4qjc] with URI [http://nextcloud/index.php/apps/richdocuments/wopi/files/704_oc7gkvlb4qjc?access_token=r1lG65CLH6NB3EmSruaXeOn36y54Jbt1&access_token_ttl=0&permission=edit]: No acceptable WOPI hosts found matching the target host [nextcloud] in config| wsd/DocumentBroker.cpp:2593
nextcloud-collabora-1  | wsd-00001-00148 2023-11-23 09:38:00.606633 +0000 [ docbroker_00c ] ERR  Unauthorized Request while starting session on http%3A%2F%2Fnextcloud%3A80%2Findex.php%2Fapps%2Frichdocuments%2Fwopi%2Ffiles%2F704_oc7gkvlb4qjc for socket #18. Terminating connection. Error: No acceptable WOPI hosts found matching the target host [nextcloud] in config| wsd/COOLWSD.cpp:5232
@juliusknorr
Copy link
Member Author

cc @Rash419 Since you worked on that recently

@juliusknorr
Copy link
Member Author

The same error also occurs in other cases e.g. when the WOPI endpoint returns an error status code, so a general improved way of passing errors along to the integrator would be ncie.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request unconfirmed
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants