Collabora Office not working

Operating system: Linux 6.6.74+rpt-rpi-2712 #1 SMP PREEMPT Debian 1:6.6.74-1+rpt1 (2025-01-27) aarch64

Raspberry Pi 5 Barbone server, no docker.

Collabora online is installed on the same server.

Webserver: nginx/1.22.1 (fpm-fcgi)

Database: MariaDB 11.7.2

PHP version: 8.2.26

Modules loaded: Core, date, libxml, openssl, pcre, zlib, filter, hash, json, random, Reflection, SPL, session, standard, sodium, cgi-fcgi, mysqlnd, PDO, xml, apcu, calendar, ctype, curl, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, iconv, igbinary, imagick, intl, exif, memcache, msgpack, mysqli, pdo_mysql, Phar, posix, readline, redis, shmop, SimpleXML, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, xmlreader, xmlwriter, xsl, zip, Zend OPcache

Nextcloud version: 30.0.6 - 30.0.6.2

Updated from an older Nextcloud/ownCloud or fresh install: Updated

Where did you install Nextcloud from: Thru the updater script

List of activated apps
Enabled:
 - activity: 3.0.0
 - app_api: 4.0.6
 - bruteforcesettings: 3.0.0
 - calendar: 5.1.2
 - circles: 30.0.0
 - cloud_federation_api: 1.13.0
 - comments: 1.20.1
 - contacts: 7.0.1
 - contactsinteraction: 1.11.0
 - cookbook: 0.11.2
 - dashboard: 7.10.0
 - dav: 1.31.1
 - federatedfilesharing: 1.20.0
 - federation: 1.20.0
 - files: 2.2.0
 - files_downloadlimit: 3.0.0
 - files_external: 1.22.0
 - files_pdfviewer: 3.0.0
 - files_reminders: 1.3.0
 - files_sharing: 1.22.0
 - files_trashbin: 1.20.1
 - files_versions: 1.23.0
 - firstrunwizard: 3.0.0
 - logreader: 3.0.0
 - lookup_server_connector: 1.18.0
 - nextcloud_announcements: 2.0.0
 - notifications: 3.0.0
 - oauth2: 1.18.1
 - password_policy: 2.0.0
 - photos: 3.0.2
 - privacy: 2.0.0
 - provisioning_api: 1.20.0
 - recommendations: 3.0.0
 - related_resources: 1.5.0
 - richdocuments: 8.5.3
 - serverinfo: 2.0.0
 - settings: 1.13.0
 - sharebymail: 1.20.0
 - support: 2.0.0
 - survey_client: 2.0.0
 - systemtags: 1.20.0
 - text: 4.1.0
 - theming: 2.6.0
 - twofactor_backupcodes: 1.19.0
 - updatenotification: 1.20.0
 - user_status: 1.10.0
 - viewer: 3.0.0
 - weather_status: 1.10.0
 - webhook_listeners: 1.1.0-dev
 - workflowengine: 2.12.0
Disabled:
 - admin_audit
 - encryption
 - richdocumentscode_arm64: 24.4.1204
 - suspicious_login
 - twofactor_nextcloud_notification
 - twofactor_totp
 - user_ldap

Configuration (config/config.php)
{
    "passwordsalt": "***REMOVED SENSITIVE VALUE***",
    "secret": "***REMOVED SENSITIVE VALUE***",
    "trusted_domains": [
        "MYDOMAIN.dk",
        "www.MYDOMAIN.dk",
        "collabora.MYDOMAIN.dk"
    ],
    "datadirectory": "***REMOVED SENSITIVE VALUE***",
    "dbtype": "mysql",
    "version": "30.0.6.2",
    "memcache.local": "\\OC\\Memcache\\APCu",
    "filelocking.enabled": true,
    "memcache.locking": "\\OC\\Memcache\\Redis",
    "redis": {
        "host": "***REMOVED SENSITIVE VALUE***",
        "port": 6379,
        "timeout": 0,
        "password": "***REMOVED SENSITIVE VALUE***"
    },
    "opcache.interned_strings_buffer": 16,
    "overwrite.cli.url": "https:\/\/MYDOMAIN.dk",
    "dbname": "***REMOVED SENSITIVE VALUE***",
    "dbhost": "***REMOVED SENSITIVE VALUE***",
    "dbport": "",
    "dbtableprefix": "oc_",
    "mysql.utf8mb4": true,
    "installed": true,
    "default_phone_region": "DK",
    "forcessl": true,
    "maintenance_window_start": 2,
    "instanceid": "***REMOVED SENSITIVE VALUE***",
    "maintenance": false,
    "log_type": "file",
    "loglevel": 2,
    "logfile": "\/var\/log\/nextcloud.log",
    "logtimezone": "Europe\/Berlin",
    "updatechecker": true,
    "mail_smtpmode": "smtp",
    "mail_smtpsecure": "ssl",
    "mail_sendmailmode": "smtp",
    "mail_from_address": "***REMOVED SENSITIVE VALUE***",
    "mail_domain": "***REMOVED SENSITIVE VALUE***",
    "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpport": "465",
    "mail_smtpauth": 1,
    "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
    "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
    "dbuser": "***REMOVED SENSITIVE VALUE***",
    "dbpassword": "***REMOVED SENSITIVE VALUE***"
}

Cron Configuration: Array
(
[backgroundjobs_mode] => cron
[lastcron] => 1740587101
)

External storages: yes

External storage configuration
No mounts configured

Encryption: no

User-backends:

  • OC\User\Database

Subscription:

  • No valid subscription key set

Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:135.0) Gecko/20100101 Firefox/135.0

When I try to open the Nextcloud Office admin window I get the folloving errors in the log:

{"reqId":"rsFBtr32pfqXP5NxCXFa","level":3,"time":"2025-02-26T17:15:46+01:00","remoteAddr":"87.72.234.255","user":"ADMIN","app":"PHP","method":"GET","url":"/apps/richdocuments/settings/check","message":"Trying to access array offset on value of type null at /var/www/nextcloud/apps/richdocuments/lib/Service/CachedRequestService.php#144","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:135.0) Gecko/20100101 Firefox/135.0","version":"30.0.6.2","data":{"app":"PHP"}}
{"reqId":"rsFBtr32pfqXP5NxCXFa","level":3,"time":"2025-02-26T17:15:46+01:00","remoteAddr":"87.72.234.255","user":"ADMIN","app":"PHP","method":"GET","url":"/apps/richdocuments/settings/check","message":"Trying to access array offset on value of type null at /var/www/nextcloud/apps/richdocuments/lib/Service/CachedRequestService.php#145","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:135.0) Gecko/20100101 Firefox/135.0","version":"30.0.6.2","data":{"app":"PHP"}}
{"reqId":"rsFBtr32pfqXP5NxCXFa","level":3,"time":"2025-02-26T17:15:46+01:00","remoteAddr":"87.72.234.255","user":"ADMIN","app":"PHP","method":"GET","url":"/apps/richdocuments/settings/check","message":"Trying to access array offset on value of type null at /var/www/nextcloud/apps/richdocuments/lib/Service/CachedRequestService.php#146","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:135.0) Gecko/20100101 Firefox/135.0","version":"30.0.6.2","data":{"app":"PHP"}}
{"reqId":"rsFBtr32pfqXP5NxCXFa","level":3,"time":"2025-02-26T17:15:46+01:00","remoteAddr":"87.72.234.255","user":"ADMIN","app":"PHP","method":"GET","url":"/apps/richdocuments/settings/check","message":"simplexml_load_string(): Entity: line 442: parser error : Start tag expected, '<' not found at /var/www/nextcloud/apps/richdocuments/lib/WOPI/Parser.php#39","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:135.0) Gecko/20100101 Firefox/135.0","version":"30.0.6.2","data":{"app":"PHP"}}
{"reqId":"rsFBtr32pfqXP5NxCXFa","level":3,"time":"2025-02-26T17:15:46+01:00","remoteAddr":"87.72.234.255","user":"ADMIN","app":"PHP","method":"GET","url":"/apps/richdocuments/settings/check","message":"simplexml_load_string():  at /var/www/nextcloud/apps/richdocuments/lib/WOPI/Parser.php#39","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:135.0) Gecko/20100101 Firefox/135.0","version":"30.0.6.2","data":{"app":"PHP"}}
{"reqId":"rsFBtr32pfqXP5NxCXFa","level":3,"time":"2025-02-26T17:15:46+01:00","remoteAddr":"87.72.234.255","user":"ADMIN","app":"PHP","method":"GET","url":"/apps/richdocuments/settings/check","message":"simplexml_load_string(): ^ at /var/www/nextcloud/apps/richdocuments/lib/WOPI/Parser.php#39","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:135.0) Gecko/20100101 Firefox/135.0","version":"30.0.6.2","data":{"app":"PHP"}}
{"reqId":"rsFBtr32pfqXP5NxCXFa","level":3,"time":"2025-02-26T17:15:46+01:00","remoteAddr":"87.72.234.255","user":"ADMIN","app":"index","method":"GET","url":"/apps/richdocuments/settings/check","message":"Call to a member function xpath() on bool in file '/var/www/nextcloud/apps/richdocuments/lib/WOPI/Parser.php' line 41","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:135.0) Gecko/20100101 Firefox/135.0","version":"30.0.6.2","exception":{"Exception":"Exception","Message":"Call to a member function xpath() on bool in file '/var/www/nextcloud/apps/richdocuments/lib/WOPI/Parser.php' line 41","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1003,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":24,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","Line":146,"Previous":{"Exception":"Error","Message":"Call to a member function xpath() on bool","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/richdocuments/lib/WOPI/Parser.php","line":24,"function":"getUrlSrc","class":"OCA\\Richdocuments\\WOPI\\Parser","type":"->"},{"file":"/var/www/nextcloud/apps/richdocuments/lib/Service/ConnectivityService.php","line":31,"function":"getUrlSrcValue","class":"OCA\\Richdocuments\\WOPI\\Parser","type":"->"},{"file":"/var/www/nextcloud/apps/richdocuments/lib/Controller/SettingsController.php","line":65,"function":"testDiscovery","class":"OCA\\Richdocuments\\Service\\ConnectivityService","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":208,"function":"checkSettings","class":"OCA\\Richdocuments\\Controller\\SettingsController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":114,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1003,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":24,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/apps/richdocuments/lib/WOPI/Parser.php","Line":41},"message":"Call to a member function xpath() on bool in file '/var/www/nextcloud/apps/richdocuments/lib/WOPI/Parser.php' line 41","exception":{},"CustomMessage":"Call to a member function xpath() on bool in file '/var/www/nextcloud/apps/richdocuments/lib/WOPI/Parser.php' line 41"}}

It looks to me that there is one or more bugs in the code.

The admin window looks like this:

and I cannot change anything in it.

The richdocuments app is configured so:

sudo -u www-data php occ config:list richdocuments
{
“apps”: {
“richdocuments”: {
“disable_certificate_verification”: “yes”,
“enabled”: “yes”,
“installed_version”: “8.5.3”,
“public_wopi_url”: “https://MYDOMAIN.dk”,
“types”: “prevent_group_restriction”,
“wopi_allowlist”: “127.0.0.1,XX.YY.163.130”,
“wopi_callback_url”: “”,
“wopi_url”: “https://collabora.MYDOMAIN.dk/apps/richdocumentscode_arm64/proxy.php?req=”
}
}
}

I can call https://collabora.MYDOMAIN.dk/hosting/discovery
from a browser and from curl on the server.

I can call https://MYDOMAIN.dk/status.php
from a browser and from curl on the server.

Welcome to the community @TDY :handshake:

It looks you already made research and tried to solve the problem :+1: :

what I’m confused about you test “separate” CODE instance URL but from the settings it looks you configure build-in CODE (which lives at ../apps/richdocumentscode_arm64/proxy.php?req=)

The build-in CODE is not activated. What would be the correct configuration parameter for the wopi_url parameter in richdocuments if using an external installation of Collabora?

If I do this:

curl -k https://collabora.MYDOMAIN.dk/apps/richdocumentscode_arm64/proxy.php?req=/hosting/discovery

I get a listing of the proxy.php file

I have now changed the wopi_url and the Nextcloud Office configuration page now looks like this


The richdocuments look like this:
sudo -u www-data php occ config:list richdocuments
{
“apps”: {
“richdocuments”: {
“disable_certificate_verification”: “yes”,
“enabled”: “yes”,
“installed_version”: “8.5.4”,
“public_wopi_url”: “https://collabora.dynesky.dk:9980”,
“types”: “prevent_group_restriction”,
“wopi_allowlist”: “127.0.0.1,XX.YY.163.130”,
“wopi_callback_url”: “”,
“wopi_url”: “https://collabora.MYDOMAIN.dk”
}
}
}

But I still can not open a document. When I try The wheel turns for about 15 seconds and then it says this:

The strange thing is that I can’t find any messages in the logs regarding this. The browser console says:
Document loading failed due to timeout: Please check for failing network requests.
Apparently it is trying to do this.
https://collabora.MYDOMAIN.dk/hosting/discovery/browser/c177c64c3d/cool.html?WOPISrc=https%3A%2F%2FMYDOMAIN.dk%2Findex.php%2Fapps%2Frichdocuments%2Fwopi%2Ffiles%2F77283_ocbul260d3ux&lang=da&closebutton=1&revisionhistory=1

Any ideas anyone?

Your CODE server presents an untrusted certificate. Likely you didn’t import it proper everywhere. In general i would recommend you use public certificates to avoid trust issues on different devices.

it’s not only the browser - Nextcloud must trust the cert as well… and CODE must trust the NC cert. Please review the guide above.

check the logs - increase log level to see more details