Can't get the built-in CODE Server to work

Ok, here is what we got:

Nextcloud version: 20.0.6
Operating system and version: Debian Buster
Webserver: Apache 2.4.38
PHP version: 7.3.19-1~deb10u1

Now I wanted to replace Onlyoffice (the community edition from the app store) with Collabora Online and the built-in CODE server from the app store.

I disabled Onlyoffice and installed both new apps from the store. Now when I open the Collabora Online app for the settings it says that the built-in CODE can be reached.

But when I try to open a document all I get is an empty screen as shown in the screenshot.

When I take a look in the developer console of my Firefox I can see a HTTP error 400:

POST https://mywebserver/apps/richdocumentscode/proxy.php?req=/lool/https%3A%2F%2Fmywebserver%2Findex.php%2Fapps%2Frichdocuments%2Fwopi%2Ffiles%2F3325_ocfhp5x3h2ga...

Results in [HTTP/2 400 Bad Request]

Using one of the provided external demo servers for Collabora with the same file works fine though.

What’s wrong here?

Same problem here did u manage to find a solution

I have exactly the same problem with the built in Collabora server. My Nextcloud is hosted without an own domain. Its hosted like https://my-server.com/nextcloud.

I also see the bad request error 400 in the browser’s log when the browser requests
https://my-server.com/nextcloud/apps/richdocumentscode_arm64/proxy.php?req=/lool/https%3A%2F%2Fmy-server.com%2Fnextcloud%2Findex.php%2Fapps%2Frichdocuments%2Fwopi%2Ffiles%2F11_oc71os5wwkrw%3Faccess_token%3Da91rDEM5yF1REf5aS7uJiNzGkgrP8kJ9%26access_token_ttl%3D0%26reuse_cookies%3Dnc_sameSiteCookielax%253Dtrue%253Anc_sameSiteCookiestrict%253Dtrue%253Aoc_sessionPassphrase%253Dzz%25252Bz2hFbedI8YxwVhbmofCiUjcKTGvrWQo0D7wVg65PCu%25252F8Mg51%25252FepBCRt9IWcecH5N%25252FgtPiGqI4shaZY6%25252BqExlvQ0DVfOJAx1KYocUlW3sI9am2H3iV3840tBK2Naay%253Aoc71os5wwkrw%253Duisrkipo8o0q01emhgohb7etar%253Anc_username%253Dadmin%253Anc_token%253D1DvU9%25252BYnhd7L0GNGjO8ckg%25252FEn%25252BC2nQ74%253Anc_session_id%253Duisrkipo8o0q01emhgohb7etar%253Aprefs%253D%257B%252522comments%252522%253Atrue%257D%253Atoken%253Dt.ogs10KnksCouhcdxDniH%253Aexpress_sid%253Ds%25253AO1JUpKy9TYgS8WwDb2yOYuyXDX9AoviH.aCSPTriUrlfDVA1SmFyBgo0VYUPXmuI1I5B91Ap2wQY/ws?WOPISrc=https%3A%2F%2Fmy.server.com%2Fnextcloud%2Findex.php%2Fapps%2Frichdocuments%2Fwopi%2Ffiles%2F11_oc71os5wwkrw&compat=/ws/open/open/0

Now i found out an interesting fact: This problem only occurs when I try to open a document from an external device. When opening the nextcloud from the server itself (and ignoring the SSL warnings) via https://localhost/nextcloud , the collabora server works like a charm.

But now I have no idea how to track down the error. Does anyone have an idea?

I fixed it! The solution was to put the public domain in /etc/hosts.

My /etc/hosts now looks like this (Debian):

127.0.0.1       my.domain.tld localhost
::1             localhost ip6-localhost ip6-loopback
ff02::1         ip6-allnodes
ff02::2         ip6-allrouters

127.0.1.1       myservername

now it works like a charm

1 Like