Failed to convert preview: Client error: `POST https://collabora.example.de/cool/convert-to/png` resulted in a `400 Bad Request` response
Hi all,
sometimes I getting randomly this kind of error on a clean nextcloud install with richdocuments (collabora) installed. I don´t even have photos. Everything is reachable via curl and I also don´t have any kind of restrictions. Using Traefik as proxy.
ClientException Client error:POST https://collabora.example.de/cool/convert-to/pngresulted in a400 Bad Requestresponse Failed to convert preview: Client error:POST https://collabora.example.de/cool/convert-to/pngresulted in a400 Bad Requestresponse
I have the same issue, I can also see this error in my collabora logs:
full URI: /cool/extract-document-structure?filter=contentcontrol| wsd/ClientRequestDispatcher.cpp:874
wsd-00001-00036 2025-05-13 15:07:38.379188 +0000 [ websrv_poll ] ERR #21: Unknown resource: /cool/extract-document-structure?filter=contentcontrol WebSocket, host: MY_HOST, path: 3
Everything seems to work, just this error log that is regularly happening.
@saervices This endpoint is used to generate file previews for documents, so even though you do not have any images it could still be used by the server in the background. There is an issue that came to our attention recently about requests to this endpoint timing out, but yours seem to be malformed somehow. Could you please tell me which version of the Collabora server you're running, and maybe share a larger snippet of logs (same line is good, with just some more context). And, I am assuming you have a real Collabora domain and not just collabora.example.de? ;)
@Simon-Boyer Your issue seems slightly unrelated; I think I would need to verify your Collabora server version as well. If /cool/extract-document-structure?filter=contentcontrol is an unknown/invalid resource, maybe you are running a very out-of-date Collabora server version? If not, would have to dig a bit deeper into that.
Haha i sent the wrong logs, although it might be related to same problem. I wanted to share those:
full URI: /cool/convert-to/png| wsd/ClientRequestDispatcher.cpp:874
wsd-00001-00036 2025-05-13 16:27:01.792858 +0000 [ websrv_poll ] ERR #30: Unknown resource: /cool/convert-to/png WebSocket, host: collabora-nextcloud.etsmtl.club, path: 3
Still, it might be the version. I used the nextcloud helm chart to deploy collabora (used as a subchart), and it looks like the version referenced there is pretty old: https://github.com/nextcloud/helm/blob/424b029328f664dcf88f15d1c0aa9fd82be6491c/charts/nextcloud/Chart.yaml#L43
I'll set it up by calling the chart directly instead and see if it solves the issue
That was indeed the issue! @saervices if like me you were using the nextcloud helm chart to deploy collabora, its out of date, switching to using the chart directly solved my issue.
@elzody Are we sending requests if an old collabora version is in use? We should check and return early before sending maybe by checking the capabilities
Some discovery made while debugging a similar issue:
- The change of the API endpoint from /lool/ to /cool/ is made in revision 6623a4c (>=8.4.0-beta1) by @juliusknorr .
- The corresponding code appears to be in: https://github.com/nextcloud/richdocuments/blob/f2fbc91/lib/Service/RemoteService.php#L94
- It appears that this call doesn't honour the capabilities returned by the WSD service.