Issue with Nextcloud Office, but Office Online works fine

I am running Nextcloud 27.1.5 in a Truenas jail, and have been for several years. In a VM (also running on my TrueNAS host) I have Collabora 23.05.5.4 running in a docker container.

I have a reverse proxy setup to handle traffic to both nextcloud.mydomain.com and collabora.mydomain.com. Bothe the servers are in the same /24 network, and I have the whole network added on the allow list for WOPI requests for Nextcloud Office. Also tried removing that, doesn´t help…

Entering collabora.mydomain.com in a browser gives OK, and Nextcloud apps (both NextcLoud Office and Office online) also report that the Collabora server there is reachable.

With the Office Online app, any clicked office document opens in collabora, as expected. but if I disable that app and enable Nextcloud Office instead I get an error, saying that there was a problem opening Collabora. This happens every time.

Now Nextcloud 28 is out, and there is no compatible version of Office Online, so I´d really like to switch to Nexcloud Office. i can´t find anything about this in the “Logging” section in NC, and I don´t know how to get to the bottom of this. Any thoughts an clues appreciated…

  • Can you provide the precise error? Is it in the NC pop-up notification or is this after it loads the Office GUI partially?
  • Maybe check the output of occ config:list richdocuments to make sure all the parameters seem reasonable
  • Not sure your NC loglevel, but might be worth bumping it down to 1 or even 0 briefly to see if anything useful gets logged

To make sure I’m clear: You’ve been using the Office Online integration app to connect with your Collabora container (taking advantage of the semi-compatibility even though that’s not its intended use case)? Was there a reason you did this initially?

nc-office_error

The precise error: Document loading failed. Failed to load Nextcloud Office - please try again later. attached it as as screenshot. It pops up in the browser, no part of the GUI loads.

The output of occ config:list richdocuments

root@nextcloud:/usr/local/www/nextcloud # occ config:list richdocuments
{
    "apps": {
        "richdocuments": {
            "canonical_webroot": "",
            "disable_certificate_verification": "",
            "doc_format": "ooxml",
            "enabled": "yes",
            "external_apps": "",
            "installed_version": "8.2.3",
            "public_wopi_url": "https:\/\/office\\.berglind\\.eu",
            "types": "prevent_group_restriction",
            "wopi_allowlist": "192.168.32.0\/24",
            "wopi_url": "https:\/\/office.berglind.eu\/"
        }
    }
}

I switched to the Office Online app after upgrading to NC27, because Nextcloud Office stopped working. Nextcloud Office used to work fine. I will get into the log parts at a later date.

Please work through Collabora integration likely you nail the issue than.

Thanks,
I worked through the guide, checked all the boxes, but the problem persists. I did not see any error following the steps, got the expected/successful result at every step.

please add the test results here and the logs of Nextcloud, Collabora and the browser when you try to edit a file.

update:

In fact you didn’t got the expected results everywhere.

from the client, verify access to Collabora (use browser or run curl https://office.mydomain/hosting/discovery)
review the content of the XML document reflect the right public hostname

As you didn’t remove your domain from the richdocuments config above I checked the output of your office server and this is wrong.

There is some issue with your URL:

all URLs generated by the server are malformed and show https://office\.mydomain\.com (each . is preceded by an unexpected backslash). Likely this results from bad escaping of ENV variables or maybe bad reverse proxy configuration. Same issue is visible in piblic_wopi_url - for some reason you have double back-spaces before the dots there (AFAIK there is no need to mask a . char at all)

Oh, I apologize. I assumed it was correct, and that the backslashes were some sort of escaping…

Thanks for checking!

Any idea about how to correct it? Where to look for mosconfiguration?

and if you want help please

I found the url error in my docker compose file. Thank you so much for pointing me in the right direction.

1 Like

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.