I must admit it is highly frustrating to setup working NextCloud Office.
I am using version “Nextcloud Hub 26 Winter (33.0.6)”
Nextcloud office worked several days, i was able edit ODS, ODT… documents, it was reasonably fast in comparison with past. But i clicked in Administration → Office where i saw red warning. So i just tried change it to from “use yout own server” to “USE built in CODE” and from that moment i am not able force Nextcloud office to start again.
Now for some reason are other options greyed out and cannot be selected. Error messages are very vague, doesn’t help with diagnostics even small bit.
In log i was able see messages like this
Error
richdocuments
ClientExceptionClient error: `GET https://xxxxx.xxxxxxxxxx.cz/hosting/discovery` resulted in a `404 Not Found` response: <!DOCTYPE html> <html class="ng-csp" data-placeholder-focus="false" lang="en" data-locale="en" translate="no" > <head (truncated...)
Now Nextcloud adding in log only this message (and other very similar) - all about error in Parser.php on line 39.
simplexml_load_string(): ^ at /home/xxxxxxxxxxxxxxxxxx/www/apps/richdocuments/lib/WOPI/Parser.php#39
I suspect, there is probably undefined or empty variable $discovery as parameter of function simplexml_load_string…? Maybe. I have no idea why.
$discoveryParsed = simplexml_load_string($discovery);
I tried change options, paths… through CLI. No luck… I tried remove NextCloud Office and install it again.
When i go into Administration → Office it for second or two displays message “Collabora Online server is reachable” with correct URLs, but it change itself to
I don’t understand, why it doesn’t allow change that options anymore. I consider it is bug.
Only way i am able to unlock it is with command
sudo -u apache php occ config:app:set richdocuments wopi_url --value="https://xxxx.xxxxxxxxx.cz/"
sudo -u apache php occ config:app:set richdocuments public_wopi_url --value="https://xxxx.xxxxxxxxx.cz/"
I have no idea if it is right or not. But menu with options unlocks and again i can see green message “Collabora Online server is reachable.” and this time it does not disappear. And now is active first option “Use you own server” as it was in working state.
Cannot edit documents, but message about line 41 is back
ExceptionCall to a member function xpath() on false in file '/home/xxxxxxxxxxxxxxxxxxxx/www/apps/richdocuments/lib/WOPI/Parser.php' line 41
sudo -u apache php occ config:list richdocuments
{
"apps": {
"richdocuments": {
"canonical_webroot": "",
"disable_certificate_verification": "",
"doc_format": "",
"edit_groups": "",
"enabled": "yes",
"external_apps": "",
"installed_version": "10.2.0",
"public_wopi_url": "https:\/\/xxxxx.xxxxxxxxxx.cz\/",
"types": "filesystem,prevent_group_restriction",
"use_groups": "",
"wopi_allowlist": "localhost,127.0.0.1\/24,aaa.bbb.ccc.ddd",
"wopi_callback_url": "",
"wopi_url": "https:\/\/xxxxx.xxxxxxxxxx.cz\/apps\/richdocumentscode\/proxy.php?req="
}
}
}
Any idea what to try?
Can i somehow diagnose it more precisely than just look on details in log?
Why Parser.php is failing? Why are options in Administration → Office locked down?
I have no separate server for Collabora Online. I have no installed docker etc… i probably want to use built in CODE. But no tutorial worked for me. Even this time - when i was able run and use Nextcloud Office for several days it was kinda accidentally after several updates it just happened.
I was hoping it is finally repaired and maybe all strugling are over. But no, it was illusion.
