First of the installation is done using the Nextcloud AIO, and all other features are working including other websocket connections.
I’ve substituted my real domain with cloud.example.com
When trying to access documents I get the “Document loading failed” and looking at the requests the one failing is:
wss://cloud.example.com/cool/https%3A%2F%2Fcloud.example.com%2Findex.php%2Fapps%2Frichdocuments%2Fwopi%2Ffiles%2F19_ocnwpekhy9bs%3Faccess_token%3D9rwaLW2Gga0ehiyKlVEL6MB0WrumwcVp%26access_token_ttl%3D0/ws?WOPISrc=https%3A%2F%2Fcloud.example.com%2Findex.php%2Fapps%2Frichdocuments%2Fwopi%2Ffiles%2F19_ocnwpekhy9bs&compat=/ws
This one is returning a 400 Bad request
Looking in the nextcloud-aio-collabora
container logs the following entries show up:
2024-08-04 11:03:35 wsd-00007-00019 2024-08-04 09:03:35.139378 +0000 [ websrv_poll ] ERR #80: #80 Exception while processing incoming request: [GET /cool/https:/cloud.example.com/index.php/apps/richdocuments/wopi/files/19_ocnwpekhy9bs?access_token=9rwaLW2Gga0ehiyKlVEL6MB0WrumwcVp&access_token_ttl=0/ws&WOPISrc=https%3A%2F%2Fcloud.example.com%2Findex.php%2Fapps%2Frichdocuments%2Fwopi%2Ffiles%2F19_ocnwpekhy9bs&compat=/ws HTTP/1.1 ...]: Bad URI syntax| wsd/ClientRequestDispatcher.cpp:893
I’ve gone over the proxy settings referred to in Proxy settings — SDK https://sdk.collaboraonline.com/ documentation
And How to debug problems with Collabora and/or Talk · nextcloud/all-in-one · Discussion #1358 · GitHub
Everything seems as it should, the settings page also show OK
My docker compose looks like this:
services:
nextcloud-aio-mastercontainer:
image: nextcloud/all-in-one:latest
init: true
restart: always
container_name: nextcloud-aio-mastercontainer
volumes:
- nextcloud_aio_mastercontainer:/mnt/docker-aio-config
- /var/run/docker.sock:/var/run/docker.sock:ro
network_mode: bridge
ports:
- 8080:8080
environment:
APACHE_PORT: 11000
APACHE_IP_BINDING: 0.0.0.0
NEXTCLOUD_DATADIR: /run/desktop/mnt/nextclouddata
volumes:
nextcloud_aio_mastercontainer:
name: nextcloud_aio_mastercontainer
jtr
August 4, 2024, 3:35pm
2
sockless:
proxy
Is there log entry in Nextcloud?
What version of the richdocuments
/ Nextcloud Office integration app?
No error logs, the last logs are from when I rebooted the containers and retried accessing a document:
2024-08-03 19:53:34 Activating Collabora config...
2024-08-03 19:53:34 ✓ Reset callback url autodetect
2024-08-03 19:53:34 Checking configuration
2024-08-03 19:53:34 🛈 Configured WOPI URL: https://cloud.example.com
2024-08-03 19:53:34 🛈 Configured public WOPI URL: https://cloud.example.com
2024-08-03 19:53:34 🛈 Configured callback URL:
2024-08-03 19:53:34
2024-08-03 19:53:34 ✓ Fetched /hosting/discovery endpoint
2024-08-03 19:53:34 ✓ Valid mimetype response
2024-08-03 19:53:34 ✓ Valid capabilities entry
2024-08-03 19:53:34 ✓ Fetched /hosting/capabilities endpoint
2024-08-03 19:53:34 ✓ Detected WOPI server: Collabora Online Development Edition 24.04.5.2
2024-08-03 19:53:34
2024-08-03 19:53:34 Collabora URL (used for Nextcloud to contact the Collabora server):
2024-08-03 19:53:34 https://cloud.example.com
2024-08-03 19:53:34 Collabora public URL (used in the browser to open Collabora):
2024-08-03 19:53:34 https://cloud.example.com
2024-08-03 19:53:34 Callback URL (used by Collabora to connect back to Nextcloud):
2024-08-03 19:53:34 autodetected (will use the same URL as your user for browsing Nextcloud)
Nextcloud Office Version 8.4.4
Status.php result:
{"installed":true,"maintenance":false,"needsDbUpgrade":false,"version":"29.0.4.1","versionstring":"29.0.4","edition":"","productname":"Nextcloud","extendedSupport":false}
Here is a Wireshark capture from the proxy to nextcloud:
GET /cool/https:/cloud.example.com/index.php/apps/richdocuments/wopi/files/19_ocnwpekhy9bs?access_token=TXVyfb19Lkcif4UOFxyilf26mf1Fxz6l&access_token_ttl=0&permission=edit/ws&WOPISrc=https%3A%2F%2Fcloud.example.com%2Findex.php%2Fapps%2Frichdocuments%2Fwopi%2Ffiles%2F19_ocnwpekhy9bs&compat=/ws HTTP/1.1
Cache-Control: no-cache
Connection: Upgrade
Pragma: no-cache
Upgrade: websocket
Accept: */*
Accept-Encoding: gzip, deflate, br, zstd
Accept-Language: en-US,en;q=0.7,sv;q=0.3
Cookie: __Host-nc_sameSiteCookielax=true; __Host-nc_sameSiteCookiestrict=true; nc_username=admin; nc_token=REDACTED; nc_session_id=REDACTED; oc_sessionPassphrase=REDACTED; ocn6bxpljsg1=012476e30fccf53a93ed074d1f39a648; ocd11s5hvskz=bb6ef5de5376517c8675ab7e2f99101c; oc8jti2jagvn=143e5a2adee564d7a09f5cd7e149ae99; ocnwpekhy9bs=7626c65819e6398695ab8584ec0aae6a
Host: hyperv02:11000
Max-Forwards: 10
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko/20100101 Firefox/128.0
Sec-WebSocket-Version: 13
Origin: https://cloud.example.com
Sec-WebSocket-Extensions: permessage-deflate
Sec-WebSocket-Key: REDACTED
DNT: 1
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: websocket
Sec-Fetch-Site: same-origin
X-Original-URL: /cool/https:/cloud.example.com/index.php/apps/richdocuments/wopi/files/19_ocnwpekhy9bs?access_token=TXVyfb19Lkcif4UOFxyilf26mf1Fxz6l&access_token_ttl=0&permission=edit/ws?WOPISrc=https%3A%2F%2Fcloud.example.com%2Findex.php%2Fapps%2Frichdocuments%2Fwopi%2Ffiles%2F19_ocnwpekhy9bs&compat=/ws
X-Forwarded-For: 192.168.11.1:57269
X-ARR-SSL: 3072|256|C=US, O=Let's Encrypt, CN=R10|CN=REDACTED
X-ARR-LOG-ID: 315f6d91-b60b-4784-9a96-bde089b864e2
Response:
HTTP/1.1 400 Bad Request
Content-Length: 0
Date: Sun, 04 Aug 2024 14:34:07
The only I find odd is that there only is that there is only one / in the ...https:/cloud...
part of the request. In the original request %3A%2F%2F
should resolve to ://
but the proxy only seems to see :/
Found the issue, there was an issue with IIS ARR / URL Rewrite and having multiple ?
some parameters got lost.
The fix is to use {UNENCODED_URL}
instead of {R:1}
in the rewrite and not enable Append query string
1 Like