nextcloud / nextcloud/richdocuments
Update to v8.4.3 broke Nextcloud, had to disable richdocuments app
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 453
- Forks
- 147
- Avg merge
- 14h 54m
- Merged PRs (30d)
- 83
Description
Describe the bug
Updating Richdocuments took Nextcloud down
To Reproduce
Steps to reproduce the behavior:
- Update to v8.4.3
Manually disabled richdocuments to regain access, then removed the plugin and did an install and enable. Got a notification that this. app makes Nextcloud unstable and app can't thus be enabled.
Expected behavior
No impact on Nextcloud when updating richdocuments
Screenshots
N/A
Client details:
N/A
Server details
Operating system:
Ubuntu server 20.04 LTS
Web server:
Apache2 2.4.59-1+ubuntu20.04.1
Database:
MySQL v10.3.39
PHP version:
v8.2.20
Nextcloud version:
v29.0.2
Version of the richdocuments app
v8.4.3
Version of Collabora Online
v24.4.201
Configuration of the richdocuments app
{
"apps": {
"richdocuments": {
"disable_certificate_verification": "yes",
"doc_format": "ooxml",
"enabled": "no",
"installed_version": "8.4.3",
"public_wopi_url": "https:\/\/team.bethanycc.uk",
"types": "prevent_group_restriction",
"wopi_allowlist": "192.168.0.0\/16",
"wopi_url": "https:\/\/team.bethanycc.uk\/apps\/richdocumentscode\/proxy.php?req="
}
}
}
Logs
Nextcloud log (data/nextcloud.log)
{"reqId":"XAiC5GQ0dNdGUnqDg8yE","level":4,"time":"2024-06-21T07:01:51+00:00","remoteAddr":"192.168.100.102","user":"bcc_nc_admin","app":"no app in context","method":"POST","url":"/settings/apps/disable","message":"Could not boot richdocuments: OCA\\Richdocuments\\Service\\CachedRequestService::get(): Return value must be of type ?string, array returned","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36","version":"29.0.2.2","exception":{"Exception":"TypeError","Message":"OCA\\Richdocuments\\Service\\CachedRequestService::get(): Return value must be of type ?string, array returned","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/richdocuments/lib/Service/CapabilitiesService.php","line":147,"function":"get","class":"OCA\\Richdocuments\\Service\\CachedRequestService","type":"->"},{"file":"/var/www/nextcloud/apps/richdocuments/lib/Service/CapabilitiesService.php","line":63,"function":"getParsedCapabilities","class":"OCA\\Richdocuments\\Service\\CapabilitiesService","type":"->"},{"file":"/var/www/nextcloud/apps/richdocuments/lib/AppInfo/Application.php","line":108,"function":"getCapabilities","class":"OCA\\Richdocuments\\Service\\CapabilitiesService","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Bootstrap/FunctionInjector.php","line":45,"function":"OCA\\Richdocuments\\AppInfo\\{closure}","class":"OCA\\Richdocuments\\AppInfo\\Application","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Bootstrap/BootContext.php","line":50,"function":"injectFn","class":"OC\\AppFramework\\Bootstrap\\FunctionInjector","type":"->"},{"file":"/var/www/nextcloud/apps/richdocuments/lib/AppInfo/Application.php","line":107,"function":"injectFn","class":"OC\\AppFramework\\Bootstrap\\BootContext","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Bootstrap/Coordinator.php","line":200,"function":"boot","class":"OCA\\Richdocuments\\AppInfo\\Application","type":"->"},{"file":"/var/www/nextcloud/lib/private/App/AppManager.php","line":437,"function":"bootApp","class":"OC\\AppFramework\\Bootstrap\\Coordinator","type":"->"},{"file":"/var/www/nextcloud/lib/private/App/AppManager.php","line":216,"function":"loadApp","class":"OC\\App\\AppManager","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_App.php","line":128,"function":"loadApps","class":"OC\\App\\AppManager","type":"->"},{"file":"/var/www/nextcloud/lib/base.php","line":1030,"function":"loadApps","class":"OC_App","type":"::"},{"file":"/var/www/nextcloud/index.php","line":49,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/apps/richdocuments/lib/Service/CachedRequestService.php","Line":43,"message":"Could not boot richdocuments: OCA\\Richdocuments\\Service\\CachedRequestService::get(): Return value must be of type ?string, array returned","exception":{},"CustomMessage":"Could not boot richdocuments: OCA\\Richdocuments\\Service\\CachedRequestService::get(): Return value must be of type ?string, array returned"}}
{"reqId":"mBtFyPwBEUWh0QkqVgxB","level":4,"time":"2024-06-21T07:01:51+00:00","remoteAddr":"192.168.100.102","user":"bcc_nc_admin","app":"no app in context","method":"GET","url":"/ocs/v2.php/core/navigation/apps?format=json","message":"Could not boot richdocuments: OCA\\Richdocuments\\Service\\CachedRequestService::get(): Return value must be of type ?string, array returned","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36","version":"29.0.2.2","exception":{"Exception":"TypeError","Message":"OCA\\Richdocuments\\Service\\CachedRequestService::get(): Return value must be of type ?string, array returned","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/richdocuments/lib/Service/CapabilitiesService.php","line":147,"function":"get","class":"OCA\\Richdocuments\\Service\\CachedRequestService","type":"->"},{"file":"/var/www/nextcloud/apps/richdocuments/lib/Service/CapabilitiesService.php","line":63,"function":"getParsedCapabilities","class":"OCA\\Richdocuments\\Service\\CapabilitiesService","type":"->"},{"file":"/var/www/nextcloud/apps/richdocuments/lib/AppInfo/Application.php","line":108,"function":"getCapabilities","class":"OCA\\Richdocuments\\Service\\CapabilitiesService","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Bootstrap/FunctionInjector.php","line":45,"function":"OCA\\Richdocuments\\AppInfo\\{closure}","class":"OCA\\Richdocuments\\AppInfo\\Application","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Bootstrap/BootContext.php","line":50,"function":"injectFn","class":"OC\\AppFramework\\Bootstrap\\FunctionInjector","type":"->"},{"file":"/var/www/nextcloud/apps/richdocuments/lib/AppInfo/Application.php","line":107,"function":"injectFn","class":"OC\\AppFramework\\Bootstrap\\BootContext","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Bootstrap/Coordinator.php","line":200,"function":"boot","class":"OCA\\Richdocuments\\AppInfo\\Application","type":"->"},{"file":"/var/www/nextcloud/lib/private/App/AppManager.php","line":437,"function":"bootApp","class":"OC\\AppFramework\\Bootstrap\\Coordinator","type":"->"},{"file":"/var/www/nextcloud/lib/private/App/AppManager.php","line":216,"function":"loadApp","class":"OC\\App\\AppManager","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_App.php","line":128,"function":"loadApps","class":"OC\\App\\AppManager","type":"->"},{"file":"/var/www/nextcloud/ocs/v1.php","line":60,"function":"loadApps","class":"OC_App","type":"::"},{"file":"/var/www/nextcloud/ocs/v2.php","line":23,"args":["/var/www/nextcloud/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/nextcloud/apps/richdocuments/lib/Service/CachedRequestService.php","Line":43,"message":"Could not boot richdocuments: OCA\\Richdocuments\\Service\\CachedRequestService::get(): Return value must be of type ?string, array returned","exception":{},"CustomMessage":"Could not boot richdocuments: OCA\\Richdocuments\\Service\\CachedRequestService::get(): Return value must be of type ?string, array returned"}}
Browser log
N/A
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with apps/richdocuments/lib/Service/CachedRequestService.php at line 43 and trace its use from CapabilitiesService.php lines 63 and 147. Reproduce the v8.4.3 app boot or update scenario and inspect why get() returns an array despite its declared type. Done means richdocuments boots without the reported TypeError and does not take Nextcloud down.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100