"Internal Server Error" when trying to access files (only when "files_trashbin" is enabled)

Hi,

Nextcloud version: 22.2.0
Operating system and version : Ubuntu 20.04.2 LTS
Apache or nginx version : 2.4.41
PHP version : 7.4.3

We currently encounter a strange problem :

When “files_trashbin: 1.11.0” app is activated, we get an “Internal Server Error” when trying to access (even listing) files on the Nextcloud server (through the web interface). When this app is disabled we could access to all the files without any problem.

When trying to access files and getting the “Internal Server Error” we can see this kind of inforrmation into the “nextcloud.log” file :

{
  "reqId": "Dqq1veyGko7whgCnjVlN",
  "level": 3,
  "time": "2021-10-28T16:40:16+00:00",
  "remoteAddr": "xxx.xxx.xxx.xxx",
  "user": "admin",
  "app": "index",
  "method": "GET",
  "url": "/index.php/apps/files/",
  "message": "Class 'OCP\\User' not found",
  "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:93.0) Gecko/20100101 Firefox/93.0",
  "version": "22.2.0.2",
  "exception": {
    "Exception": "Exception",
    "Message": "Class 'OCP\\User' not found",
    "Code": 0,
    "Trace": [
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/App.php",
        "line": 156,
        "function": "dispatch",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/Route/Router.php",
        "line": 301,
        "function": "main",
        "class": "OC\\AppFramework\\App",
        "type": "::"
      },
      {
        "file": "/var/www/nextcloud/lib/base.php",
        "line": 1000,
        "function": "match",
        "class": "OC\\Route\\Router",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/index.php",
        "line": 36,
        "function": "handleRequest",
        "class": "OC",
        "type": "::"
      }
    ],
    "File": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
    "Line": 158,
    "Previous": {
      "Exception": "Error",
      "Message": "Class 'OCP\\User' not found",
      "Code": 0,
      "Trace": [
        {
          "file": "/var/www/nextcloud/apps/files/lib/Controller/ViewController.php",
          "line": 136,
          "function": "include"
        },
        {
          "file": "/var/www/nextcloud/apps/files/lib/Controller/ViewController.php",
          "line": 276,
          "function": "renderScript",
          "class": "OCA\\Files\\Controller\\ViewController",
          "type": "->"
        },
        {
          "file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
          "line": 217,
          "function": "index",
          "class": "OCA\\Files\\Controller\\ViewController",
          "type": "->"
        },
        {
          "file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
          "line": 126,
          "function": "executeController",
          "class": "OC\\AppFramework\\Http\\Dispatcher",
          "type": "->"
        },
        {
          "file": "/var/www/nextcloud/lib/private/AppFramework/App.php",
          "line": 156,
          "function": "dispatch",
          "class": "OC\\AppFramework\\Http\\Dispatcher",
          "type": "->"
        },
        {
          "file": "/var/www/nextcloud/lib/private/Route/Router.php",
          "line": 301,
          "function": "main",
          "class": "OC\\AppFramework\\App",
          "type": "::"
        },
        {
          "file": "/var/www/nextcloud/lib/base.php",
          "line": 1000,
          "function": "match",
          "class": "OC\\Route\\Router",
          "type": "->"
        },
        {
          "file": "/var/www/nextcloud/index.php",
          "line": 36,
          "function": "handleRequest",
          "class": "OC",
          "type": "::"
        }
      ],
      "File": "/var/www/nextcloud/apps/files_trashbin/list.php",
      "Line": 27
    },
    "CustomMessage": "--"
  }
}

I am intrigued by “Class ‘OCP\User’ not found” …

Any idea will be welcomed :slight_smile: