icewind1991 / files_inotify

Adds support detecting changes in local external storages with occ files_external:notify
29 stars 3 forks source link

Could not boot files_inotify: Could not resolve dispatcher! Class "dispatcher" does not exist #34

Open bovender opened 9 months ago

bovender commented 9 months ago

On my Nextcloud box (28.0.1.1), the log has started to have lots and lots of entries complaining that file_inotify cannot be loaded:

[no app in context] Fehler: Could not boot files_inotify: Could not resolve dispatcher! Class "dispatcher" does not exist

Raw:

{
  "reqId": "PCuC89hd4EkBS6CZLIaz",
  "level": 3,
  "time": "2024-01-20T15:21:43+00:00",
  "remoteAddr": "###.###.###.###",
  "user": "#####",
  "app": "no app in context",
  "method": "GET",
  "url": "/apps/logreader/api/poll?lastReqId=Uk206KaOggE8uWvAS2wf",
  "message": "Could not boot files_inotify: Could not resolve dispatcher! Class \"dispatcher\" does not exist",
  "userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
  "version": "28.0.1.1",
  "exception": {
    "Exception": "OC\\AppFramework\\Utility\\QueryNotFoundException",
    "Message": "Could not resolve dispatcher! Class \"dispatcher\" does not exist",
    "Code": 0,
    "Trace": [
      {
        "file": "/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php",
        "line": 146,
        "function": "resolve",
        "class": "OC\\AppFramework\\Utility\\SimpleContainer",
        "type": "->",
        "args": [
          "dispatcher"
        ]
      },
      {
        "file": "/var/www/html/lib/private/ServerContainer.php",
        "line": 173,
        "function": "query",
        "class": "OC\\AppFramework\\Utility\\SimpleContainer",
        "type": "->",
        "args": [
          "dispatcher",
          true
        ]
      },
      {
        "file": "/var/www/html/lib/private/AppFramework/DependencyInjection/DIContainer.php",
        "line": 443,
        "function": "query",
        "class": "OC\\ServerContainer",
        "type": "->",
        "args": [
          "dispatcher",
          true
        ]
      },
      {
        "file": "/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php",
        "line": 64,
        "function": "query",
        "class": "OC\\AppFramework\\DependencyInjection\\DIContainer",
        "type": "->",
        "args": [
          "dispatcher"
        ]
      },
      {
        "file": "/var/www/html/lib/private/AppFramework/Bootstrap/FunctionInjector.php",
        "line": 56,
        "function": "get",
        "class": "OC\\AppFramework\\Utility\\SimpleContainer",
        "type": "->",
        "args": [
          "dispatcher"
        ]
      },
      {
        "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",
              "appContainer"
            ],
            "*** 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_INotify\\AppInfo\\Application"
            ],
            "registerBackendDependents"
          ]
        ]
      },
      {
        "file": "/var/www/html/custom_apps/files_inotify/lib/AppInfo/Application.php",
        "line": 42,
        "function": "injectFn",
        "class": "OC\\AppFramework\\Bootstrap\\BootContext",
        "type": "->",
        "args": [
          [
            [
              "OCA\\Files_INotify\\AppInfo\\Application"
            ],
            "registerBackendDependents"
          ]
        ]
      },
      {
        "file": "/var/www/html/lib/private/AppFramework/Bootstrap/Coordinator.php",
        "line": 200,
        "function": "boot",
        "class": "OCA\\Files_INotify\\AppInfo\\Application",
        "type": "->",
        "args": [
          [
            "OC\\AppFramework\\Bootstrap\\BootContext"
          ]
        ]
      },
      {
        "file": "/var/www/html/lib/private/App/AppManager.php",
        "line": 434,
        "function": "bootApp",
        "class": "OC\\AppFramework\\Bootstrap\\Coordinator",
        "type": "->",
        "args": [
          "files_inotify"
        ]
      },
      {
        "file": "/var/www/html/lib/private/App/AppManager.php",
        "line": 213,
        "function": "loadApp",
        "class": "OC\\App\\AppManager",
        "type": "->",
        "args": [
          "files_inotify"
        ]
      },
      {
        "file": "/var/www/html/lib/private/legacy/OC_App.php",
        "line": 125,
        "function": "loadApps",
        "class": "OC\\App\\AppManager",
        "type": "->",
        "args": [
          []
        ]
      },
      {
        "file": "/var/www/html/lib/base.php",
        "line": 1049,
        "function": "loadApps",
        "class": "OC_App",
        "type": "::",
        "args": []
      },
      {
        "file": "/var/www/html/index.php",
        "line": 39,
        "function": "handleRequest",
        "class": "OC",
        "type": "::",
        "args": []
      }
    ],
    "File": "/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php",
    "Line": 135,
    "message": "Could not boot files_inotify: Could not resolve dispatcher! Class \"dispatcher\" does not exist",
    "exception": [],
    "CustomMessage": "Could not boot files_inotify: Could not resolve dispatcher! Class \"dispatcher\" does not exist"
  },
  "id": "65abe507acd77"
}
theKBro commented 9 months ago

