how to debug deployments

I'm trying to deploy a Laravel application and it worked fine using the new Railpack, which is better than Nixpacks as it was truly zero configuration for Laravel, but it looks like it lacks support for MySQL database connections, not having pdo_mysql installed in container. So I tried adding RAILPACK_PHP_EXTENSIONS=pdo_mysql to my environment variables and it started breaking the deployment, giving error in build time when it should read an unchanged environment variable but not finding it (next message) I believe that doing this messed up something with the generated .env file in build time, but there is no way to know it without having logs of how .env was configured at the moment
1 Reply
Patrick Matias
Patrick MatiasOP2mo ago
#32 11.50 > Illuminate\Foundation\ComposerScripts::postAutoloadDump

info

#32 11.55 > @php artisan package:discover --ansi

info

#32 11.94

info

#32 11.94 InvalidArgumentException

info

#32 11.94

info

#32 11.94 Broadcast connection [] is not defined.

info

#32 11.94

info

#32 11.94 at vendor/laravel/framework/src/Illuminate/Broadcasting/BroadcastManager.php:249

info

#32 11.94 245▕ {

debug

#32 11.94 246▕ $config = $this->getConfig($name);

info

#32 11.94 247▕

debug

#32 11.94 248▕ if (is_null($config)) {

info

#32 11.94 ➜ 249▕ throw new InvalidArgumentException("Broadcast connection [{$name}] is not defined.");

info

#32 11.94 250▕ }

info

#32 11.94 251▕

debug

#32 11.94 252▕ if (isset($this->customCreators[$config['driver']])) {

debug

#32 11.94 253▕ return $this->callCustomCreator($config);

info

#32 11.94

info

#32 11.94 +4 vendor frames

info

#32 11.94

info

#32 11.94 5 routes/channels.php:23

info

#32 11.94 Illuminate\Support\Facades\Facade::__callStatic("channel")

info

#32 11.94 6 app/Providers/BroadcastServiceProvider.php:17

info

#32 11.94

error

#32 11.95 Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1

error

#32 ERROR: process "composer install --ignore-platform-reqs" did not complete successfully: exit code: 1

info

------

info

> composer install --ignore-platform-reqs:

debug

11.94 252▕ if (isset($this->customCreators[$config['driver']])) {

debug

11.94 253▕ return $this->callCustomCreator($config);

info

11.94

info

11.94 +4 vendor frames

info

11.94

info

11.94 5 routes/channels.php:23

info

11.94 Illuminate\Support\Facades\Facade::__callStatic("channel")

info

11.94 6 app/Providers/BroadcastServiceProvider.php:17

info

11.94

error
#32 11.50 > Illuminate\Foundation\ComposerScripts::postAutoloadDump

info

#32 11.55 > @php artisan package:discover --ansi

info

#32 11.94

info

#32 11.94 InvalidArgumentException

info

#32 11.94

info

#32 11.94 Broadcast connection [] is not defined.

info

#32 11.94

info

#32 11.94 at vendor/laravel/framework/src/Illuminate/Broadcasting/BroadcastManager.php:249

info

#32 11.94 245▕ {

debug

#32 11.94 246▕ $config = $this->getConfig($name);

info

#32 11.94 247▕

debug

#32 11.94 248▕ if (is_null($config)) {

info

#32 11.94 ➜ 249▕ throw new InvalidArgumentException("Broadcast connection [{$name}] is not defined.");

info

#32 11.94 250▕ }

info

#32 11.94 251▕

debug

#32 11.94 252▕ if (isset($this->customCreators[$config['driver']])) {

debug

#32 11.94 253▕ return $this->callCustomCreator($config);

info

#32 11.94

info

#32 11.94 +4 vendor frames

info

#32 11.94

info

#32 11.94 5 routes/channels.php:23

info

#32 11.94 Illuminate\Support\Facades\Facade::__callStatic("channel")

info

#32 11.94 6 app/Providers/BroadcastServiceProvider.php:17

info

#32 11.94

error

#32 11.95 Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1

error

#32 ERROR: process "composer install --ignore-platform-reqs" did not complete successfully: exit code: 1

info

------

info

> composer install --ignore-platform-reqs:

debug

11.94 252▕ if (isset($this->customCreators[$config['driver']])) {

debug

11.94 253▕ return $this->callCustomCreator($config);

info

11.94

info

11.94 +4 vendor frames

info

11.94

info

11.94 5 routes/channels.php:23

info

11.94 Illuminate\Support\Facades\Facade::__callStatic("channel")

info

11.94 6 app/Providers/BroadcastServiceProvider.php:17

info

11.94

error
this error happens while BROADCAST_DRIVER='log' exists in my environment, after adding RAILPACK_PHP_EXTENSIONS=pdo_mysql

Did you find this page helpful?