nextcloud / richdocuments

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

WOPI test failures #2896

Closed juliushaertl closed 1 year ago

juliushaertl commented 1 year ago
{
  "reqId": "RTb0v06EtkYHCMPYLAJh",
  "level": 3,
  "time": "2023-04-05T16:01:06+00:00",
  "remoteAddr": "192.168.21.1",
  "user": "user2",
  "app": "index",
  "method": "POST",
  "url": "/index.php/apps/richdocuments/wopi/files/588_ockjh2mx8t3p/contents?access_token=RPk3aR6jgZhxrGY4ovLenIdQvCLjxxfy",
  "message": "OC\\Files\\View::basicOperation(): Argument #2 ($path) must be of type string, null given, called in /var/www/html/lib/private/Files/View.php on line 518 in file '/var/www/html/lib/private/Files/View.php' line 1110",
  "userAgent": "GuzzleHttp/7",
  "version": "27.0.0.0",
  "exception": {
    "Exception": "Exception",
    "Message": "OC\\Files\\View::basicOperation(): Argument #2 ($path) must be of type string, null given, called in /var/www/html/lib/private/Files/View.php on line 518 in file '/var/www/html/lib/private/Files/View.php' line 1110",
    "Code": 0,
    "Trace": [
      {
        "file": "/var/www/html/lib/private/AppFramework/App.php",
        "line": 183,
        "function": "dispatch",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->",
        "args": [
          [
            "OCA\\Richdocuments\\Controller\\WopiController"
          ],
          "putFile"
        ]
      },
      {
        "file": "/var/www/html/lib/private/Route/Router.php",
        "line": 315,
        "function": "main",
        "class": "OC\\AppFramework\\App",
        "type": "::",
        "args": [
          "OCA\\Richdocuments\\Controller\\WopiController",
          "putFile",
          [
            "OC\\AppFramework\\DependencyInjection\\DIContainer"
          ],
          [
            "588_ockjh2mx8t3p",
            "richdocuments.wopi.putFile"
          ]
        ]
      },
      {
        "file": "/var/www/html/lib/base.php",
        "line": 1056,
        "function": "match",
        "class": "OC\\Route\\Router",
        "type": "->",
        "args": [
          "/apps/richdocuments/wopi/files/588_ockjh2mx8t3p/contents"
        ]
      },
      {
        "file": "/var/www/html/index.php",
        "line": 36,
        "function": "handleRequest",
        "class": "OC",
        "type": "::",
        "args": []
      }
    ],
    "File": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
    "Line": 169,
    "Previous": {
      "Exception": "TypeError",
      "Message": "OC\\Files\\View::basicOperation(): Argument #2 ($path) must be of type string, null given, called in /var/www/html/lib/private/Files/View.php on line 518",
      "Code": 0,
      "Trace": [
        {
          "file": "/var/www/html/lib/private/Files/View.php",
          "line": 518,
          "function": "basicOperation",
          "class": "OC\\Files\\View",
          "type": "->",
          "args": [
            "file_exists",
            null
          ]
        },
        {
          "file": "/var/www/html/lib/private/Files/Filesystem.php",
          "line": 545,
          "function": "file_exists",
          "class": "OC\\Files\\View",
          "type": "->",
          "args": [
            null
          ]
        },
        {
          "file": "/var/www/html/apps/files_versions/lib/Storage.php",
          "line": 189,
          "function": "file_exists",
          "class": "OC\\Files\\Filesystem",
          "type": "::",
          "args": [
            null
          ]
        },
        {
          "file": "/var/www/html/apps/files_versions/lib/Listener/FileEventsListener.php",
          "line": 205,
          "function": "store",
          "class": "OCA\\Files_Versions\\Storage",
          "type": "::",
          "args": [
            null
          ]
        },
        {
          "file": "/var/www/html/apps/files_versions/lib/Listener/FileEventsListener.php",
          "line": 102,
          "function": "write_hook",
          "class": "OCA\\Files_Versions\\Listener\\FileEventsListener",
          "type": "->",
          "args": [
            [
              "OC\\Files\\Node\\File"
            ]
          ]
        },
        {
          "file": "/var/www/html/lib/private/EventDispatcher/ServiceEventListener.php",
          "line": 86,
          "function": "handle",
          "class": "OCA\\Files_Versions\\Listener\\FileEventsListener",
          "type": "->",
          "args": [
            [
              "OCP\\Files\\Events\\Node\\BeforeNodeWrittenEvent"
            ]
          ]
        },
        {
          "file": "/var/www/html/3rdparty/symfony/event-dispatcher/EventDispatcher.php",
          "line": 251,
          "function": "__invoke",
          "class": "OC\\EventDispatcher\\ServiceEventListener",
          "type": "->",
          "args": [
            [
              "OCP\\Files\\Events\\Node\\BeforeNodeWrittenEvent"
            ],
            "OCP\\Files\\Events\\Node\\BeforeNodeWrittenEvent",
            [
              "Symfony\\Component\\EventDispatcher\\EventDispatcher"
            ]
          ]
        },
        {
          "file": "/var/www/html/3rdparty/symfony/event-dispatcher/EventDispatcher.php",
          "line": 73,
          "function": "callListeners",
          "class": "Symfony\\Component\\EventDispatcher\\EventDispatcher",
          "type": "->",
          "args": [
            [
              [
                "Closure"
              ]
            ],
            "OCP\\Files\\Events\\Node\\BeforeNodeWrittenEvent",
            [
              "OCP\\Files\\Events\\Node\\BeforeNodeWrittenEvent"
            ]
          ]
        },
        {
          "file": "/var/www/html/lib/private/EventDispatcher/EventDispatcher.php",
          "line": 87,
          "function": "dispatch",
          "class": "Symfony\\Component\\EventDispatcher\\EventDispatcher",
          "type": "->",
          "args": [
            [
              "OCP\\Files\\Events\\Node\\BeforeNodeWrittenEvent"
            ],
            "OCP\\Files\\Events\\Node\\BeforeNodeWrittenEvent"
          ]
        },
        {
          "file": "/var/www/html/lib/private/EventDispatcher/EventDispatcher.php",
          "line": 99,
          "function": "dispatch",
          "class": "OC\\EventDispatcher\\EventDispatcher",
          "type": "->",
          "args": [
            "OCP\\Files\\Events\\Node\\BeforeNodeWrittenEvent",
            [
              "OCP\\Files\\Events\\Node\\BeforeNodeWrittenEvent"
            ]
          ]
        },
        {
          "file": "/var/www/html/lib/private/Files/Node/HookConnector.php",
          "line": 109,
          "function": "dispatchTyped",
          "class": "OC\\EventDispatcher\\EventDispatcher",
          "type": "->",
          "args": [
            [
              "OCP\\Files\\Events\\Node\\BeforeNodeWrittenEvent"
            ]
          ]
        },
        {
          "file": "/var/www/html/lib/private/legacy/OC_Hook.php",
          "line": 105,
          "function": "write",
          "class": "OC\\Files\\Node\\HookConnector",
          "type": "->",
          "args": [
            [
              "/document-share-link.odt",
              true
            ]
          ]
        },
        {
          "file": "/var/www/html/lib/private/Files/View.php",
          "line": 588,
          "function": "emit",
          "class": "OC_Hook",
          "type": "::",
          "args": [
            "OC_Filesystem",
            "write",
            [
              "/document-share-link.odt",
              true
            ]
          ]
        },
        {
          "file": "/var/www/html/lib/private/Files/View.php",
          "line": 629,
          "function": "emit_file_hooks_pre",
          "class": "OC\\Files\\View",
          "type": "->",
          "args": [
            true,
            "/user1/files/document-share-link.odt",
            true
          ]
        },
        {
          "file": "/var/www/html/lib/private/Files/Node/File.php",
          "line": 71,
          "function": "file_put_contents",
          "class": "OC\\Files\\View",
          "type": "->",
          "args": [
            "/user1/files/document-share-link.odt",
            null
          ]
        },
        {
          "file": "/var/www/html/apps-extra/richdocuments/lib/Controller/WopiController.php",
          "line": 503,
          "function": "putContent",
          "class": "OC\\Files\\Node\\File",
          "type": "->",
          "args": [
            null
          ]
        },
        {
          "file": "/var/www/html/apps-extra/richdocuments/lib/Controller/WopiController.php",
          "line": 785,
          "function": "OCA\\Richdocuments\\Controller\\{closure}",
          "class": "OCA\\Richdocuments\\Controller\\WopiController",
          "type": "->",
          "args": [
            "*** sensitive parameters replaced ***"
          ]
        },
        {
          "file": "/var/www/html/apps-extra/richdocuments/lib/Controller/WopiController.php",
          "line": 762,
          "function": "retryOperation",
          "class": "OCA\\Richdocuments\\Controller\\WopiController",
          "type": "->",
          "args": [
            [
              "Closure"
            ]
          ]
        },
        {
          "file": "/var/www/html/lib/private/Files/Lock/LockManager.php",
          "line": 29,
          "function": "OCA\\Richdocuments\\Controller\\{closure}",
          "class": "OCA\\Richdocuments\\Controller\\WopiController",
          "type": "->",
          "args": [
            "*** sensitive parameters replaced ***"
          ]
        },
        {
          "file": "/var/www/html/apps-extra/richdocuments/lib/Controller/WopiController.php",
          "line": 765,
          "function": "runInScope",
          "class": "OC\\Files\\Lock\\LockManager",
          "type": "->",
          "args": [
            [
              "OCP\\Files\\Lock\\LockContext"
            ],
            [
              "Closure"
            ]
          ]
        },
        {
          "file": "/var/www/html/apps-extra/richdocuments/lib/Controller/WopiController.php",
          "line": 504,
          "function": "wrappedFilesystemOperation",
          "class": "OCA\\Richdocuments\\Controller\\WopiController",
          "type": "->",
          "args": [
            [
              "OCA\\Richdocuments\\Db\\Wopi",
              11
            ],
            [
              "Closure"
            ]
          ]
        },
        {
          "file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
          "line": 230,
          "function": "putFile",
          "class": "OCA\\Richdocuments\\Controller\\WopiController",
          "type": "->",
          "args": [
            "588",
            "RPk3aR6jgZhxrGY4ovLenIdQvCLjxxfy"
          ]
        },
        {
          "file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
          "line": 137,
          "function": "executeController",
          "class": "OC\\AppFramework\\Http\\Dispatcher",
          "type": "->",
          "args": [
            [
              "OCA\\Richdocuments\\Controller\\WopiController"
            ],
            "putFile"
          ]
        },
        {
          "file": "/var/www/html/lib/private/AppFramework/App.php",
          "line": 183,
          "function": "dispatch",
          "class": "OC\\AppFramework\\Http\\Dispatcher",
          "type": "->",
          "args": [
            [
              "OCA\\Richdocuments\\Controller\\WopiController"
            ],
            "putFile"
          ]
        },
        {
          "file": "/var/www/html/lib/private/Route/Router.php",
          "line": 315,
          "function": "main",
          "class": "OC\\AppFramework\\App",
          "type": "::",
          "args": [
            "OCA\\Richdocuments\\Controller\\WopiController",
            "putFile",
            [
              "OC\\AppFramework\\DependencyInjection\\DIContainer"
            ],
            [
              "588_ockjh2mx8t3p",
              "richdocuments.wopi.putFile"
            ]
          ]
        },
        {
          "file": "/var/www/html/lib/base.php",
          "line": 1056,
          "function": "match",
          "class": "OC\\Route\\Router",
          "type": "->",
          "args": [
            "/apps/richdocuments/wopi/files/588_ockjh2mx8t3p/contents"
          ]
        },
        {
          "file": "/var/www/html/index.php",
          "line": 36,
          "function": "handleRequest",
          "class": "OC",
          "type": "::",
          "args": []
        }
      ],
      "File": "/var/www/html/lib/private/Files/View.php",
      "Line": 1110
    },
    "CustomMessage": "--"
  }
}

Bisected to be caused by https://github.com/nextcloud/server/pull/36836/commits/0b3dad895fcd87dadb3861bb3842ea8b67b28448#diff-64a02ee1149d33d0747360694c2abf4ef1bdbfc379b4bb40f76c22b5b1fc06d9R1110 but the root cause is still unknown as calling basicOperation with null as path is quite unexpected

I'm not fully sure yet if this is related to versions or richdocuments, to be investigated further.

juliushaertl commented 1 year ago

Screenshot 2023-04-05 at 18 36 47

juliushaertl commented 1 year ago

Screenshot 2023-04-05 at 18 41 36