elements-at / ProcessManager

Manage processes in Pimcore
Other
45 stars 31 forks source link

Maintenance - Cannot access offset of type string on string #151

Closed moiashvin closed 2 years ago

moiashvin commented 2 years ago

Hi,

I face an issue when running the process-manager:maintenance command and getting "Cannot access offset of type string on string". Can this be resolved so that the exception is handled? E.g check to avoid offset issue

[2022-08-02T23:40:21.798441+02:00] app.NOTICE: Clearing monitoring logs [2022-08-02T23:41:28.803414+02:00] app.DEBUG: Deleting 12926 monitoring items. [2022-08-02T23:41:28.803521+02:00] app.DEBUG: Deleting item. Name: "Online Product" ID: 502501 monitoring items. [2022-08-02T23:41:29.227366+02:00] app.NOTICE: ERROR: Cannot access offset of type string on string [2022-08-02T23:41:29.227915+02:00] app.ERROR: TypeError: Cannot access offset of type string on string in /var/www/html/vendor/elements/process-manager-bundle/src/Executor/Action/Download.php:144 Stack trace: #0 /var/www/html/vendor/elements/process-manager-bundle/src/Executor/Action/Download.php(215): Elements\Bundle\ProcessManagerBundle\Executor\Action\Download->buildFilePath('/var/workspace/...') #1 /var/www/html/vendor/elements/process-manager-bundle/src/Model/MonitoringItem/Dao.php(100): Elements\Bundle\ProcessManagerBundle\Executor\Action\Download->preMonitoringItemDeletion(Object(Elements\Bundle\ProcessManagerBundle\Model\MonitoringItem), Array) #2 [internal function]: Elements\Bundle\ProcessManagerBundle\Model\MonitoringItem\Dao->delete() #3 /var/www/html/vendor/pimcore/pimcore/lib/Model/AbstractModel.php(246): call_user_func_array(Array, Array) #4 /var/www/html/vendor/elements/process-manager-bundle/src/Maintenance.php(211): Pimcore\Model\AbstractModel->__call('delete', Array) #5 /var/www/html/vendor/elements/process-manager-bundle/src/Maintenance.php(44): Elements\Bundle\ProcessManagerBundle\Maintenance->clearMonitoringLogs() #6 /var/www/html/vendor/elements/process-manager-bundle/src/Command/MaintenanceCommand.php(65): Elements\Bundle\ProcessManagerBundle\Maintenance->execute() #7 /var/www/html/vendor/symfony/console/Command/Command.php(298): Elements\Bundle\ProcessManagerBundle\Command\MaintenanceCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #8 /var/www/html/vendor/symfony/console/Application.php(1042): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #9 /var/www/html/vendor/symfony/framework-bundle/Console/Application.php(96): Symfony\Component\Console\Application->doRunCommand(Object(Elements\Bundle\ProcessManagerBundle\Command\MaintenanceCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #10 /var/www/html/vendor/symfony/console/Application.php(299): Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand(Object(Elements\Bundle\ProcessManagerBundle\Command\MaintenanceCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #11 /var/www/html/vendor/symfony/framework-bundle/Console/Application.php(82): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #12 /var/www/html/vendor/symfony/console/Application.php(171): Symfony\Bundle\FrameworkBundle\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #13 /var/www/html/bin/console(46): Symfony\Component\Console\Application->run() #14 {main} 23:41:29 CRITICAL [console] Error thrown while running command "process-manager:maintenance". Message: "Cannot access offset of type string on string" ["exception" => TypeError { …},"command" => "process-manager:maintenance","message" => "Cannot access offset of type string on string"]

In Download.php line 144:

Cannot access offset of type string on string

Ashvin

ctippler commented 2 years ago

Hi, this sould be fixed with the latest versions. Thx, Christian