I got the exact same issue!

bedouin67 commented 9 months ago

Same here, as soon as enabling files_inotify app on latest NC and php 8.1.27. Used to work until a recent update.

Error    no app in context  OC\AppFramework\Utility\QueryNotFoundException: Could not resolve dispatcher! Class "dispatcher" does not exist at                             2024-01-28T19:28:00+00:00
                              .../private/AppFramework/Utility/SimpleContainer.php line 135
                               0. lib/private/AppFramework/Utility/SimpleContainer.php line 146
                                  OC\AppFramework\Utility\SimpleContainer->resolve("dispatcher")
                               1. lib/private/ServerContainer.php line 173
                                  OC\AppFramework\Utility\SimpleContainer->query("dispatcher", true)
                               2. lib/private/AppFramework/DependencyInjection/DIContainer.php line 443
                                  OC\ServerContainer->query("dispatcher", true)
                               3. lib/private/AppFramework/Utility/SimpleContainer.php line 64
                                  OC\AppFramework\DependencyInjection\DIContainer->query("dispatcher")
                               4. lib/private/AppFramework/Bootstrap/FunctionInjector.php line 56
                                  OC\AppFramework\Utility\SimpleContainer->get("dispatcher")
                               5. <<closure>>
                                  OC\AppFramework\Bootstrap\FunctionInjector->OC\AppFramework\Bootstrap\{closure}("*** sensitive parameters replaced ***")
                               6. lib/private/AppFramework/Bootstrap/FunctionInjector.php line 66
                                  array_map(["Closure"], [["ReflectionParameter","appContainer"],"*** sensitive parameters replaced ***"])
                               7. lib/private/AppFramework/Bootstrap/BootContext.php line 50
                                  OC\AppFramework\Bootstrap\FunctionInjector->injectFn([["OCA\\Files_INotify\\AppInfo\\Application"],"registerBackendDependents"])
                               8. /var/lib/nextcloud/apps/files_inotify/lib/AppInfo/Application.php line 42
                                  OC\AppFramework\Bootstrap\BootContext->injectFn([["OCA\\Files_INotify\\AppInfo\\Application"],"registerBackendDependents"])
                               9. lib/private/AppFramework/Bootstrap/Coordinator.php line 200
                                  OCA\Files_INotify\AppInfo\Application->boot(["OC\\AppFramework\\Bootstrap\\BootContext"])
                              10. lib/private/App/AppManager.php line 434
                                  OC\AppFramework\Bootstrap\Coordinator->bootApp("files_inotify")
                              11. lib/private/App/AppManager.php line 213
                                  OC\App\AppManager->loadApp("files_inotify")
                              12. lib/private/legacy/OC_App.php line 125
                                  OC\App\AppManager->loadApps(["filesystem","logging"])
                              13. remote.php line 157
                                  OC_App::loadApps(["filesystem","logging"])
git-kick commented 8 months ago

+1 Nextcloud Hub 7 (28.0.1)

nextcloud.log has many many entries like Could not boot files_inotify: Could not resolve dispatcher! Class "dispatcher" does not exist

files_inotify.log says: iNotify starts in 120 seconds Mount of type "Local" does not support active update notifications Sorry but something went wrong. Please report this issue to https://github.com/nextcloud/vm/issues and include the output of the error message. Thank you! sudo -u www-data php /var/www/nextcloud/occ files_external:notify -v 13 failed Posting notification to users that are admins, this might take a while... Posting 'Sorry but something went wrong. Please report this issue to https://github.com/nextcloud/vm/issues and include the output of the error message. Thank you!' to: ...

As I am using the Nextcloud VM, I opened an issue there - but it is considered out-of-scope and was closed.

bedouin67 commented 8 months ago

This should be fixed the same as issue #33