nextcloud / richdocuments

📑 Collabora Online for Nextcloud
https://nextcloud.com/collaboraonline
356 stars 116 forks source link

Update to v8.4.3 broke Nextcloud, had to disable richdocuments app #3780

Open dmgeurts opened 4 months ago

dmgeurts commented 4 months ago

Describe the bug Updating Richdocuments took Nextcloud down

To Reproduce Steps to reproduce the behavior:

  1. 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
juliusknorr commented 4 months ago

Thanks for reporting.

Formatted logs for easier reading:

{
  "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"
  }
}
tuxArg commented 4 months ago

I have the same issue. I had to downgrade to 8.4.2.

dmgeurts commented 4 months ago

A downgrade to v8.4.2 restored the app function.

netzpolitikorg commented 4 months ago

Seems to be broken in combination with Nextcloud 29.0.2, but working with the release candidate of 29.0.3 :shrug:

netzpolitikorg commented 4 months ago

PS: You need to disable and then re-enable the app again to get rid of the error related to caching.

Ngineer4life commented 4 months ago

I have 29.0.3 and this crashed my instance too. As soon as I removed richdocuments it worked again. I tried to reinstall, and now app store says I can't even download it because it makes the server unstable (a nice warning, but I do love this app...)

fcharlaix-opendsi commented 3 months ago

I got the problem while upgrading from 28.0.8 to 29.0.4. This is caused by the cache system, I use Redis, so I had to execute FLUSHDB in redis-cli and everything work !

Jeremyp93 commented 3 months ago

FLUSHDB

This did the trick for me !

scubamuc commented 1 month ago

@juliushaertl

Image

https://github.com/nextcloud-snap/nextcloud-snap/issues/2901#issuecomment-2399058997 error in log disappears! ✔