Numerous logging entries from richdocumentscode NC30.0.1

Numerous logging entries like;

 
ClientException Client error: `POST https://xxxxxxxxxxxxx/apps/richdocumentscode/proxy.php?req=/cool/convert-to/png` resulted in a `403 Forbidden` response
Failed to convert preview: Client error: `POST https://xxxxxxxxxxxxxxxxxxx/apps/richdocumentscode/proxy.php?req=/cool/convert-to/png` resulted in a `403 Forbidden` response

sinds the upgrade from NC 29 to NC 30.

running;
NC 30.0.1
php 8.2
nginx 1.24 behind nginx rev proxy 1.24

2 Likes

I have the some trouble… NC 30.0.1, php 8.2.25, apache 2.4.57

2 Likes

Here is someone else who has the same problem.

Failed to convert preview: Client error: POST https://XXXXXXX.de/apps/richdocumentscode/proxy.php?req=/cool/convert-to/png resulted in a 403 Forbidden response

Could it be that Nextcloud Office or the Collabora Code Build-In Server has a bug here since the last version? I didn’t have that before either.

OS: Debian GNU/Linux bookworm 12.8
Kernel: Linux 6.8.12-5
Nextcloud 30.0.4
PHP 8.3.14
MySQL 10.11.6

{
  "reqId": "jFeCDCL6bT9jN2yWJ1yC",
  "level": 3,
  "time": "2024-12-17T20:24:10+01:00",
  "remoteAddr": "xxxxx",
  "user": "xxxxx",
  "app": "richdocuments",
  "method": "GET",
  "url": "/core/preview?fileId=145024&x=32&y=32&mimeFallback=true&v=aeb7e1&a=0",
  "message": "Failed to convert preview: Client error: `POST https://xxxxx.de/apps/richdocumentscode/proxy.php?req=/cool/convert-to/png` resulted in a `403 Forbidden` response",
  "userAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:133.0) Gecko/20100101 Firefox/133.0",
  "version": "30.0.4.1",
  "exception": {
    "Exception": "GuzzleHttp\\Exception\\ClientException",
    "Message": "Client error: `POST https://xxxxx.de/apps/richdocumentscode/proxy.php?req=/cool/convert-to/png` resulted in a `403 Forbidden` response",
    "Code": 403,
    "Trace": [
      {
        "file": "/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Middleware.php",
        "line": 72,
        "function": "create",
        "class": "GuzzleHttp\\Exception\\RequestException",
        "type": "::",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/nextcloud/3rdparty/guzzlehttp/promises/src/Promise.php",
        "line": 209,
        "function": "GuzzleHttp\\{closure}",
        "class": "GuzzleHttp\\Middleware",
        "type": "::",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/nextcloud/3rdparty/guzzlehttp/promises/src/Promise.php",
        "line": 158,
        "function": "callHandler",
        "class": "GuzzleHttp\\Promise\\Promise",
        "type": "::"
      },
      {
        "file": "/var/www/nextcloud/3rdparty/guzzlehttp/promises/src/TaskQueue.php",
        "line": 52,
        "function": "GuzzleHttp\\Promise\\{closure}",
        "class": "GuzzleHttp\\Promise\\Promise",
        "type": "::",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/nextcloud/3rdparty/guzzlehttp/promises/src/Promise.php",
        "line": 251,
        "function": "run",
        "class": "GuzzleHttp\\Promise\\TaskQueue",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/3rdparty/guzzlehttp/promises/src/Promise.php",
        "line": 227,
        "function": "invokeWaitFn",
        "class": "GuzzleHttp\\Promise\\Promise",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/3rdparty/guzzlehttp/promises/src/Promise.php",
        "line": 272,
        "function": "waitIfPending",
        "class": "GuzzleHttp\\Promise\\Promise",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/3rdparty/guzzlehttp/promises/src/Promise.php",
        "line": 229,
        "function": "invokeWaitList",
        "class": "GuzzleHttp\\Promise\\Promise",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/3rdparty/guzzlehttp/promises/src/Promise.php",
        "line": 69,
        "function": "waitIfPending",
        "class": "GuzzleHttp\\Promise\\Promise",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php",
        "line": 189,
        "function": "wait",
        "class": "GuzzleHttp\\Promise\\Promise",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/Http/Client/Client.php",
        "line": 276,
        "function": "request",
        "class": "GuzzleHttp\\Client",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/apps/richdocuments/lib/Service/RemoteService.php",
        "line": 92,
        "function": "post",
        "class": "OC\\Http\\Client\\Client",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/nextcloud/apps/richdocuments/lib/Service/RemoteService.php",
        "line": 72,
        "function": "convertTo",
        "class": "OCA\\Richdocuments\\Service\\RemoteService",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/apps/richdocuments/lib/Preview/Office.php",
        "line": 41,
        "function": "convertFileTo",
        "class": "OCA\\Richdocuments\\Service\\RemoteService",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/Preview/GeneratorHelper.php",
        "line": 44,
        "function": "getThumbnail",
        "class": "OCA\\Richdocuments\\Preview\\Office",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/Preview/Generator.php",
        "line": 337,
        "function": "getThumbnail",
        "class": "OC\\Preview\\GeneratorHelper",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/Preview/Generator.php",
        "line": 313,
        "function": "generateProviderPreview",
        "class": "OC\\Preview\\Generator",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/Preview/Generator.php",
        "line": 119,
        "function": "getMaxPreview",
        "class": "OC\\Preview\\Generator",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/Preview/Generator.php",
        "line": 86,
        "function": "generatePreviews",
        "class": "OC\\Preview\\Generator",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/PreviewManager.php",
        "line": 167,
        "function": "getPreview",
        "class": "OC\\Preview\\Generator",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/core/Controller/PreviewController.php",
        "line": 159,
        "function": "getPreview",
        "class": "OC\\PreviewManager",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/core/Controller/PreviewController.php",
        "line": 123,
        "function": "fetchPreview",
        "class": "OC\\Core\\Controller\\PreviewController",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 208,
        "function": "getPreviewByFileId",
        "class": "OC\\Core\\Controller\\PreviewController",
        "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/3rdparty/guzzlehttp/guzzle/src/Exception/RequestException.php",
    "Line": 113,
    "message": "Failed to convert preview: Client error: `POST https://xxxxx.de/apps/richdocumentscode/proxy.php?req=/cool/convert-to/png` resulted in a `403 Forbidden` response",
    "exception": [],
    "CustomMessage": "Failed to convert preview: Client error: `POST https://xxxxx.de/apps/richdocumentscode/proxy.php?req=/cool/convert-to/png` resulted in a `403 Forbidden` response"
  },
  "id": "6761d0cfc7751"
}

I have a similar problem. I get, CURL 28 and 502 errors at /cool/convert-to/png and hosting/capabilities.

 ServerException Server error: `POST https://xxxxxxxxxxxxxxx/cool/convert-to/png` resulted in a `502 Proxy Error` response: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>502 Proxy Error</title> </head><body> <h1>Proxy E (truncated...)
 ConnectException cURL error 28: Resolving timed out after 5001 milliseconds (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://xxxxxxxxxxxxxxx/hosting/capabilities
Failed to fetch capabilities
 ConnectException cURL error 28: Operation timed out after 5000 milliseconds with 0 bytes received (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://xxxxxxxxxxxxxxx/cool/convert-to/png
Failed to convert preview

I’ve been playing with the reverse proxy and DNS but haven’t found any solution yet.

Same problem here.
Just updated to Nextcloud 30 (Docker setup, with nginx as a reverse proxy, everything up to date). It had been working just fine previously, and I’ve gone through several Nextcloud upgrades.

curl https://cloud.alchimie-web.com/custom_apps/richdocumentscode/proxy.php?status

says {"status":"OK"} (either from a browser or from my Nextcloud container)
so I assume it’s a bug in the last update

It really seems to fail (http 400) at fetching proxy.php?req=/cool/convert-to/png

same problem on new install on shared hosting. Just replying to keep this thread alive…

|Error|richdocuments|ClientExceptionClient error:POST XXXXXXXXXX/apps/richdocumentscode/proxy.php?req=/cool/convert-to/pngresulted in a403 Forbidden` response: <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd” (truncated…)

Failed to convert preview: Client error: POST XXXXXXXXXXX/apps/richdocumentscode/proxy.php?req=/cool/convert-to/png resulted in a 403 Forbidden response: <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd” (truncated…)

`

Did anyone find a fix for this? I haven’t had time to look, but it’s clearly related to generating thumbnails for files.

Here’s hoping…

Still happening in 31.0.7

Same here in 32.0.0. Did anyone find a fix for this yes?

Because the last three versions up to 24.4.504 of Collabora Builtin CODE server did not work for me on my Nextcloud 30.x and 31.x, i removed the app and installed the Collabora CODE as docker image.
The same happend the last years several times on Nextcloud 23 up to 29 on an Univention Corporate Server - but the docker image always worked for me.

1 Like

Same. Getting this on NC 31.0.9

COOLWSD version: 25.04.5.2(git hash: f497e19646 (E))
LOKit version: Collabora Office 25.04.5.2(git hash: 2404805e4d)
Served by: Ubuntu 22.04.5 LTS
WOPI host: nextcloud 31.0.9.1 - richdocuments 8.7.5

Any ideas for fix?

My logs:

[richdocuments] Error: Failed to convert preview: Server error: `POST https://REDACTED/cool/convert-to/png` resulted in a `502 Bad Gateway` response:
error code: 502

	GET /core/preview?fileId=442190&x=32&y=32&mimeFallback=true&v=ac4028&a=0
	from REDACTED_IP by REDACTED_USER at 17 Nov 2025, 2:25:44 pm

Similar for me, but with an error 500

Error
	richdocuments
	
ServerException Server error: `POST https://REDACTED/nextcloud/apps/richdocumentscode/proxy.php?req=/cool/convert-to/png` resulted in a `500 Internal Server Error` response
Failed to convert preview: Server error: `POST https://REDACTED/nextcloud/apps/richdocumentscode/proxy.php?req=/cool/convert-to/png` resulted in a `500 Internal Server Error` response 

NC 32.0.0

Seeing the exact same errors.