CollaboraOnline / richdocumentscode

Built-in CODE Server app
https://apps.nextcloud.com/apps/richdocumentscode
Apache License 2.0
121 stars 29 forks source link

Error with every cron job #266

Open PottiMc opened 7 months ago

PottiMc commented 7 months ago

I get this error with every cron job and I can't really see what is the reason for it. Maybe someone can help me at least identify the problem?`

NC 28.0.4 PHP 8.1.2

NC is installed in a subfolder. I saw that making problems in other issues. Maybe it's the same here?

NC is installed via Plesk.

Collabora itself is working fine. I can open and edit documents.


{
  "reqId": "epGnGPmUsIHoy5JOJsT2",
  "level": 3,
  "time": "2024-04-22T05:45:02+00:00",
  "remoteAddr": "xxx",
  "user": "xxx",
  "app": "richdocuments",
  "method": "GET",
  "url": "/nextcloud/ocs/v2.php/apps/user_status/api/v1/user_status?format=json",
  "message": "Failed to fetch the Collabora capabilities endpoint: Client error: `GET http://localhost/apps/richdocumentscode/proxy.php?req=/hosting/capabilities` resulted in a `404 Not Found` response:\n<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n<html><head>\n<title>404 Not Found</title>\n</head><body>\n<h1>Not Found (truncated...)\n",
  "userAgent": "Mozilla/5.0 (Windows) mirall/3.12.81rc1-Win64 (build 20240411) (Nextcloud, windows-10.0.22631 ClientArchitecture: x86_64 OsArchitecture: x86_64)",
  "version": "28.0.4.1",
  "exception": {
    "Exception": "GuzzleHttp\\Exception\\ClientException",
    "Message": "Client error: `GET http://localhost/apps/richdocumentscode/proxy.php?req=/hosting/capabilities` resulted in a `404 Not Found` response:\n<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n<html><head>\n<title>404 Not Found</title>\n</head><body>\n<h1>Not Found (truncated...)\n",
    "Code": 404,
    "Trace": [
      {
        "file": "/var/www/vhosts/xxx.de/httpdocs/nextcloud/3rdparty/guzzlehttp/guzzle/src/Middleware.php",
        "line": 69,
        "function": "create",
        "class": "GuzzleHttp\\Exception\\RequestException",
        "type": "::",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/vhosts/xxx.de/httpdocs/nextcloud/3rdparty/guzzlehttp/promises/src/Promise.php",
        "line": 204,
        "function": "GuzzleHttp\\{closure}",
        "class": "GuzzleHttp\\Middleware",
        "type": "::",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/vhosts/xxx.de/httpdocs/nextcloud/3rdparty/guzzlehttp/promises/src/Promise.php",
        "line": 153,
        "function": "callHandler",
        "class": "GuzzleHttp\\Promise\\Promise",
        "type": "::"
      },
      {
        "file": "/var/www/vhosts/xxx.de/httpdocs/nextcloud/3rdparty/guzzlehttp/promises/src/TaskQueue.php",
        "line": 48,
        "function": "GuzzleHttp\\Promise\\{closure}",
        "class": "GuzzleHttp\\Promise\\Promise",
        "type": "::",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/vhosts/xxx.de/httpdocs/nextcloud/3rdparty/guzzlehttp/promises/src/Promise.php",
        "line": 248,
        "function": "run",
        "class": "GuzzleHttp\\Promise\\TaskQueue",
        "type": "->"
      },
      {
        "file": "/var/www/vhosts/xxx.de/httpdocs/nextcloud/3rdparty/guzzlehttp/promises/src/Promise.php",
        "line": 224,
        "function": "invokeWaitFn",
        "class": "GuzzleHttp\\Promise\\Promise",
        "type": "->"
      },
      {
        "file": "/var/www/vhosts/xxx.de/httpdocs/nextcloud/3rdparty/guzzlehttp/promises/src/Promise.php",
        "line": 269,
        "function": "waitIfPending",
        "class": "GuzzleHttp\\Promise\\Promise",
        "type": "->"
      },
      {
        "file": "/var/www/vhosts/xxx.de/httpdocs/nextcloud/3rdparty/guzzlehttp/promises/src/Promise.php",
        "line": 226,
        "function": "invokeWaitList",
        "class": "GuzzleHttp\\Promise\\Promise",
        "type": "->"
      },
      {
        "file": "/var/www/vhosts/xxx.de/httpdocs/nextcloud/3rdparty/guzzlehttp/promises/src/Promise.php",
        "line": 62,
        "function": "waitIfPending",
        "class": "GuzzleHttp\\Promise\\Promise",
        "type": "->"
      },
      {
        "file": "/var/www/vhosts/xxx.de/httpdocs/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php",
        "line": 187,
        "function": "wait",
        "class": "GuzzleHttp\\Promise\\Promise",
        "type": "->"
      },
      {
        "file": "/var/www/vhosts/xxx.de/httpdocs/nextcloud/lib/private/Http/Client/Client.php",
        "line": 230,
        "function": "request",
        "class": "GuzzleHttp\\Client",
        "type": "->"
      },
      {
        "file": "/var/www/vhosts/xxx.de/httpdocs/nextcloud/apps/richdocuments/lib/Service/CapabilitiesService.php",
        "line": 165,
        "function": "get",
        "class": "OC\\Http\\Client\\Client",
        "type": "->"
      },
      {
        "file": "/var/www/vhosts/xxx.de/httpdocs/nextcloud/apps/richdocuments/lib/Service/CapabilitiesService.php",
        "line": 73,
        "function": "fetchFromRemote",
        "class": "OCA\\Richdocuments\\Service\\CapabilitiesService",
        "type": "->"
      },
      {
        "file": "/var/www/vhosts/xxx.de/httpdocs/nextcloud/apps/richdocuments/lib/AppInfo/Application.php",
        "line": 96,
        "function": "getCapabilities",
        "class": "OCA\\Richdocuments\\Service\\CapabilitiesService",
        "type": "->"
      },
      {
        "file": "/var/www/vhosts/xxx.de/httpdocs/nextcloud/lib/private/AppFramework/Bootstrap/FunctionInjector.php",
        "line": 66,
        "function": "OCA\\Richdocuments\\AppInfo\\{closure}",
        "class": "OCA\\Richdocuments\\AppInfo\\Application",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/vhosts/xxx.de/httpdocs/nextcloud/lib/private/AppFramework/Bootstrap/BootContext.php",
        "line": 50,
        "function": "injectFn",
        "class": "OC\\AppFramework\\Bootstrap\\FunctionInjector",
        "type": "->"
      },
      {
        "file": "/var/www/vhosts/xxx.de/httpdocs/nextcloud/apps/richdocuments/lib/AppInfo/Application.php",
        "line": 151,
        "function": "injectFn",
        "class": "OC\\AppFramework\\Bootstrap\\BootContext",
        "type": "->"
      },
      {
        "file": "/var/www/vhosts/xxx.de/httpdocs/nextcloud/lib/private/AppFramework/Bootstrap/Coordinator.php",
        "line": 200,
        "function": "boot",
        "class": "OCA\\Richdocuments\\AppInfo\\Application",
        "type": "->"
      },
      {
        "file": "/var/www/vhosts/xxx.de/httpdocs/nextcloud/lib/private/App/AppManager.php",
        "line": 434,
        "function": "bootApp",
        "class": "OC\\AppFramework\\Bootstrap\\Coordinator",
        "type": "->"
      },
      {
        "file": "/var/www/vhosts/xxx.de/httpdocs/nextcloud/lib/private/App/AppManager.php",
        "line": 213,
        "function": "loadApp",
        "class": "OC\\App\\AppManager",
        "type": "->"
      },
      {
        "file": "/var/www/vhosts/xxx.de/httpdocs/nextcloud/lib/private/legacy/OC_App.php",
        "line": 125,
        "function": "loadApps",
        "class": "OC\\App\\AppManager",
        "type": "->"
      },
      {
        "file": "/var/www/vhosts/xxx.de/httpdocs/nextcloud/ocs/v1.php",
        "line": 59,
        "function": "loadApps",
        "class": "OC_App",
        "type": "::"
      },
      {
        "file": "/var/www/vhosts/xxx.de/httpdocs/nextcloud/ocs/v2.php",
        "line": 23,
        "args": [
          "/var/www/vhosts/xxx.de/httpdocs/nextcloud/ocs/v1.php"
        ],
        "function": "require_once"
      }
    ],
    "File": "/var/www/vhosts/xxx.de/httpdocs/nextcloud/3rdparty/guzzlehttp/guzzle/src/Exception/RequestException.php",
    "Line": 113,
    "message": "Failed to fetch the Collabora capabilities endpoint: Client error: `GET http://localhost/apps/richdocumentscode/proxy.php?req=/hosting/capabilities` resulted in a `404 Not Found` response:\n<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n<html><head>\n<title>404 Not Found</title>\n</head><body>\n<h1>Not Found (truncated...)\n",
    "exception": [],
    "CustomMessage": "Failed to fetch the Collabora capabilities endpoint: Client error: `GET http://localhost/apps/richdocumentscode/proxy.php?req=/hosting/capabilities` resulted in a `404 Not Found` response:\n<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n<html><head>\n<title>404 Not Found</title>\n</head><body>\n<h1>Not Found (truncated...)\n"
  },
  "id": "6625f972bed33"
}
joshtrichards commented 7 months ago

This is likely on the Nextcloud/ Nextcloud Office (richdocuments) side of things. That value is generated from the wopi_url. e.g. occ config:list richdocuments should show it.

NC is installed in a subfolder.

The URL logged in the error doesn't indicate a sub-folder installation. Is overwritewebroot set to /nextcloud in your environment? That's the first thing that comes to mind.

https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/config_sample_php_parameters.html#overwritewebroot