laravel-ignition
laravel-ignition copied to clipboard
Error sometimes in Logs : Argument #2 ($reportBindings) must be of type bool, null given.
I'm getting this error sometimes in my LOGS :
[2022-05-21 04:00:04] local.ERROR: Spatie\LaravelIgnition\Recorders\QueryRecorder\QueryRecorder::__construct(): Argument #2 ($reportBindings) must be of type bool, null given, called in /var/data/inpicture/www/vendor/spatie/laravel-ignition/src/IgnitionServiceProvider.php on line 170 {"exception":"[object] (TypeError(code: 0): Spatie\\LaravelIgnition\\Recorders\\QueryRecorder\\QueryRecorder::__construct(): Argument #2 ($reportBindings) must be of type bool, null given, called in /var/data/inpicture/www/vendor/spatie/laravel-ignition/src/IgnitionServiceProvider.php on line 170 at /var/data/inpicture/www/vendor/spatie/laravel-ignition/src/Recorders/QueryRecorder/QueryRecorder.php:19) [stacktrace] #0 /var/data/inpicture/www/vendor/spatie/laravel-ignition/src/IgnitionServiceProvider.php(170): Spatie\\LaravelIgnition\\Recorders\\QueryRecorder\\QueryRecorder->__construct() #1 /var/data/inpicture/www/vendor/laravel/framework/src/Illuminate/Container/Container.php(871): Spatie\\LaravelIgnition\\IgnitionServiceProvider->Spatie\\LaravelIgnition\\{closure}() #2 /var/data/inpicture/www/vendor/laravel/framework/src/Illuminate/Container/Container.php(756): Illuminate\\Container\\Container->build() #3 /var/data/inpicture/www/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(855): Illuminate\\Container\\Container->resolve() #4 /var/data/inpicture/www/vendor/laravel/framework/src/Illuminate/Container/Container.php(692): Illuminate\\Foundation\\Application->resolve() #5 /var/data/inpicture/www/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(840): Illuminate\\Container\\Container->make() #6 /var/data/inpicture/www/vendor/spatie/laravel-ignition/src/IgnitionServiceProvider.php(248): Illuminate\\Foundation\\Application->make() #7 /var/data/inpicture/www/vendor/spatie/laravel-ignition/src/IgnitionServiceProvider.php(63): Spatie\\LaravelIgnition\\IgnitionServiceProvider->startRecorders() #8 /var/data/inpicture/www/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Spatie\\LaravelIgnition\\IgnitionServiceProvider->boot() #9 /var/data/inpicture/www/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}() #10 /var/data/inpicture/www/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure() #11 /var/data/inpicture/www/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\\Container\\BoundMethod::callBoundMethod() #12 /var/data/inpicture/www/vendor/laravel/framework/src/Illuminate/Container/Container.php(651): Illuminate\\Container\\BoundMethod::call() #13 /var/data/inpicture/www/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(928): Illuminate\\Container\\Container->call() #14 /var/data/inpicture/www/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(909): Illuminate\\Foundation\\Application->bootProvider() #15 [internal function]: Illuminate\\Foundation\\Application->Illuminate\\Foundation\\{closure}() #16 /var/data/inpicture/www/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(910): array_walk() #17 /var/data/inpicture/www/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/BootProviders.php(17): Illuminate\\Foundation\\Application->boot() #18 /var/data/inpicture/www/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(239): Illuminate\\Foundation\\Bootstrap\\BootProviders->bootstrap() #19 /var/data/inpicture/www/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(310): Illuminate\\Foundation\\Application->bootstrapWith() #20 /var/data/inpicture/www/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(127): Illuminate\\Foundation\\Console\\Kernel->bootstrap() #21 /var/data/inpicture/www/artisan(37): Illuminate\\Foundation\\Console\\Kernel->handle() #22 {main} "}
Specs :
Laravel 9 PHP 8.1.5
Hi @luca-alsina, this sounds like a configuration issue. Can you compare your config/flare.php with the default config file found here? https://github.com/spatie/laravel-ignition/blob/main/config/flare.php
I currently don't have config/flare.php file in my app. I think he is in default state.
I'm getting this error sometimes in my LOGS :
[2022-05-21 04:00:04] local.ERROR: Spatie\LaravelIgnition\Recorders\QueryRecorder\QueryRecorder::__construct(): Argument #2 ($reportBindings) must be of type bool, null given, called in /var/data/inpicture/www/vendor/spatie/laravel-ignition/src/IgnitionServiceProvider.php on line 170 {"exception":"[object] (TypeError(code: 0): Spatie\\LaravelIgnition\\Recorders\\QueryRecorder\\QueryRecorder::__construct(): Argument #2 ($reportBindings) must be of type bool, null given, called in /var/data/inpicture/www/vendor/spatie/laravel-ignition/src/IgnitionServiceProvider.php on line 170 at /var/data/inpicture/www/vendor/spatie/laravel-ignition/src/Recorders/QueryRecorder/QueryRecorder.php:19) [stacktrace] #0 /var/data/inpicture/www/vendor/spatie/laravel-ignition/src/IgnitionServiceProvider.php(170): Spatie\\LaravelIgnition\\Recorders\\QueryRecorder\\QueryRecorder->__construct() #1 /var/data/inpicture/www/vendor/laravel/framework/src/Illuminate/Container/Container.php(871): Spatie\\LaravelIgnition\\IgnitionServiceProvider->Spatie\\LaravelIgnition\\{closure}() #2 /var/data/inpicture/www/vendor/laravel/framework/src/Illuminate/Container/Container.php(756): Illuminate\\Container\\Container->build() #3 /var/data/inpicture/www/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(855): Illuminate\\Container\\Container->resolve() #4 /var/data/inpicture/www/vendor/laravel/framework/src/Illuminate/Container/Container.php(692): Illuminate\\Foundation\\Application->resolve() #5 /var/data/inpicture/www/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(840): Illuminate\\Container\\Container->make() #6 /var/data/inpicture/www/vendor/spatie/laravel-ignition/src/IgnitionServiceProvider.php(248): Illuminate\\Foundation\\Application->make() #7 /var/data/inpicture/www/vendor/spatie/laravel-ignition/src/IgnitionServiceProvider.php(63): Spatie\\LaravelIgnition\\IgnitionServiceProvider->startRecorders() #8 /var/data/inpicture/www/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Spatie\\LaravelIgnition\\IgnitionServiceProvider->boot() #9 /var/data/inpicture/www/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}() #10 /var/data/inpicture/www/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure() #11 /var/data/inpicture/www/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\\Container\\BoundMethod::callBoundMethod() #12 /var/data/inpicture/www/vendor/laravel/framework/src/Illuminate/Container/Container.php(651): Illuminate\\Container\\BoundMethod::call() #13 /var/data/inpicture/www/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(928): Illuminate\\Container\\Container->call() #14 /var/data/inpicture/www/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(909): Illuminate\\Foundation\\Application->bootProvider() #15 [internal function]: Illuminate\\Foundation\\Application->Illuminate\\Foundation\\{closure}() #16 /var/data/inpicture/www/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(910): array_walk() #17 /var/data/inpicture/www/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/BootProviders.php(17): Illuminate\\Foundation\\Application->boot() #18 /var/data/inpicture/www/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(239): Illuminate\\Foundation\\Bootstrap\\BootProviders->bootstrap() #19 /var/data/inpicture/www/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(310): Illuminate\\Foundation\\Application->bootstrapWith() #20 /var/data/inpicture/www/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(127): Illuminate\\Foundation\\Console\\Kernel->bootstrap() #21 /var/data/inpicture/www/artisan(37): Illuminate\\Foundation\\Console\\Kernel->handle() #22 {main} "}Specs :
Laravel 9 PHP 8.1.5
I have the same issue with this error every time I upload my app, either for production or development servers.
Just wanted to say I'm having the same issue, running PHP 8.1.6. Frustrating thing is that it only happens sometimes, when running php artisan optimize. Occasionally breaks my CI script... but not consistently. Very strange.
Just wanted to say I'm having the same issue, running PHP 8.1.6. Frustrating thing is that it only happens sometimes when running PHP artisan optimize. Occasionally breaks my CI script... but not consistently. Very strange.
I tried right now, it happen too.
Yes it happens to me as well. It breaks my Ci script. any solution?
Yes it happens to me as well. It breaks my Ci script. any solution?
I opened a PR that will stop this on https://github.com/spatie/laravel-ignition/pull/98, and incredible this is the only PR open and no one gives a chance to look at it.
same here (breaks my CI script... but not consistently)
Have the same problem sometimes
Have the same problem sometimes
In the #81 solves this problem.
rm -rf bootstrap/cache/*.php
once again did the trick for me.
Hi there, for some reason it seems like your application's config is missing some important keys... This might be due to config caching. I'd recommend trying php artisan config:clear and if that doesn't work, rm -rf bootstrap/cache/*.php like @Hillcow suggested.
I've also added some default values for the missing config keys to avoid having this problem in the future. Running composer update should pull those in and fix the issue altogether.
Good luck & feel free to open a new issues if the problem persists