laravel/pail

Pail Crashes

anthonyvancauwenberghe opened this issue · 2 comments

Laravel Package Version

dev-main

Laravel Version

10.25

PHP Version

8.2.10

Database Driver & Version

None

Description

Hi,

I'm receiving the following error (with stacktrace) when i execute pail without any additional arguments on our staging server:

PHP Fatal error: Uncaught JsonException: Syntax error in /home/user/projects/ingest/vendor/laravel/pail/src/ValueObjects/MessageLogged.php:30
Stack trace:
#0 /home/user/projects/ingest/vendor/laravel/pail/src/ValueObjects/MessageLogged.php(30): json_decode()
#1 /home/user/projects/ingest/vendor/laravel/pail/src/ProcessFactory.php(28): Laravel\Pail\ValueObjects\MessageLogged::fromJson()
#2 [internal function]: Laravel\Pail\ProcessFactory->Laravel\Pail{closure}()
#3 /home/user/projects/ingest/vendor/laravel/framework/src/Illuminate/Collections/Arr.php(558): array_map()
#4 /home/user/projects/ingest/vendor/laravel/framework/src/Illuminate/Collections/Collection.php(777): Illuminate\Support\Arr::map()
#5 /home/user/projects/ingest/vendor/laravel/pail/src/ProcessFactory.php(28): Illuminate\Support\Collection->map()
#6 /home/user/projects/ingest/vendor/symfony/process/Process.php(1276): Laravel\Pail\ProcessFactory->Laravel\Pail{closure}()
#7 /home/user/projects/ingest/vendor/symfony/process/Process.php(1376): Symfony\Component\Process\Process->Symfony\Component\Process{closure}()
#8 /home/user/projects/ingest/vendor/symfony/process/Process.php(1296): Symfony\Component\Process\Process->readPipes()
#9 /home/user/projects/ingest/vendor/symfony/process/Process.php(840): Symfony\Component\Process\Process->updateStatus()
#10 /home/user/projects/ingest/vendor/symfony/process/Process.php(886): Symfony\Component\Process\Process->isRunning()
#11 /home/user/projects/ingest/vendor/symfony/process/Process.php(213): Symfony\Component\Process\Process->stop()
#12 [internal function]: Symfony\Component\Process\Process->__destruct()
#13 {main}
thrown in /home/user/projects/ingest/vendor/laravel/pail/src/ValueObjects/MessageLogged.php on line 30

In local development everything seems to be working just fine.

Steps To Reproduce

executed php artisan pail.

I found the issue. mbstring is required.

Cool, @anthonyvancauwenberghe can you send in a PR that requires the extension through composer?