Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Still problems when using templates in NC Office with NC AIO 10.1.1 #5763

Closed
4tler opened this issue Dec 17, 2024 · 5 comments · Fixed by #5781
Closed

Still problems when using templates in NC Office with NC AIO 10.1.1 #5763

4tler opened this issue Dec 17, 2024 · 5 comments · Fixed by #5781
Labels
2. developing Work in progress bug Something isn't working
Milestone

Comments

@4tler
Copy link

4tler commented Dec 17, 2024

@szaimen i testet #5688 it but the problem is still exist.

I still have 2 instances that have this problem. The strange thing is that the files are created after the error message, but not opened.

The instances are in an LXC via Proxmox.

I have already tried this without success:

  • Delete/reinstall NC Office completely
  • Activate/deactivate antivirus

Message in NC LOG:

Details

{
  "reqId": "KwCoddSAVIKkefDPyhsN",
  "level": 3,
  "time": "2024-12-13T16:21:44+00:00",
  "remoteAddr": "IP",
  "user": "user",
  "app": "no app in context",
  "method": "POST",
  "url": "/ocs/v2.php/apps/files/api/v1/templates/create",
  "message": "Client error: `POST https://cloud.domain.de/cool/transform-document-structure` resulted in a `403 Forbidden` response",
  "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36",
  "version": "30.0.4.1",
  "exception": {
    "Exception": "GuzzleHttp\\Exception\\ClientException",
    "Message": "Client error: `POST https://cloud.domain.de/cool/transform-document-structure` resulted in a `403 Forbidden` response",
    "Code": 403,
    "Trace": [
      {
        "file": "/var/www/html/3rdparty/guzzlehttp/guzzle/src/Middleware.php",
        "line": 72,
        "function": "create",
        "class": "GuzzleHttp\\Exception\\RequestException",
        "type": "::",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/html/3rdparty/guzzlehttp/promises/src/Promise.php",
        "line": 209,
        "function": "GuzzleHttp\\{closure}",
        "class": "GuzzleHttp\\Middleware",
        "type": "::",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/html/3rdparty/guzzlehttp/promises/src/Promise.php",
        "line": 158,
        "function": "callHandler",
        "class": "GuzzleHttp\\Promise\\Promise",
        "type": "::",
        "args": [
          1,
          "*** sensitive parameters replaced ***",
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/html/3rdparty/guzzlehttp/promises/src/TaskQueue.php",
        "line": 52,
        "function": "GuzzleHttp\\Promise\\{closure}",
        "class": "GuzzleHttp\\Promise\\Promise",
        "type": "::",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/html/3rdparty/guzzlehttp/promises/src/Promise.php",
        "line": 251,
        "function": "run",
        "class": "GuzzleHttp\\Promise\\TaskQueue",
        "type": "->",
        "args": [
          true
        ]
      },
      {
        "file": "/var/www/html/3rdparty/guzzlehttp/promises/src/Promise.php",
        "line": 227,
        "function": "invokeWaitFn",
        "class": "GuzzleHttp\\Promise\\Promise",
        "type": "->",
        "args": []
      },
      {
        "file": "/var/www/html/3rdparty/guzzlehttp/promises/src/Promise.php",
        "line": 272,
        "function": "waitIfPending",
        "class": "GuzzleHttp\\Promise\\Promise",
        "type": "->",
        "args": []
      },
      {
        "file": "/var/www/html/3rdparty/guzzlehttp/promises/src/Promise.php",
        "line": 229,
        "function": "invokeWaitList",
        "class": "GuzzleHttp\\Promise\\Promise",
        "type": "->",
        "args": []
      },
      {
        "file": "/var/www/html/3rdparty/guzzlehttp/promises/src/Promise.php",
        "line": 69,
        "function": "waitIfPending",
        "class": "GuzzleHttp\\Promise\\Promise",
        "type": "->",
        "args": []
      },
      {
        "file": "/var/www/html/3rdparty/guzzlehttp/guzzle/src/Client.php",
        "line": 189,
        "function": "wait",
        "class": "GuzzleHttp\\Promise\\Promise",
        "type": "->",
        "args": []
      },
      {
        "file": "/var/www/html/lib/private/Http/Client/Client.php",
        "line": 276,
        "function": "request",
        "class": "GuzzleHttp\\Client",
        "type": "->",
        "args": [
          "post",
          "*** sensitive parameters replaced ***",
          {
            "0": "And 1 more entries, set log level to debug to see all entries",
            "verify": "/var/www/html/resources/config/ca-bundle.crt",
            "timeout": 5,
            "nextcloud": {
              "allow_local_address": true
            },
            "multipart": [
              {
                "name": "data",
                "contents": null,
                "headers": {
                  "Content-Type": "multipart/form-data"
                }
              },
              {
                "name": "transform",
                "contents": "{\"Transforms\": []}"
              },
              {
                "name": "format",
                "contents": "ott"
              }
            ],
            "headers": {
              "User-Agent": "Nextcloud Server Crawler",
              "Accept-Encoding": "gzip"
            }
          }
        ]
      },
      {
        "file": "/var/www/html/custom_apps/richdocuments/lib/Service/TemplateFieldService.php",
        "line": 186,
        "function": "post",
        "class": "OC\\Http\\Client\\Client",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/html/custom_apps/richdocuments/lib/Listener/FileCreatedFromTemplateListener.php",
        "line": 61,
        "function": "fillFields",
        "class": "OCA\\Richdocuments\\Service\\TemplateFieldService",
        "type": "->",
        "args": [
          {
            "__class__": "OC\\Files\\Node\\File"
          },
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/html/lib/private/EventDispatcher/ServiceEventListener.php",
        "line": 68,
        "function": "handle",
        "class": "OCA\\Richdocuments\\Listener\\FileCreatedFromTemplateListener",
        "type": "->",
        "args": [
          {
            "__class__": "OCP\\Files\\Template\\FileCreatedFromTemplateEvent"
          }
        ]
      },
      {
        "file": "/var/www/html/3rdparty/symfony/event-dispatcher/EventDispatcher.php",
        "line": 220,
        "function": "__invoke",
        "class": "OC\\EventDispatcher\\ServiceEventListener",
        "type": "->",
        "args": [
          {
            "__class__": "OCP\\Files\\Template\\FileCreatedFromTemplateEvent"
          },
          "OCP\\Files\\Template\\FileCreatedFromTemplateEvent",
          {
            "__class__": "Symfony\\Component\\EventDispatcher\\EventDispatcher"
          }
        ]
      },
      {
        "file": "/var/www/html/3rdparty/symfony/event-dispatcher/EventDispatcher.php",
        "line": 56,
        "function": "callListeners",
        "class": "Symfony\\Component\\EventDispatcher\\EventDispatcher",
        "type": "->",
        "args": [
          [
            {
              "__class__": "Closure"
            }
          ],
          "OCP\\Files\\Template\\FileCreatedFromTemplateEvent",
          {
            "__class__": "OCP\\Files\\Template\\FileCreatedFromTemplateEvent"
          }
        ]
      },
      {
        "file": "/var/www/html/lib/private/EventDispatcher/EventDispatcher.php",
        "line": 67,
        "function": "dispatch",
        "class": "Symfony\\Component\\EventDispatcher\\EventDispatcher",
        "type": "->",
        "args": [
          {
            "__class__": "OCP\\Files\\Template\\FileCreatedFromTemplateEvent"
          },
          "OCP\\Files\\Template\\FileCreatedFromTemplateEvent"
        ]
      },
      {
        "file": "/var/www/html/lib/private/EventDispatcher/EventDispatcher.php",
        "line": 79,
        "function": "dispatch",
        "class": "OC\\EventDispatcher\\EventDispatcher",
        "type": "->",
        "args": [
          "OCP\\Files\\Template\\FileCreatedFromTemplateEvent",
          {
            "__class__": "OCP\\Files\\Template\\FileCreatedFromTemplateEvent"
          }
        ]
      },
      {
        "file": "/var/www/html/lib/private/Files/Template/TemplateManager.php",
        "line": 162,
        "function": "dispatchTyped",
        "class": "OC\\EventDispatcher\\EventDispatcher",
        "type": "->",
        "args": [
          {
            "__class__": "OCP\\Files\\Template\\FileCreatedFromTemplateEvent"
          }
        ]
      },
      {
        "file": "/var/www/html/apps/files/lib/Controller/TemplateController.php",
        "line": 68,
        "function": "createFromTemplate",
        "class": "OC\\Files\\Template\\TemplateManager",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 208,
        "function": "create",
        "class": "OCA\\Files\\Controller\\TemplateController",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 114,
        "function": "executeController",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->",
        "args": [
          {
            "__class__": "OCA\\Files\\Controller\\TemplateController"
          },
          "create"
        ]
      },
      {
        "file": "/var/www/html/lib/private/AppFramework/App.php",
        "line": 161,
        "function": "dispatch",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->",
        "args": [
          {
            "__class__": "OCA\\Files\\Controller\\TemplateController"
          },
          "create"
        ]
      },
      {
        "file": "/var/www/html/lib/private/Route/Router.php",
        "line": 302,
        "function": "main",
        "class": "OC\\AppFramework\\App",
        "type": "::",
        "args": [
          "OCA\\Files\\Controller\\TemplateController",
          "create",
          {
            "__class__": "OC\\AppFramework\\DependencyInjection\\DIContainer"
          },
          {
            "_route": "ocs.files.template.create"
          }
        ]
      },
      {
        "file": "/var/www/html/ocs/v1.php",
        "line": 43,
        "function": "match",
        "class": "OC\\Route\\Router",
        "type": "->",
        "args": [
          "/ocsapp/apps/files/api/v1/templates/create"
        ]
      },
      {
        "file": "/var/www/html/ocs/v2.php",
        "line": 7,
        "args": [
          "/var/www/html/ocs/v1.php"
        ],
        "function": "require_once"
      }
    ],
    "File": "/var/www/html/3rdparty/guzzlehttp/guzzle/src/Exception/RequestException.php",
    "Line": 113,
    "message": "Client error: `POST https://cloud.domain.de/cool/transform-document-structure` resulted in a `403 Forbidden` response",
    "exception": [],
    "CustomMessage": "Client error: `POST https://cloud.domain.de/cool/transform-document-structure` resulted in a `403 Forbidden` response"
  },
  "id": "675c5fecb6660"

Details

{
  "reqId": "KwCoddSAVIKkefDPyhsN",
  "level": 3,
  "time": "2024-12-13T16:21:44+00:00",
  "remoteAddr": "IP",
  "user": "USER",
  "app": "richdocuments",
  "method": "POST",
  "url": "/ocs/v2.php/apps/files/api/v1/templates/create",
  "message": "Client error: `POST https://cloud.domain/cool/transform-document-structure` resulted in a `403 Forbidden` response",
  "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36",
  "version": "30.0.4.1",
  "data": {
    "app": "richdocuments"
  },
  "id": "675c5fecb6667"
}

Image

Originally posted by @4tler in #5682

@szaimen
Copy link
Collaborator

szaimen commented Dec 17, 2024

Hi, can you please post the collabora contianer logs here? There should be a log message that will help us to further debug this issue.

@szaimen szaimen added 0. Needs triage Pending approval or rejection. This issue is pending approval. needs info Not enough information provided labels Dec 17, 2024
@szaimen
Copy link
Collaborator

szaimen commented Dec 17, 2024

Okay, I can reproduce this:

2024-12-17T10:04:02.027667553Z wsd-00006-00028 2024-12-17 11:04:02.024722 +0100 [ websrv_poll ] WRN  convert-to: Requesting address is denied: fdf2:24b8:2e1c::1| wsd/ClientRequestDispatcher.cpp:443
2024-12-17T10:04:02.027748983Z wsd-00006-00028 2024-12-17 11:04:02.026589 +0100 [ websrv_poll ] WRN  #25: Conversion requests not allowed from this address: ::ffff:172.18.0.11| wsd/ClientRequestDispatcher.cpp:1512

I tried to make it work with adding --o:net.post_allow_host[20]=0\\.0\\.0\\.0/0 --o:net.post_allow_host[21]=::/0 --o:net.post_allow_host[22]=::ffff:172\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3} --o:net.post_allow_host[23]=::ffff:172\\.18\\.0\\.11 --o:net.post_allow_host[24]=fdf2:24b8:2e1c::1 but did not succeed yet. Will need to ask internally for help on this as I am out of ideas now.

@4tler
Copy link
Author

4tler commented Dec 17, 2024

OK, here is my log if its help. Thanks a lot!

2024-12-17T00:47:43.135676356Z wsd-00007-00021 2024-12-17 00:47:43.135595 +0000 [ websrv_poll ] WRN  convert-to: Requesting address is denied: xx.xxx.xxx.201| wsd/ClientRequestDispatcher.cpp:500
2024-12-17T01:27:58.347954576Z wsd-00007-00011 2024-12-17 01:27:58.347731 +0000 [ asyncdns ] WRN  Waking up dead poll thread [main], started: false, finished: false| net/Socket.hpp:808
2024-12-17T01:27:58.348014980Z wsd-00007-00007 2024-12-17 01:27:58.347796 +0000 [ coolwsd ] WRN  Waking up dead poll thread [main], started: false, finished: false| net/Socket.hpp:808
2024-12-17T01:52:43.197534392Z wsd-00007-00021 2024-12-17 01:52:43.197436 +0000 [ websrv_poll ] WRN  convert-to: Requesting address is denied: xx.xxx.xxx.201| wsd/ClientRequestDispatcher.cpp:500
2024-12-17T02:57:43.421749510Z wsd-00007-00021 2024-12-17 02:57:43.421672 +0000 [ websrv_poll ] WRN  convert-to: Requesting address is denied: xx.xxx.xxx.201| wsd/ClientRequestDispatcher.cpp:500
2024-12-17T04:02:43.234992346Z wsd-00007-00021 2024-12-17 04:02:43.234919 +0000 [ websrv_poll ] WRN  convert-to: Requesting address is denied: xx.xxx.xxx.201| wsd/ClientRequestDispatcher.cpp:500
2024-12-17T04:42:23.627326901Z frk-00013-00013 2024-12-17 04:42:23.627251 +0000 [ forkit ] WRN  The systemplate directory [/opt/cool/systemplate] is read-only, and at least [/opt/cool/systemplate//etc/hosts] is out-of-date. Will have to clone dynamic elements of systemplate to the jails. To restore optimal performance, make sure the files in [/opt/cool/systemplate/etc] are up-to-date.| common/JailUtil.cpp:585
2024-12-17T04:42:24.464283256Z wsd-00007-00021 2024-12-17 04:42:24.464222 +0000 [ websrv_poll ] ERR  FileServerRequestHandler: File not found: Invalid URI request (hash): [/browser/a4b67a7664/src/layer/tile/TileWorker.js].| wsd/FileServer.cpp:780
2024-12-17T04:43:40.892933918Z /usr/bin/coolmount: forced unmount of [/opt/cool/child-roots/7-bc30ffd7/HnO4qfASC1lAu1PJ/lo] failed: Permission denied.
2024-12-17T05:07:43.365244827Z wsd-00007-00021 2024-12-17 05:07:43.365182 +0000 [ websrv_poll ] WRN  convert-to: Requesting address is denied: xx.xxx.xxx.201| wsd/ClientRequestDispatcher.cpp:500
2024-12-17T06:12:43.364405998Z wsd-00007-00021 2024-12-17 06:12:43.364350 +0000 [ websrv_poll ] WRN  convert-to: Requesting address is denied: xx.xxx.xxx.201| wsd/ClientRequestDispatcher.cpp:500
2024-12-17T07:17:43.612362306Z wsd-00007-00021 2024-12-17 07:17:43.612301 +0000 [ websrv_poll ] WRN  convert-to: Requesting address is denied: xx.xxx.xxx.201| wsd/ClientRequestDispatcher.cpp:500
2024-12-17T08:22:43.360488837Z wsd-00007-00021 2024-12-17 08:22:43.360429 +0000 [ websrv_poll ] WRN  convert-to: Requesting address is denied: xx.xxx.xxx.201| wsd/ClientRequestDispatcher.cpp:500
2024-12-17T08:34:20.832072817Z frk-00013-00013 2024-12-17 08:34:20.831983 +0000 [ forkit ] WRN  The systemplate directory [/opt/cool/systemplate] is read-only, and at least [/opt/cool/systemplate//etc/hosts] is out-of-date. Will have to clone dynamic elements of systemplate to the jails. To restore optimal performance, make sure the files in [/opt/cool/systemplate/etc] are up-to-date.| common/JailUtil.cpp:585
2024-12-17T08:34:21.275169778Z wsd-00007-00021 2024-12-17 08:34:21.275054 +0000 [ websrv_poll ] ERR  FileServerRequestHandler: File not found: Invalid URI request (hash): [/browser/a4b67a7664/src/layer/tile/TileWorker.js].| wsd/FileServer.cpp:780
2024-12-17T08:35:46.227213347Z /usr/bin/coolmount: forced unmount of [/opt/cool/child-roots/7-bc30ffd7/ujfB60NV6yj2kvSF/lo] failed: Permission denied.
2024-12-17T09:27:43.326500511Z wsd-00007-00021 2024-12-17 09:27:43.326422 +0000 [ websrv_poll ] WRN  convert-to: Requesting address is denied: xx.xxx.xxx.201| wsd/ClientRequestDispatcher.cpp:500
2024-12-17T10:03:26.358584540Z wsd-00007-00021 2024-12-17 10:03:26.358524 +0000 [ websrv_poll ] WRN  convert-to: Requesting address is denied: xx.xxx.xxx.201| wsd/ClientRequestDispatcher.cpp:443
2024-12-17T10:03:26.358655164Z wsd-00007-00021 2024-12-17 10:03:26.358538 +0000 [ websrv_poll ] WRN  #28: Conversion requests not allowed from this address: ::ffff:172.19.0.12| wsd/ClientRequestDispatcher.cpp:1512

@szaimen szaimen added 1. to develop Accepted and waiting to be taken care of bug Something isn't working help wanted Extra attention is needed and removed 0. Needs triage Pending approval or rejection. This issue is pending approval. needs info Not enough information provided labels Dec 17, 2024
This was referenced Dec 20, 2024
@szaimen szaimen added 2. developing Work in progress and removed 1. to develop Accepted and waiting to be taken care of help wanted Extra attention is needed labels Dec 20, 2024
@szaimen
Copy link
Collaborator

szaimen commented Dec 20, 2024

Okay, found a fix in #5781

@szaimen szaimen added this to the next milestone Dec 20, 2024
@szaimen
Copy link
Collaborator

szaimen commented Dec 20, 2024

This is now fixed with v10.2.0 Beta. Testing and feedback is welcome! See https://github.com/nextcloud/all-in-one#how-to-switch-the-channel

@szaimen szaimen pinned this issue Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2. developing Work in progress bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants