You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After building application with app:build running command php application schedule:run on PHAR runs commands, but they are not executed correctly,
Steps to reproduce
Create new application with composer create-project --prefer-dist laravel-zero/laravel-zero application.
Install logging support with php application app:install log.
Set default logging channel in config\logging.php to single.
Set path of single channel in config\logging.php so it works after build too: 'single' => [ 'driver' => 'single', 'path' => getcwd() . '/logs/laravel.log', 'level' => env('LOG_LEVEL', 'debug'), ],
Uncomment line 50 od app\Commands\InspireCommand.php activating scheduling option of this command.
Build application (php application app:build).
Run php application schedule:run from app directory, it works fine, takes half a second, produces no log entries.
Now run same command from builds directory, it shows same output (command is scheduled and tries to run), but runs only like 17 ms and produces error in application\builds\logs\laravel.log
Commands ran by schedule:run try to run, but get an error like above. If those commands are run from PHAR normally via signature, not via schedule, they work as expected.
Expected behavior
Running schedule:run option should run command like normal without error.
Additional info
Great tool guys, I like it a lot.
The text was updated successfully, but these errors were encountered:
Description
After building application with app:build running command
php application schedule:run
on PHAR runs commands, but they are not executed correctly,Steps to reproduce
composer create-project --prefer-dist laravel-zero/laravel-zero application
.php application app:install log
.config\logging.php
tosingle
.config\logging.php
so it works after build too:'single' => [ 'driver' => 'single', 'path' => getcwd() . '/logs/laravel.log', 'level' => env('LOG_LEVEL', 'debug'), ],
app\Commands\InspireCommand.php
activating scheduling option of this command.php application app:build
).php application schedule:run
from app directory, it works fine, takes half a second, produces no log entries.builds
directory, it shows same output (command is scheduled and tries to run), but runs only like 17 ms and produces error inapplication\builds\logs\laravel.log
Error
[2022-08-24 08:22:27] production.ERROR: Unable to launch a new process. {"exception":"[object] (Symfony\\Component\\Process\\Exception\\RuntimeException(code: 0): Unable to launch a new process. at phar://D:/Projects/application/builds/application/vendor/symfony/process/Process.php:350) [stacktrace] #0 phar://D:/Projects/application/builds/application/vendor/symfony/process/Process.php(247): Symfony\\Component\\Process\\Process->start(NULL, Array) #1 phar://D:/Projects/application/builds/application/vendor/illuminate/console/Scheduling/Event.php(248): Symfony\\Component\\Process\\Process->run() #2 phar://D:/Projects/application/builds/application/vendor/illuminate/console/Scheduling/Event.php(230): Illuminate\\Console\\Scheduling\\Event->execute(Object(LaravelZero\\Framework\\Application)) #3 phar://D:/Projects/application/builds/application/vendor/illuminate/console/Scheduling/Event.php(200): Illuminate\\Console\\Scheduling\\Event->start(Object(LaravelZero\\Framework\\Application)) #4 phar://D:/Projects/application/builds/application/vendor/illuminate/console/Scheduling/ScheduleRunCommand.php(184): Illuminate\\Console\\Scheduling\\Event->run(Object(LaravelZero\\Framework\\Application)) #5 phar://D:/Projects/application/builds/application/vendor/illuminate/console/View/Components/Task.php(36): Illuminate\\Console\\Scheduling\\ScheduleRunCommand->Illuminate\\Console\\Scheduling\\{closure}() #6 phar://D:/Projects/application/builds/application/vendor/illuminate/console/View/Components/Factory.php(56): Illuminate\\Console\\View\\Components\\Task->render('<fg=gray>2022-0...', Object(Closure)) #7 phar://D:/Projects/application/builds/application/vendor/illuminate/console/Scheduling/ScheduleRunCommand.php(199): Illuminate\\Console\\View\\Components\\Factory->__call('task', Array) #8 phar://D:/Projects/application/builds/application/vendor/illuminate/console/Scheduling/ScheduleRunCommand.php(127): Illuminate\\Console\\Scheduling\\ScheduleRunCommand->runEvent(Object(Illuminate\\Console\\Scheduling\\Event)) #9 phar://D:/Projects/application/builds/application/vendor/illuminate/container/BoundMethod.php(36): Illuminate\\Console\\Scheduling\\ScheduleRunCommand->handle(Object(Illuminate\\Console\\Scheduling\\Schedule), Object(Illuminate\\Events\\Dispatcher), Object(Illuminate\\Foundation\\Exceptions\\Handler)) #10 phar://D:/Projects/application/builds/application/vendor/illuminate/container/Util.php(41): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}() #11 phar://D:/Projects/application/builds/application/vendor/illuminate/container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure(Object(Closure)) #12 phar://D:/Projects/application/builds/application/vendor/illuminate/container/BoundMethod.php(37): Illuminate\\Container\\BoundMethod::callBoundMethod(Object(LaravelZero\\Framework\\Application), Array, Object(Closure)) #13 phar://D:/Projects/application/builds/application/vendor/illuminate/container/Container.php(651): Illuminate\\Container\\BoundMethod::call(Object(LaravelZero\\Framework\\Application), Array, Array, NULL) #14 phar://D:/Projects/application/builds/application/vendor/illuminate/console/Command.php(139): Illuminate\\Container\\Container->call(Array) #15 phar://D:/Projects/application/builds/application/vendor/symfony/console/Command/Command.php(291): Illuminate\\Console\\Command->execute(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Illuminate\\Console\\OutputStyle)) #16 phar://D:/Projects/application/builds/application/vendor/illuminate/console/Command.php(124): Symfony\\Component\\Console\\Command\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Illuminate\\Console\\OutputStyle)) #17 phar://D:/Projects/application/builds/application/vendor/symfony/console/Application.php(998): Illuminate\\Console\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput)) #18 phar://D:/Projects/application/builds/application/vendor/symfony/console/Application.php(299): Symfony\\Component\\Console\\Application->doRunCommand(Object(Illuminate\\Console\\Scheduling\\ScheduleRunCommand), Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput)) #19 phar://D:/Projects/application/builds/application/vendor/symfony/console/Application.php(171): Symfony\\Component\\Console\\Application->doRun(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput)) #20 phar://D:/Projects/application/builds/application/vendor/illuminate/console/Application.php(102): Symfony\\Component\\Console\\Application->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput)) #21 phar://D:/Projects/application/builds/application/vendor/laravel-zero/foundation/src/Illuminate/Foundation/Console/Kernel.php(129): Illuminate\\Console\\Application->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput)) #22 phar://D:/Projects/application/builds/application/vendor/laravel-zero/framework/src/Kernel.php(96): Illuminate\\Foundation\\Console\\Kernel->handle(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput)) #23 phar://D:/Projects/application/builds/application/application(36): LaravelZero\\Framework\\Kernel->handle(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput)) #24 D:\\Projects\\application\\builds\\application(14): require('phar://D:/Proje...') #25 {main} "}
Actual behavior
Commands ran by
schedule:run
try to run, but get an error like above. If those commands are run from PHAR normally via signature, not via schedule, they work as expected.Expected behavior
Running
schedule:run
option should run command like normal without error.Additional info
Great tool guys, I like it a lot.
The text was updated successfully, but these errors were encountered: