Problems with locally mounted storage

[/details]
I am running Nextcloud installed on TrueNas Scale. It is installed via helm charts from TrueCharts.

Nextcloud version: 27.1.4
Operating system and version: TrueNas Scale (Debian)
Webserver: nginx

The issue you are facing:
I am mounting to the container’s local paths from my host machine. While accessing those paths from the terminal on the pod, there is no issues, the files are easily accessible.

The issue starts using the UI. I have tried:

  • chrome
  • firefox
  • Edge
    Browser (and its version) seems not to matter.

While I browse the mounted folders, Nextcloud UI shows me it is empty. Once I refresh the page, it starts to load files. The real problem is that I want to upload something there - the upload randomly fails with “File not found” error.

I admit those folders are quite heavily packed, 2TB total.

Steps to replicate it:

  1. Have a few folders locally on the nextcloud host
  2. mount those folders inside the nextcloud using Settings > External storage
  3. Try to browse the files and upload files in bulk

The output of your Nextcloud log in Admin > Logging:

[
  {
    "reqId": "ZVGsrAosr8A3FnnXAb6Q",
    "level": 3,
    "time": "09/10/2023 10:39:50",
    "remoteAddr": "192.168.220.179",
    "user": "--",
    "app": "no app in context",
    "method": "PROPFIND",
    "url": "/remote.php/dav/files/REDACTED",
    "message": "Could not boot files_trashbin: Could not resolve trashManager! Class \"trashManager\" does not exist",
    "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/117.0",
    "version": "27.0.2.1",
    "exception": {
      "Exception": "OC\\AppFramework\\Utility\\QueryNotFoundException",
      "Message": "Could not resolve trashManager! Class \"trashManager\" does not exist",
      "Code": 0,
      "Trace": [
        {
          "file": "/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php",
          "line": 142,
          "function": "resolve",
          "class": "OC\\AppFramework\\Utility\\SimpleContainer",
          "type": "->",
          "args": ["trashManager"]
        },
        {
          "file": "/var/www/html/lib/private/ServerContainer.php",
          "line": 171,
          "function": "query",
          "class": "OC\\AppFramework\\Utility\\SimpleContainer",
          "type": "->",
          "args": ["trashManager", true]
        },
        {
          "file": "/var/www/html/lib/private/AppFramework/DependencyInjection/DIContainer.php",
          "line": 469,
          "function": "query",
          "class": "OC\\ServerContainer",
          "type": "->",
          "args": ["trashManager", true]
        },
        {
          "file": "/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php",
          "line": 65,
          "function": "query",
          "class": "OC\\AppFramework\\DependencyInjection\\DIContainer",
          "type": "->",
          "args": ["trashManager"]
        },
        {
          "file": "/var/www/html/lib/private/AppFramework/Bootstrap/FunctionInjector.php",
          "line": 56,
          "function": "get",
          "class": "OC\\AppFramework\\Utility\\SimpleContainer",
          "type": "->",
          "args": ["trashManager"]
        },
        {
          "function": "OC\\AppFramework\\Bootstrap\\{closure}",
          "class": "OC\\AppFramework\\Bootstrap\\FunctionInjector",
          "type": "->",
          "args": ["*** sensitive parameters replaced ***"]
        },
        {
          "file": "/var/www/html/lib/private/AppFramework/Bootstrap/FunctionInjector.php",
          "line": 45,
          "function": "array_map",
          "args": [
            ["Closure"],
            [
              ["ReflectionParameter", "serverContainer"],
              ["ReflectionParameter", "logger"],
              ["ReflectionParameter", "appManager"],
              "*** sensitive parameters replaced ***"
            ]
          ]
        },
        {
          "file": "/var/www/html/lib/private/AppFramework/Bootstrap/BootContext.php",
          "line": 50,
          "function": "injectFn",
          "class": "OC\\AppFramework\\Bootstrap\\FunctionInjector",
          "type": "->",
          "args": [[["OCA\\Files_Trashbin\\AppInfo\\Application"], "registerTrashBackends"]]
        },
        {
          "file": "/var/www/html/apps/files_trashbin/lib/AppInfo/Application.php",
          "line": 68,
          "function": "injectFn",
          "class": "OC\\AppFramework\\Bootstrap\\BootContext",
          "type": "->",
          "args": [[["OCA\\Files_Trashbin\\AppInfo\\Application"], "registerTrashBackends"]]
        },
        {
          "file": "/var/www/html/lib/private/AppFramework/Bootstrap/Coordinator.php",
          "line": 200,
          "function": "boot",
          "class": "OCA\\Files_Trashbin\\AppInfo\\Application",
          "type": "->",
          "args": [["OC\\AppFramework\\Bootstrap\\BootContext"]]
        },
        {
          "file": "/var/www/html/lib/private/App/AppManager.php",
          "line": 437,
          "function": "bootApp",
          "class": "OC\\AppFramework\\Bootstrap\\Coordinator",
          "type": "->",
          "args": ["files_trashbin"]
        },
        {
          "file": "/var/www/html/lib/private/App/AppManager.php",
          "line": 216,
          "function": "loadApp",
          "class": "OC\\App\\AppManager",
          "type": "->",
          "args": ["files_trashbin"]
        },
        {
          "file": "/var/www/html/lib/private/legacy/OC_App.php",
          "line": 126,
          "function": "loadApps",
          "class": "OC\\App\\AppManager",
          "type": "->",
          "args": [["dav"]]
        },
        {
          "file": "/var/www/html/apps/dav/lib/AppInfo/Application.php",
          "line": 209,
          "function": "loadApps",
          "class": "OC_App",
          "type": "::",
          "args": [["dav"]]
        },
        {
          "file": "/var/www/html/lib/private/AppFramework/Bootstrap/Coordinator.php",
          "line": 200,
          "function": "boot",
          "class": "OCA\\DAV\\AppInfo\\Application",
          "type": "->",
          "args": [["OC\\AppFramework\\Bootstrap\\BootContext"]]
        },
        {
          "file": "/var/www/html/lib/private/App/AppManager.php",
          "line": 437,
          "function": "bootApp",
          "class": "OC\\AppFramework\\Bootstrap\\Coordinator",
          "type": "->",
          "args": ["dav"]
        },
        {
          "file": "/var/www/html/lib/private/App/AppManager.php",
          "line": 216,
          "function": "loadApp",
          "class": "OC\\App\\AppManager",
          "type": "->",
          "args": ["dav"]
        },
        {
          "file": "/var/www/html/lib/private/legacy/OC_App.php",
          "line": 126,
          "function": "loadApps",
          "class": "OC\\App\\AppManager",
          "type": "->",
          "args": [["filesystem"]]
        },
        {
          "file": "/var/www/html/lib/private/Files/SetupManager.php",
          "line": 132,
          "function": "loadApps",
          "class": "OC_App",
          "type": "::",
          "args": [["filesystem"]]
        },
        {
          "file": "/var/www/html/lib/private/Files/SetupManager.php",
          "line": 351,
          "function": "setupBuiltinWrappers",
          "class": "OC\\Files\\SetupManager",
          "type": "->",
          "args": []
        },
        {
          "file": "/var/www/html/lib/private/Files/SetupManager.php",
          "line": 391,
          "function": "setupRoot",
          "class": "OC\\Files\\SetupManager",
          "type": "->",
          "args": []
        },
        {
          "file": "/var/www/html/lib/private/Files/Mount/Manager.php",
          "line": 95,
          "function": "setupForPath",
          "class": "OC\\Files\\SetupManager",
          "type": "->",
          "args": ["/appdata_ochasn1ca9qh/js/core"]
        },
        {
          "file": "/var/www/html/lib/private/Files/View.php",
          "line": 1352,
          "function": "find",
          "class": "OC\\Files\\Mount\\Manager",
          "type": "->",
          "args": ["/appdata_ochasn1ca9qh/js/core"]
        },
        {
          "file": "/var/www/html/lib/private/Files/Node/Root.php",
          "line": 202,
          "function": "getFileInfo",
          "class": "OC\\Files\\View",
          "type": "->",
          "args": ["/appdata_ochasn1ca9qh/js/core", false]
        },
        {
          "function": "get",
          "class": "OC\\Files\\Node\\Root",
          "type": "->",
          "args": ["/appdata_ochasn1ca9qh/js/core"]
        },
        {
          "file": "/var/www/html/lib/private/Files/Node/LazyFolder.php",
          "line": 74,
          "function": "call_user_func_array",
          "args": [[["OC\\Files\\Node\\Root"], "get"], ["appdata_ochasn1ca9qh/js/core"]]
        },
        {
          "file": "/var/www/html/lib/private/Files/Node/LazyFolder.php",
          "line": 151,
          "function": "__call",
          "class": "OC\\Files\\Node\\LazyFolder",
          "type": "->",
          "args": ["get", ["appdata_ochasn1ca9qh/js/core"]]
        },
        {
          "file": "/var/www/html/lib/private/Files/AppData/AppData.php",
          "line": 132,
          "function": "get",
          "class": "OC\\Files\\Node\\LazyFolder",
          "type": "->",
          "args": ["appdata_ochasn1ca9qh/js/core"]
        },
        {
          "file": "/var/www/html/lib/private/Template/JSCombiner.php",
          "line": 87,
          "function": "getFolder",
          "class": "OC\\Files\\AppData\\AppData",
          "type": "->",
          "args": ["core"]
        },
        {
          "file": "/var/www/html/lib/private/Template/JSResourceLocator.php",
          "line": 145,
          "function": "process",
          "class": "OC\\Template\\JSCombiner",
          "type": "->",
          "args": ["/var/www/html", "core/js/merged-template-prepend.json", "core"]
        },
        {
          "file": "/var/www/html/lib/private/Template/JSResourceLocator.php",
          "line": 75,
          "function": "cacheAndAppendCombineJsonIfExist",
          "class": "OC\\Template\\JSResourceLocator",
          "type": "->",
          "args": ["/var/www/html", "core/js/merged-template-prepend.json"]
        },
        {
          "file": "/var/www/html/lib/private/Template/ResourceLocator.php",
          "line": 73,
          "function": "doFind",
          "class": "OC\\Template\\JSResourceLocator",
          "type": "->",
          "args": ["core/js/merged-template-prepend"]
        },
        {
          "file": "/var/www/html/lib/private/TemplateLayout.php",
          "line": 377,
          "function": "find",
          "class": "OC\\Template\\ResourceLocator",
          "type": "->",
          "args": [
            [
              "core/js/common",
              "core/js/main",
              "core/l10n/pl",
              "core/js/files_fileinfo",
              "core/js/files_client",
              "And 1 more entries, set log level to debug to see all entries"
            ]
          ]
        },
        {
          "file": "/var/www/html/lib/private/TemplateLayout.php",
          "line": 222,
          "function": "findJavascriptFiles",
          "class": "OC\\TemplateLayout",
          "type": "::",
          "args": [
            [
              "core/js/common",
              "core/js/main",
              "core/l10n/pl",
              "core/js/files_fileinfo",
              "core/js/files_client",
              "And 1 more entries, set log level to debug to see all entries"
            ]
          ]
        },
        {
          "file": "/var/www/html/lib/private/legacy/OC_Template.php",
          "line": 182,
          "function": "__construct",
          "class": "OC\\TemplateLayout",
          "type": "->",
          "args": ["error", ""]
        },
        {
          "file": "/var/www/html/lib/private/Template/Base.php",
          "line": 132,
          "function": "fetchPage",
          "class": "OC_Template",
          "type": "->",
          "args": []
        },
        {
          "file": "/var/www/html/lib/private/legacy/OC_Template.php",
          "line": 331,
          "function": "printPage",
          "class": "OC\\Template\\Base",
          "type": "->",
          "args": []
        },
        {
          "file": "/var/www/html/remote.php",
          "line": 92,
          "function": "printExceptionErrorPage",
          "class": "OC_Template",
          "type": "::",
          "args": [["Doctrine\\DBAL\\Exception"], 500]
        },
        {
          "file": "/var/www/html/remote.php",
          "line": 174,
          "function": "handleException",
          "args": [["Doctrine\\DBAL\\Exception"]]
        }
      ],
      "File": "/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php",
      "Line": 131,
      "message": "Could not boot files_trashbin: Could not resolve trashManager! Class \"trashManager\" does not exist",
      "exception": {},
      "CustomMessage": "Could not boot files_trashbin: Could not resolve trashManager! Class \"trashManager\" does not exist"
    }
  },
  {
    "reqId": "xOeM2DwyDzMYaCj09JSr",
    "level": 3,
    "time": "26/10/2023 09:24:19",
    "remoteAddr": "192.168.220.227",
    "user": "REDACTED",
    "app": "no app in context",
    "method": "PUT",
    "url": "/remote.php/webdav/Pictures/REDACTED",
    "message": "Expected filesize of 3144011 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 3137536 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.",
    "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/118.0",
    "version": "27.0.2.1",
    "exception": {
      "Exception": "Sabre\\DAV\\Exception\\BadRequest",
      "Message": "Expected filesize of 3144011 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 3137536 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.",
      "Code": 0,
      "Trace": [
        {
          "file": "/var/www/html/apps/dav/lib/Connector/Sabre/Directory.php",
          "line": 149,
          "function": "put",
          "class": "OCA\\DAV\\Connector\\Sabre\\File",
          "type": "->",
          "args": ["*** sensitive parameters replaced ***"]
        },
        {
          "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
          "line": 1098,
          "function": "createFile",
          "class": "OCA\\DAV\\Connector\\Sabre\\Directory",
          "type": "->",
          "args": ["*** sensitive parameters replaced ***"]
        },
        {
          "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",
          "line": 504,
          "function": "createFile",
          "class": "Sabre\\DAV\\Server",
          "type": "->",
          "args": ["*** sensitive parameters replaced ***"]
        },
        {
          "file": "/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",
          "line": 89,
          "function": "httpPut",
          "class": "Sabre\\DAV\\CorePlugin",
          "type": "->",
          "args": [["Sabre\\HTTP\\Request"], ["Sabre\\HTTP\\Response"]]
        },
        {
          "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
          "line": 472,
          "function": "emit",
          "class": "Sabre\\DAV\\Server",
          "type": "->",
          "args": ["method:PUT", [["Sabre\\HTTP\\Request"], ["Sabre\\HTTP\\Response"]]]
        },
        {
          "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
          "line": 253,
          "function": "invokeMethod",
          "class": "Sabre\\DAV\\Server",
          "type": "->",
          "args": [["Sabre\\HTTP\\Request"], ["Sabre\\HTTP\\Response"]]
        },
        {
          "file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
          "line": 321,
          "function": "start",
          "class": "Sabre\\DAV\\Server",
          "type": "->",
          "args": []
        },
        {
          "file": "/var/www/html/apps/dav/appinfo/v1/webdav.php",
          "line": 85,
          "function": "exec",
          "class": "Sabre\\DAV\\Server",
          "type": "->",
          "args": []
        },
        {
          "file": "/var/www/html/remote.php",
          "line": 172,
          "args": ["/var/www/html/apps/dav/appinfo/v1/webdav.php"],
          "function": "require_once"
        }
      ],
      "File": "/var/www/html/apps/dav/lib/Connector/Sabre/File.php",
      "Line": 297,
      "message": "Expected filesize of 3144011 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 3137536 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.",
      "exception": {},
      "CustomMessage": "Expected filesize of 3144011 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 3137536 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side."
    }
  },
  {
    "reqId": "z0tFV4bx8AG88khKzwxh",
    "level": 3,
    "time": "26/10/2023 11:50:24",
    "remoteAddr": "192.168.220.227",
    "user": "--",
    "app": "no app in context",
    "method": "GET",
    "url": "/core/preview?fileId=571658&c=d61444f459cf416d0d8fbdf2b3a70b79&x=375&y=375&forceIcon=0&a=1",
    "message": "Could not boot files_sharing: Could not resolve externalMountProvider! Class \"externalMountProvider\" does not exist",
    "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/118.0",
    "version": "27.0.2.1",
    "exception": {
      "Exception": "OC\\AppFramework\\Utility\\QueryNotFoundException",
      "Message": "Could not resolve externalMountProvider! Class \"externalMountProvider\" does not exist",
      "Code": 0,
      "Trace": [
        {
          "file": "/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php",
          "line": 142,
          "function": "resolve",
          "class": "OC\\AppFramework\\Utility\\SimpleContainer",
          "type": "->",
          "args": ["externalMountProvider"]
        },
        {
          "file": "/var/www/html/lib/private/ServerContainer.php",
          "line": 171,
          "function": "query",
          "class": "OC\\AppFramework\\Utility\\SimpleContainer",
          "type": "->",
          "args": ["externalMountProvider", true]
        },
        {
          "file": "/var/www/html/lib/private/AppFramework/DependencyInjection/DIContainer.php",
          "line": 469,
          "function": "query",
          "class": "OC\\ServerContainer",
          "type": "->",
          "args": ["externalMountProvider", true]
        },
        {
          "file": "/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php",
          "line": 65,
          "function": "query",
          "class": "OC\\AppFramework\\DependencyInjection\\DIContainer",
          "type": "->",
          "args": ["externalMountProvider"]
        },
        {
          "file": "/var/www/html/lib/private/AppFramework/Bootstrap/FunctionInjector.php",
          "line": 56,
          "function": "get",
          "class": "OC\\AppFramework\\Utility\\SimpleContainer",
          "type": "->",
          "args": ["externalMountProvider"]
        },
        {
          "function": "OC\\AppFramework\\Bootstrap\\{closure}",
          "class": "OC\\AppFramework\\Bootstrap\\FunctionInjector",
          "type": "->",
          "args": ["*** sensitive parameters replaced ***"]
        },
        {
          "file": "/var/www/html/lib/private/AppFramework/Bootstrap/FunctionInjector.php",
          "line": 45,
          "function": "array_map",
          "args": [
            ["Closure"],
            [
              ["ReflectionParameter", "mountProviderCollection"],
              ["ReflectionParameter", "mountProvider"],
              "*** sensitive parameters replaced ***"
            ]
          ]
        },
        {
          "file": "/var/www/html/lib/private/AppFramework/Bootstrap/BootContext.php",
          "line": 50,
          "function": "injectFn",
          "class": "OC\\AppFramework\\Bootstrap\\FunctionInjector",
          "type": "->",
          "args": [[["OCA\\Files_Sharing\\AppInfo\\Application"], "registerMountProviders"]]
        },
        {
          "file": "/var/www/html/apps/files_sharing/lib/AppInfo/Application.php",
          "line": 117,
          "function": "injectFn",
          "class": "OC\\AppFramework\\Bootstrap\\BootContext",
          "type": "->",
          "args": [[["OCA\\Files_Sharing\\AppInfo\\Application"], "registerMountProviders"]]
        },
        {
          "file": "/var/www/html/lib/private/AppFramework/Bootstrap/Coordinator.php",
          "line": 200,
          "function": "boot",
          "class": "OCA\\Files_Sharing\\AppInfo\\Application",
          "type": "->",
          "args": [["OC\\AppFramework\\Bootstrap\\BootContext"]]
        },
        {
          "file": "/var/www/html/lib/private/App/AppManager.php",
          "line": 437,
          "function": "bootApp",
          "class": "OC\\AppFramework\\Bootstrap\\Coordinator",
          "type": "->",
          "args": ["files_sharing"]
        },
        {
          "file": "/var/www/html/lib/private/App/AppManager.php",
          "line": 216,
          "function": "loadApp",
          "class": "OC\\App\\AppManager",
          "type": "->",
          "args": ["files_sharing"]
        },
        {
          "file": "/var/www/html/lib/private/legacy/OC_App.php",
          "line": 126,
          "function": "loadApps",
          "class": "OC\\App\\AppManager",
          "type": "->",
          "args": [["filesystem"]]
        },
        {
          "file": "/var/www/html/lib/private/Files/SetupManager.php",
          "line": 132,
          "function": "loadApps",
          "class": "OC_App",
          "type": "::",
          "args": [["filesystem"]]
        },
        {
          "file": "/var/www/html/lib/private/Files/SetupManager.php",
          "line": 351,
          "function": "setupBuiltinWrappers",
          "class": "OC\\Files\\SetupManager",
          "type": "->",
          "args": []
        },
        {
          "file": "/var/www/html/lib/private/Files/SetupManager.php",
          "line": 391,
          "function": "setupRoot",
          "class": "OC\\Files\\SetupManager",
          "type": "->",
          "args": []
        },
        {
          "file": "/var/www/html/lib/private/Files/Mount/Manager.php",
          "line": 95,
          "function": "setupForPath",
          "class": "OC\\Files\\SetupManager",
          "type": "->",
          "args": ["/appdata_ochasn1ca9qh/js/core"]
        },
        {
          "file": "/var/www/html/lib/private/Files/View.php",
          "line": 1352,
          "function": "find",
          "class": "OC\\Files\\Mount\\Manager",
          "type": "->",
          "args": ["/appdata_ochasn1ca9qh/js/core"]
        },
        {
          "file": "/var/www/html/lib/private/Files/Node/Root.php",
          "line": 202,
          "function": "getFileInfo",
          "class": "OC\\Files\\View",
          "type": "->",
          "args": ["/appdata_ochasn1ca9qh/js/core", false]
        },
        {
          "function": "get",
          "class": "OC\\Files\\Node\\Root",
          "type": "->",
          "args": ["/appdata_ochasn1ca9qh/js/core"]
        },
        {
          "file": "/var/www/html/lib/private/Files/Node/LazyFolder.php",
          "line": 74,
          "function": "call_user_func_array",
          "args": [[["OC\\Files\\Node\\Root"], "get"], ["appdata_ochasn1ca9qh/js/core"]]
        },
        {
          "file": "/var/www/html/lib/private/Files/Node/LazyFolder.php",
          "line": 151,
          "function": "__call",
          "class": "OC\\Files\\Node\\LazyFolder",
          "type": "->",
          "args": ["get", ["appdata_ochasn1ca9qh/js/core"]]
        },
        {
          "file": "/var/www/html/lib/private/Files/AppData/AppData.php",
          "line": 132,
          "function": "get",
          "class": "OC\\Files\\Node\\LazyFolder",
          "type": "->",
          "args": ["appdata_ochasn1ca9qh/js/core"]
        },
        {
          "file": "/var/www/html/lib/private/Template/JSCombiner.php",
          "line": 87,
          "function": "getFolder",
          "class": "OC\\Files\\AppData\\AppData",
          "type": "->",
          "args": ["core"]
        },
        {
          "file": "/var/www/html/lib/private/Template/JSResourceLocator.php",
          "line": 145,
          "function": "process",
          "class": "OC\\Template\\JSCombiner",
          "type": "->",
          "args": ["/var/www/html", "core/js/merged-template-prepend.json", "core"]
        },
        {
          "file": "/var/www/html/lib/private/Template/JSResourceLocator.php",
          "line": 75,
          "function": "cacheAndAppendCombineJsonIfExist",
          "class": "OC\\Template\\JSResourceLocator",
          "type": "->",
          "args": ["/var/www/html", "core/js/merged-template-prepend.json"]
        },
        {
          "file": "/var/www/html/lib/private/Template/ResourceLocator.php",
          "line": 73,
          "function": "doFind",
          "class": "OC\\Template\\JSResourceLocator",
          "type": "->",
          "args": ["core/js/merged-template-prepend"]
        },
        {
          "file": "/var/www/html/lib/private/TemplateLayout.php",
          "line": 377,
          "function": "find",
          "class": "OC\\Template\\ResourceLocator",
          "type": "->",
          "args": [
            [
              "core/js/common",
              "core/js/main",
              "core/l10n/pl",
              "core/js/files_fileinfo",
              "core/js/files_client",
              "And 1 more entries, set log level to debug to see all entries"
            ]
          ]
        },
        {
          "file": "/var/www/html/lib/private/TemplateLayout.php",
          "line": 222,
          "function": "findJavascriptFiles",
          "class": "OC\\TemplateLayout",
          "type": "::",
          "args": [
            [
              "core/js/common",
              "core/js/main",
              "core/l10n/pl",
              "core/js/files_fileinfo",
              "core/js/files_client",
              "And 1 more entries, set log level to debug to see all entries"
            ]
          ]
        },
        {
          "file": "/var/www/html/lib/private/legacy/OC_Template.php",
          "line": 182,
          "function": "__construct",
          "class": "OC\\TemplateLayout",
          "type": "->",
          "args": ["error", ""]
        },
        {
          "file": "/var/www/html/lib/private/Template/Base.php",
          "line": 132,
          "function": "fetchPage",
          "class": "OC_Template",
          "type": "->",
          "args": []
        },
        {
          "file": "/var/www/html/lib/private/legacy/OC_Template.php",
          "line": 331,
          "function": "printPage",
          "class": "OC\\Template\\Base",
          "type": "->",
          "args": []
        },
        {
          "file": "/var/www/html/index.php",
          "line": 74,
          "function": "printExceptionErrorPage",
          "class": "OC_Template",
          "type": "::",
          "args": [["Doctrine\\DBAL\\Exception"], 500]
        }
      ],
      "File": "/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php",
      "Line": 131,
      "message": "Could not boot files_sharing: Could not resolve externalMountProvider! Class \"externalMountProvider\" does not exist",
      "exception": {},
      "CustomMessage": "Could not boot files_sharing: Could not resolve externalMountProvider! Class \"externalMountProvider\" does not exist"
    }
  },
  {
    "reqId": "eqsWZSwOyyQowOd2TXl8",
    "level": 3,
    "time": "26/10/2023 12:22:32",
    "remoteAddr": "192.168.220.227",
    "user": "REDACTED",
    "app": "index",
    "method": "GET",
    "url": "/apps/files/api/v1/stats?dir=REDACTED",
    "message": "",
    "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/118.0",
    "version": "27.0.2.1",
    "exception": {
      "Exception": "OCP\\Files\\NotFoundException",
      "Message": "",
      "Code": 0,
      "Trace": [
        {
          "file": "/var/www/html/apps/files/lib/Controller/ApiController.php",
          "line": 267,
          "function": "getStorageInfo",
          "class": "OC_Helper",
          "type": "::",
          "args": ["/Pictures/REDACTED"]
        },
        {
          "file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
          "line": 230,
          "function": "getStorageStats",
          "class": "OCA\\Files\\Controller\\ApiController",
          "type": "->",
          "args": ["/Pictures/REDACTED"]
        },
        {
          "file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
          "line": 137,
          "function": "executeController",
          "class": "OC\\AppFramework\\Http\\Dispatcher",
          "type": "->",
          "args": [["OCA\\Files\\Controller\\ApiController"], "getStorageStats"]
        },
        {
          "file": "/var/www/html/lib/private/AppFramework/App.php",
          "line": 183,
          "function": "dispatch",
          "class": "OC\\AppFramework\\Http\\Dispatcher",
          "type": "->",
          "args": [["OCA\\Files\\Controller\\ApiController"], "getStorageStats"]
        },
        {
          "file": "/var/www/html/lib/private/Route/Router.php",
          "line": 315,
          "function": "main",
          "class": "OC\\AppFramework\\App",
          "type": "::",
          "args": [
            "APIController",
            "getStorageStats",
            ["OC\\AppFramework\\DependencyInjection\\DIContainer"],
            ["files.API.getStorageStats"]
          ]
        },
        {
          "file": "/var/www/html/lib/base.php",
          "line": 1071,
          "function": "match",
          "class": "OC\\Route\\Router",
          "type": "->",
          "args": ["/apps/files/api/v1/stats"]
        },
        {
          "file": "/var/www/html/index.php",
          "line": 36,
          "function": "handleRequest",
          "class": "OC",
          "type": "::",
          "args": []
        }
      ],
      "File": "/var/www/html/lib/private/legacy/OC_Helper.php",
      "Line": 490,
      "CustomMessage": "--"
    }
  }
]

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'apps_paths' =>
  array (
    0 =>
    array (
      'path' => '/var/www/html/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 =>
    array (
      'path' => '/var/www/html/custom_apps',
      'url' => '/custom_apps',
      'writable' => true,
    ),
  ),
  'passwordsalt' => REDACTED,
  'secret' => REDACTED,
  'datadirectory' => '/var/www/html/data',
  'dbtype' => 'pgsql',
  'version' => '27.1.3.2',
  'overwrite.cli.url' => REDACTED,
  'dbname' => 'nextcloud',
  'dbhost' => 'nextcloud-cnpg-main-rw',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'nextcloud',
  'dbpassword' => REDACTED,
  'installed' => true,
  'instanceid' => REDACTED,
  'redis' =>
  array (
    'host' => 'nextcloud-redis',
    'password' => REDACTED,
    'port' => '6379',
  ),
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'upgrade.disable-web' => true,
  'default_phone_region' => 'PL',
  'share_folder' => 'Shared',
  'log_type' => 'file',
  'log_type_audit' => 'file',
  'loglevel' => '2',
  'logfile' => '/var/www/html/data/logs/nextcloud.log',
  'logfile_audit' => '/var/www/html/data/logs/audit.log',
  'logdateformat' => 'd/m/Y H:i:s',
  'logtimezone' => 'Europe/Warsaw',
  'overwritehost' => REDACTED,
  'overwriteprotocol' => 'https',
  'activity_expire_days' => '30',
  'trashbin_retention_obligation' => 'auto',
  'versions_retention_obligation' => 'auto',
  'preview_imaginary_url' => 'http://nextcloud-imaginary:9090',
  'enable_previews' => 'true',
  'jpeg_quality' => '60',
  'preview_max_x' => '2048',
  'preview_max_y' => '2048',
  'preview_max_memory' => '2048',
  'preview_max_filesize_image' => '50',
  'onlyoffice' => '',
  'maintenance' => false,
  'trusted_domains' =>
  array (
    0 => '127.0.0.1',
    1 => 'localhost',
    2 => 'nextcloud',
    3 => 'nextcloud-*',
    4 => 'kube.internal.healthcheck',
    5 => 'https',
    6 => '192.168.X.X',
  ),
  'trusted_proxies' =>
  array (
    0 => '172.16.0.0/16',
    1 => '172.17.0.0/16',
  ),
  'enabledPreviewProviders' =>
  array (
    0 => 'OC\\Preview\\Imaginary',
    1 => 'OC\\Preview\\BMP',
    2 => 'OC\\Preview\\GIF',
    3 => 'OC\\Preview\\JPEG',
    4 => 'OC\\Preview\\MarkDown',
    5 => 'OC\\Preview\\MP3',
    6 => 'OC\\Preview\\OpenDocument',
    7 => 'OC\\Preview\\PNG',
    8 => 'OC\\Preview\\TXT',
  ),
);

Hello there,

welcome to the community of Nextcloud.

NC23 is EOL since a while. See Maintenance and Release Schedule · nextcloud/server Wiki · GitHub

Please update to a supported version and report.

Hey, sorry I have typed the wrong version. I have corrected the post