Repository navigation
feat: Add setup checks and verify WOPI connectivity - #4470
Conversation
0de9fb1 to
e4da2d3
Compare
e4da2d3 to
88e5d13
Compare
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
88e5d13 to
1564b81
Compare
This comment was marked as outdated.
This comment was marked as outdated.
8988183 to
4097090
Compare
c3739fa to
6f60946
Compare
|
@meven I'm struggling to get CI passing as when the check runs Collabora returns an UnspecifiedError, however the status code is a 200 as far as I see in the logs. Do you have any clue why that is not passing? |
|
@meven Any further hint? Would be great to get this in |
Thank you for the ping, was really busy back in March. Points toward an explicit error contacting the wopi/nextcloud host. This might be a bug in the insecure/HTTP code path. Looking |
|
I haven't managed to find the origin. |
|
I'll do a rebase to see if the nightly code build now behaves different (that is one built from online master branch) |
b69f4ee to
b3d8a24
Compare
|
It seems like your callballUrl request's response was empty and wasn't in one of the three case:
Consequently our http client considered this answer erroneous, as it prematurely disconnected. (A 200 with no Content-Length, must have some content, as 204 is to be used when no Content is needed). A Thanks @Ashod for helping on this. |
|
Thanks that is very helpful, let me push a step in CI run run that curl. Content-Length missing rings a bell (https://cweiske.de/tagebuch/content-length-header-missing.htm) and locally i do see it sent back as a response header. |
b3d8a24 to
6330eba
Compare
|
Yes, it seems that when running the tests with the built-in webserver in CI we have a content but no content length. I'm not sure that is expected as the response header should be optional even if we have some body. I'll test if the tests pass if i switch to an empty response with 204 instead |
|
For the integration test that was the case. The interesting failure is in the cypress ones: https://github.com/nextcloud/richdocuments/actions/runs/18386970434/job/52387705950?pr=4470 You can also find the Collabora logs there if you unfold the stop container step: |
We can see in the logs that curl -v 172.17.0.1:8081/status.php returns 400 : I checked the current wopiAccesCheck should send |
feee39c to
7292d2b
Compare
|
Rebased and pushed a quick commit for checking for proof keys. |
| env: | ||
| extra_params: '--o:ssl.enable=false' | ||
| aliasgroup1: 'http://nextcloud' | ||
| aliasgroup1: 'http://172.17.0.1:8081' |
There was a problem hiding this comment.
I assume this is available in this configuration.
There was a problem hiding this comment.
Yes, that is within the github action setup that the tests run
| $installedVersion = $this->capabilitiesService->getProductVersion(); | ||
|
|
||
| if ($latestVersion !== null && version_compare($latestVersion, $installedVersion, '>')) { | ||
| return SetupResult::warning($this->l10n->t('Collabora server version is out of date. Currently using %s, new version is available: %s', [$installedVersion, $latestVersion])); |
meven
left a comment
There was a problem hiding this comment.
Two Minor points, that you can disregard.
From the API usage perspective this is all good, all the enum values are in place with nice text.
I can't vouch as much for the richdocument integration, but nothing looked suspicious.
b85ba91 to
d255f47
Compare
|
Thanks @meven, your theory was right. Pointing the callback at an empty 204 made the UnspecifiedError go away (it then failed with NotHttpSuccess, as expected). The cause seemed that the php server that is used for testing php -S sending a 200 with a body, Connection: close and no Content-Length, which coolwsd treats as an error even though it's valid HTTP. It reproduces on 25.04.9.4 and 26.04.4.2, so it might be worth fixing on your side. Otherwise I had now pushed workarounds for this on our end so this is ready to get in |
|
@elzody If you have a second pair of eyes again for this. Would be great to get this in soonish :) |
This should use HTTP header 204 or have a |
|
Ah then I missed that piece, now we have an OK and content-length as dedicated check endpoint on our end so all fine 👍 Thanks a lot for the assistance and review 🤝 |
d255f47 to
a85ffe6
Compare
|
CI should be covered with #6186 |
Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Julius Knorr <jus@bitgrid.net>
Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Julius Knorr <jus@bitgrid.net>
- Keep cached discovery and capabilities when a connectivity check fails - Skip the connectivity check when Collabora is not configured - Respect has_internet_connection and handle failures in the update check - Handle server errors and invalid responses from wopiAccessCheck - Pin gh-docker-logs action Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Julius Knorr <jus@bitgrid.net>
- Cache the latest Collabora version for 6 hours - Reset in-memory capabilities after fetching them - Drop debug logging from cypress Collabora container Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Julius Knorr <jus@bitgrid.net>
a85ffe6 to
d5d6f7e
Compare
|
Thanks @juliusknorr for reviving this ! Less troubleshooting for Nextcloud Office users ! |


Fixes #4267
Needs CollaboraOnline/online#11162 for self-signed certificates that are not trusted on Collabora (without validation)