In app update error 500

The app tells me there is an update available but fails after running for 30 seconds

Larvel log shows nothing.
Nginx error log shows

2021/08/03 22:24:04 [error] 763#763: *14 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Error: Call to undefined method Illuminate\Foundation\Application::configureMonologUsing() in /var/www/invoiceninja/bootstrap/app.php:61
Stack trace:
#0 /var/www/invoiceninja/public/index.php(34): require_once()
#1 {main}
  thrown in /var/www/invoiceninja/bootstrap/app.php on line 61" while reading response header from upstream, client: 10.100.0.98, server: domain.com, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/run/php/php8.0-fpm.sock:", host: "domain.com"
2021/08/03 22:27:01 [error] 763#763: *17 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Error: Call to undefined method Illuminate\Foundation\Application::configureMonologUsing() in /var/www/invoiceninja/bootstrap/app.php:61
Stack trace:
#0 /var/www/invoiceninja/public/index.php(34): require_once()
#1 {main}
  thrown in /var/www/invoiceninja/bootstrap/app.php on line 61" while reading response header from upstream, client: 10.100.0.98, server: domain.com, request: "POST /api/v1/refresh?current_company=true&updated_at=1628024222&first_load=true HTTP/1.1", upstream: "fastcgi://unix:/run/php/php8.0-fpm.sock:", host: "domain.com", referrer: "https://domain.com/"

App then 500’s permanently after this until i restore a previous snapshot of the VM

Ubuntu 20 php8

@david do you have any thoughts?

That looks like composer install is failing somewhere.

are you able to drop to the command line and run

composer install -o --no-dev

I have the same issue. how do i run the composer command

Composer can be run from the command line

now i get this at the end
Class Guzzle\Tests\Message\HeaderComparisonTest located in ./vendor/guzzle/guzzl e/tests/Guzzle/Tests/Http/Message/HeaderComparisonTest.php does not comply with psr-0 autoloading standard. Skipping.
Class Guzzle\Tests\Http\Message\HttpRequestFactoryTest located in ./vendor/guzzl e/guzzle/tests/Guzzle/Tests/Http/Message/RequestFactoryTest.php does not comply with psr-0 autoloading standard. Skipping.
Class Guzzle\Tests\Parsers\UriTemplate\AbstractUriTemplateTest located in ./vend or/guzzle/guzzle/tests/Guzzle/Tests/Parser/UriTemplate/AbstractUriTemplateTest.p hp does not comply with psr-0 autoloading standard. Skipping.
Class Guzzle\Tests\Parsers\UriTemplate\PeclUriTemplateTest located in ./vendor/g uzzle/guzzle/tests/Guzzle/Tests/Parser/UriTemplate/PeclUriTemplateTest.php does not comply with psr-0 autoloading standard. Skipping.
Class Guzzle\Tests\Parsers\UriTemplate\UriTemplateTest located in ./vendor/guzzl e/guzzle/tests/Guzzle/Tests/Parser/UriTemplate/UriTemplateTest.php does not comp ly with psr-0 autoloading standard. Skipping.
Class Guzzle\Tests\Common\AbstractHasAdapterTest located in ./vendor/guzzle/guzz le/tests/Guzzle/Tests/Common/AbstractHasDispatcherTest.php does not comply with psr-0 autoloading standard. Skipping.
Carbon 1 is deprecated, see how to migrate to Carbon 2.
https://carbon.nesbot.com/docs/#api-carbon-2
You can run ‘./vendor/bin/upgrade-carbon’ to get help in updating carbon and other frameworks and libraries that depend on it.

Illuminate\Foundation\ComposerScripts::postAutoloadDump
@php artisan package:discover
[2021-08-05 21:10:36] production.ERROR: Class ‘Utils’ not found {“exception”:"[o bject] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Clas s ‘Utils’ not found at /var/www/html/ninja/routes/web.php:79)"} []

In web.php line 79:

Class ‘Utils’ not found

Script @php artisan package:discover handling the post-autoload-dump event retur ned with error code 1

Are you using Composer 1 or Composer 2

for v5, you need to use composer v2

It also looks like this codebase that you are running on is v4!!

composer 2.1, and this server was fresh install of v5. tried in app upgrade and it failed

the person who clicked on the upgrade option didn’t backup the server. is there any way i can rebuild a new server copy the relevant data to it ?

The error dump shows code from v4.

Illuminate\Foundation\ComposerScripts::postAutoloadDump
@php artisan package:discover
[2021-08-05 21:10:36] production.ERROR: Class ‘Utils’ not found {“exception”:"[o bject] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Clas s ‘Utils’ not found at /var/www/html/ninja/routes/web.php:79)"} []

You can setup a new v5 installation and point it to your existing DB

Just tried the update again from .14 to (now) .17 and it has worked without issue.

1 Like