-
Notifications
You must be signed in to change notification settings - Fork 688
Description
Horizon Version
1.19.0
Laravel Version
10.16.1
PHP Version
8.1.11
Redis Driver
PhpRedis
Redis Version
6.2.12
Database Driver & Version
No response
Description
After upgrading Horizon package to the latest version (1.19.0) I started getting errors on /horizon/dashboard route. I checked the documentation to upgrade and used php artisan vendor:publish --tag=laravel-assets --ansi --force
which didn't help me. I tried to create HORIZON_ENV from this discussion which also didn't help me. So I started debugging the error and found that in Laravel\Horizon\Http\Controllers\MasterSupervisorController::36 implode method gets the second parameter as a string which is incorrect.
It works when :
'queue' => implode(',', $value ?? []),
instead of
'queue' => implode(',', $value['queue'] ?? []),
So my question is: is this a bug or have I missed something important that can be probably more realistic? Even if it is a bug then something should be done on it.
P.S. Sorry in advance if didn't (or forget to) put some information which can help to understand the bug.
Steps To Reproduce
Set the APP_ENV=local
- Upgrade to the latest version (current bug on v5.19.0)
- Open the main page of Horizon app by /horizon/dashboard
- Then it calls the /masters endpoint on Horizon app.
The hall stack trace of the error:
{
"message": "",
"errorCode": "dsa-0",
"errors": [],
"origMessage": "implode(): Argument #2 ($array) must be of type ?array, string given",
"exception": "TypeError",
"file": "/app/vendor/laravel/horizon/src/Http/Controllers/MasterSupervisorController.php",
"line": 36,
"trace": [
{
"file": "/app/vendor/laravel/horizon/src/Http/Controllers/MasterSupervisorController.php",
"line": 36,
"function": "implode"
},
{
"function": "Laravel\\Horizon\\Http\\Controllers\\{closure}",
"class": "Laravel\\Horizon\\Http\\Controllers\\MasterSupervisorController",
"type": "->"
},
{
"file": "/app/vendor/laravel/framework/src/Illuminate/Collections/Arr.php",
"line": 558,
"function": "array_map"
},
{
"file": "/app/vendor/laravel/framework/src/Illuminate/Collections/Collection.php",
"line": 777,
"function": "map",
"class": "Illuminate\\Support\\Arr",
"type": "::"
},
{
"file": "/app/vendor/laravel/horizon/src/Http/Controllers/MasterSupervisorController.php",
"line": 40,
"function": "map",
"class": "Illuminate\\Support\\Collection",
"type": "->"
},
{
"file": "/app/vendor/laravel/framework/src/Illuminate/Collections/Traits/EnumeratesValues.php",
"line": 236,
"function": "Laravel\\Horizon\\Http\\Controllers\\{closure}",
"class": "Laravel\\Horizon\\Http\\Controllers\\MasterSupervisorController",
"type": "->"
},
{
"file": "/app/vendor/laravel/horizon/src/Http/Controllers/MasterSupervisorController.php",
"line": 44,
"function": "each",
"class": "Illuminate\\Support\\Collection",
"type": "->"
},
{
"file": "/app/vendor/laravel/framework/src/Illuminate/Routing/Controller.php",
"line": 54,
"function": "index",
"class": "Laravel\\Horizon\\Http\\Controllers\\MasterSupervisorController",
"type": "->"
},
{
"file": "/app/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php",
"line": 43,
"function": "callAction",
"class": "Illuminate\\Routing\\Controller",
"type": "->"
},
{
"file": "/app/vendor/laravel/framework/src/Illuminate/Routing/Route.php",
"line": 260,
"function": "dispatch",
"class": "Illuminate\\Routing\\ControllerDispatcher",
"type": "->"
},
{
"file": "/app/vendor/laravel/framework/src/Illuminate/Routing/Route.php",
"line": 205,
"function": "runController",
"class": "Illuminate\\Routing\\Route",
"type": "->"
},
{
"file": "/app/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
"line": 799,
"function": "run",
"class": "Illuminate\\Routing\\Route",
"type": "->"
},
{
"file": "/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 141,
"function": "Illuminate\\Routing\\{closure}",
"class": "Illuminate\\Routing\\Router",
"type": "->"
},
{
"file": "/app/vendor/laravel/horizon/src/Http/Middleware/Authenticate.php",
"line": 18,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 180,
"function": "handle",
"class": "Laravel\\Horizon\\Http\\Middleware\\Authenticate",
"type": "->"
},
{
"file": "/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 116,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/app/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
"line": 800,
"function": "then",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/app/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
"line": 777,
"function": "runRouteWithinStack",
"class": "Illuminate\\Routing\\Router",
"type": "->"
},
{
"file": "/app/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
"line": 741,
"function": "runRoute",
"class": "Illuminate\\Routing\\Router",
"type": "->"
},
{
"file": "/app/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
"line": 730,
"function": "dispatchToRoute",
"class": "Illuminate\\Routing\\Router",
"type": "->"
},
{
"file": "/app/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
"line": 200,
"function": "dispatch",
"class": "Illuminate\\Routing\\Router",
"type": "->"
},
{
"file": "/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 141,
"function": "Illuminate\\Foundation\\Http\\{closure}",
"class": "Illuminate\\Foundation\\Http\\Kernel",
"type": "->"
},
{
"file": "/app/vendor/helium10/laravel-components/src/CommonMiddlewares/LogContextMiddleware.php",
"line": 26,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 180,
"function": "handle",
"class": "Helium10\\LaravelComponents\\CommonMiddlewares\\LogContextMiddleware",
"type": "->"
},
{
"file": "/app/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php",
"line": 21,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/app/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php",
"line": 31,
"function": "handle",
"class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
"type": "->"
},
{
"file": "/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 180,
"function": "handle",
"class": "Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull",
"type": "->"
},
{
"file": "/app/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php",
"line": 21,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/app/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php",
"line": 40,
"function": "handle",
"class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
"type": "->"
},
{
"file": "/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 180,
"function": "handle",
"class": "Illuminate\\Foundation\\Http\\Middleware\\TrimStrings",
"type": "->"
},
{
"file": "/app/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php",
"line": 27,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 180,
"function": "handle",
"class": "Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize",
"type": "->"
},
{
"file": "/app/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php",
"line": 86,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 180,
"function": "handle",
"class": "Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance",
"type": "->"
},
{
"file": "/app/vendor/laravel/framework/src/Illuminate/Http/Middleware/HandleCors.php",
"line": 49,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 180,
"function": "handle",
"class": "Illuminate\\Http\\Middleware\\HandleCors",
"type": "->"
},
{
"file": "/app/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php",
"line": 39,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 180,
"function": "handle",
"class": "Illuminate\\Http\\Middleware\\TrustProxies",
"type": "->"
},
{
"file": "/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 116,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/app/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
"line": 175,
"function": "then",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "/app/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
"line": 144,
"function": "sendRequestThroughRouter",
"class": "Illuminate\\Foundation\\Http\\Kernel",
"type": "->"
},
{
"file": "/app/public/index.php",
"line": 52,
"function": "handle",
"class": "Illuminate\\Foundation\\Http\\Kernel",
"type": "->"
}
]
}