ScheduledTask Plugin schmeißt "No handler for message "...""-Fehler

Versuche nun schon seit einer Weile das ScheduledTask Plugin ans Laufen zu bringen, bekomme aber einen  „No handler for message „Swag\ScheduledTaskPlugin\ScheduledTask\MyTask“.“ Fehler, sobald das Plugin aktiviert und der ScheduledTask ausgeführt wird.

Folgende Schritte wurden ausgeführt:

  1. Plugin gecloned

    git clone https://github.com/shopware/swag-docs-scheduled-task-plugin.git custom/plugins/swag-docs-scheduled-task-plugin/

  2. Plugin-Liste refreshed

    bin/console plugin:refresh

  3. Plugin im Backend installiert

  4. Den Admin-Worker deaktiviert

    /config/packages/shopware.yaml
    shopware:
    admin_worker:
    enable_admin_worker: false

  5. Den Cache geleert

    bin/console cache:clear

  6. Den Task-Runner gestartet

    bin/console scheduled-task:run -vvv

  7. Den Message-Consumer gestartet

    bin/console messenger:consume -vvv

  8. Das Plugin im Backend aktiviert

Anschließend erscheint folgende Fehlermeldung im Message-Consumer:

15:45:59 INFO [messenger] Received message Swag\ScheduledTaskPlugin\ScheduledTask\MyTask
[
  "message" => Swag\ScheduledTaskPlugin\ScheduledTask\MyTask^ {
    #taskId: "c66f186b33ac4fa99c9c5a179c51405c"
  },
  "class" => "Swag\ScheduledTaskPlugin\ScheduledTask\MyTask"
]

15:45:59 ERROR [messenger] Error thrown while handling message Swag\ScheduledTaskPlugin\ScheduledTask\MyTask. Sending for retry #1 using 1000 ms delay. Error: "No handler for message "Swag\ScheduledTaskPlugin\ScheduledTask\MyTask"."
[
  "message" => Swag\ScheduledTaskPlugin\ScheduledTask\MyTask^ {
    #taskId: "c66f186b33ac4fa99c9c5a179c51405c"
  },
  "class" => "Swag\ScheduledTaskPlugin\ScheduledTask\MyTask",
  "retryCount" => 1,
  "delay" => 1000,
  "error" => "No handler for message "Swag\ScheduledTaskPlugin\ScheduledTask\MyTask".",
  "exception" => Symfony\Component\Messenger\Exception\NoHandlerForMessageException^ {
    #message: "No handler for message "Swag\ScheduledTaskPlugin\ScheduledTask\MyTask"."
    #code: 0
    #file: "./vendor/symfony/messenger/Middleware/HandleMessageMiddleware.php"
    #line: 73
    trace: {
      ./vendor/symfony/messenger/Middleware/HandleMessageMiddleware.php:73 { …}
      ./vendor/symfony/messenger/Middleware/SendMessageMiddleware.php:79 { …}
      ./vendor/shopware/core/Framework/MessageQueue/Middleware/RetryMiddleware.php:40 { …}
      ./vendor/symfony/messenger/Middleware/FailedMessageProcessingMiddleware.php:34 { …}
      ./vendor/symfony/messenger/Middleware/DispatchAfterCurrentBusMiddleware.php:67 { …}
      ./vendor/symfony/messenger/Middleware/RejectRedeliveredMessageMiddleware.php:42 { …}
      ./vendor/symfony/messenger/Middleware/AddBusNameStampMiddleware.php:37 { …}
      ./vendor/symfony/messenger/Middleware/TraceableMiddleware.php:43 { …}
      ./vendor/symfony/messenger/MessageBus.php:80 { …}
      ./vendor/shopware/core/Framework/MessageQueue/MonitoringBusDecorator.php:46 { …}
      ./vendor/symfony/messenger/TraceableMessageBus.php:41 { …}
      ./vendor/symfony/messenger/RoutableMessageBus.php:54 { …}
      ./vendor/symfony/messenger/Worker.php:117 { …}
      ./vendor/symfony/messenger/Worker.php:81 { …}
      ./vendor/symfony/messenger/Command/ConsumeMessagesCommand.php:202 { …}
      ./vendor/symfony/console/Command/Command.php:255 { …}
      ./vendor/symfony/console/Application.php:1027 { …}
      ./vendor/symfony/framework-bundle/Console/Application.php:97 { …}
      ./vendor/symfony/console/Application.php:273 { …}
      ./vendor/symfony/framework-bundle/Console/Application.php:83 { …}
      ./vendor/symfony/console/Application.php:149 { …}
      ./bin/console:68 {
        › $application = new Application($kernel->getKernel());
        › $application->run($input);
        › 
      }
    }
  }
]

Vermutlich sitze ich schon zu lange dran und übersehe irgendwas essentielles. Aber was?

PS: die Tabelle „dead-message“ in der Datenbank ist leer.

PPS: es handelt sich um eine dockware Umgebung mit Shopware in der Version 6.3.3.0

Any luck with this?

How did you solve?

It’s been a long time and I’m not sure if I remember correctly to be honest.

I think I had to manually delete the cache directories (located in var/cache). But using the ScheduledTask functionality was a pain actually and I finally decided to use another approach.