Error 500 after update v5.3.73

Hi there, I just updated from v5.3.68 (just got it working properly after severe api problems)
to v5.3.73 through the UI. Now I get a 500 error on every page. With the following in dev tools console:

/public/:1 Failed to load resource: the server responded with a status of 500 () invoice.mydomain.nl/:1 GET https://invoice.mydomain.nl/ 500
flutter_service_worker.js?v=5.3.68:1 Uncaught (in promise) TypeError: Failed to execute ‘addAll’ on ‘Cache’: Request failed

I tried to clear the cache ?clear_cache=true without succes and also ran php artisan optimize within invoice.mydomain.nl. With the following response:

In Company.php line 29:
Trait “Awobaz\Compoships\Compoships” not found

This is the output of my /storage/logs/laravel.log (this is the last part, it has many of the same logs)

[2022-03-18 10:32:09] production.ERROR: Trait “Awobaz\Compoships\Compoships” not found {“exception”:"[object] (Symfony\Component\ErrorHandler\Error\FatalError(code: 0): Trait “Awobaz\Compoships\Compoships” not found at /home/myuser/invoice.mydomain.nl/app/Models/Company.php:29)
[stacktrace]
#0 /home/myuser/invoice.mydomain.nl/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(217): Symfony\Component\ErrorHandler\Error\FatalError->__construct(message: '‘Trait "Awobaz\\…’, code: ‘0’, error: '[‘type’ => 1, ‘…’, traceOffset: ‘0’, traceArgs: ‘???’, trace: ‘???’)
#1 /home/myuser/invoice.mydomain.nl/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(204): Illuminate\Foundation\Bootstrap\HandleExceptions->fatalErrorFromPhpError(error: ‘[‘type’ => 1, ‘…’, traceOffset: ‘0’)
#2 /home/myuser/invoice.mydomain.nl/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(0): Illuminate\Foundation\Bootstrap\HandleExceptions->handleShutdown()
#3 /home/myuser/invoice.mydomain.nl/vendor/composer/ClassLoader.php(571): ()
#4 /home/myuser/invoice.mydomain.nl/vendor/composer/ClassLoader.php(428): Composer\Autoload\includeFile(file: ‘’/home/myuser…’)
#5 /home/myuser/invoice.mydomain.nl/app/Providers/EventServiceProvider.php(581): Composer\Autoload\ClassLoader->loadClass(class: '‘App\\\\Models\\\\C…’)
#6 /home/myuser/invoice.mydomain.nl/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): App\Providers\EventServiceProvider->boot()
#7 /home/myuser/invoice.mydomain.nl/vendor/laravel/framework/src/Illuminate/Container/Util.php(40): Illuminate\Container\BoundMethod::Illuminate\Container\{closure:/home/myuser/invoice.mydomain.nl/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:35-37}()
#8 /home/myuser/invoice.mydomain.nl/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure(value: ‘class Closure {…’)
#9 /home/myuser/invoice.mydomain.nl/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\Container\BoundMethod::callBoundMethod(container: ‘class Illuminat…’, callback: ‘[0 => class App…’, default: ‘class Closure {…’)
#10 /home/myuser/invoice.mydomain.nl/vendor/laravel/framework/src/Illuminate/Container/Container.php(653): Illuminate\Container\BoundMethod::call(container: ‘class Illuminat…’, callback: ‘[0 => class App…’, parameters: ‘[]’, defaultMethod: ‘NULL’)
#11 /home/myuser/invoice.mydomain.nl/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(924): Illuminate\Foundation\Application->call(callback: ‘[0 => class App…’, parameters: ‘???’, defaultMethod: ‘???’)
#12 /home/myuser/invoice.mydomain.nl/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(905): Illuminate\Foundation\Application->bootProvider(provider: ‘class App\\Provi…’)
#13 /home/myuser/invoice.mydomain.nl/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(906): Illuminate\Foundation\Application->Illuminate\Foundation\{closure:/home/myuser/invoice.mydomain.nl/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:904-906}(p: ‘class App\\Provi…’, ‘35’)
#14 /home/myuser/invoice.mydomain.nl/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(906): array_walk(array: ‘[0 => class Ill…’, callback: ‘class Closure {…’)
#15 /home/myuser/invoice.mydomain.nl/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/BootProviders.php(17): Illuminate\Foundation\Application->boot()
#16 /home/myuser/invoice.mydomain.nl/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(237): Illuminate\Foundation\Bootstrap\BootProviders->bootstrap(app: ‘class Illuminat…’)
#17 /home/myuser/invoice.mydomain.nl/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(310): Illuminate\Foundation\Application->bootstrapWith(bootstrappers: '[0 => ‘Illumina…’)
#18 /home/myuser/invoice.mydomain.nl/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(127): App\Console\Kernel->bootstrap()
#19 /home/myuser/invoice.mydomain.nl/artisan(37): App\Console\Kernel->handle(input: ‘class Symfony\\C…’, output: ‘class Symfony\\C…’)
#20 /home/myuser/invoice.mydomain.nl/artisan(0): {main}()
#21 {main}
"}

1 Like

Just was contacted by a customer with the same error.
After upgrading to 5.3.73, Invoice Ninja doesn’t work anymore → HTTP Error 500.

Running php artisan migrate throws the following error:

PHP Fatal error:  Trait 'Awobaz\Compoships\Compoships' not found in /var/www/invoiceninja5/app/Models/Company.php on line 29

In Company.php line 29:
                                                  
  Trait 'Awobaz\Compoships\Compoships' not found  

That’s a pretty bad one :unamused:

→ as a side note: Can we disable in-app updates in .env ? So customers don’t update themselves?

@napsty, Any ideas for a solution?

Got Error 500 when upgrading from V5.3.66-W77 to V5.3.71 - #5 by gene mentions a restore. That’s also what I probably have in mind, unless @david or @hillel come up with a quick/hotfix.

@christopherus I downloaded the 5.3.73 zip file and unpacked it on the invoice ninja path, overwriting all existing files. (.env will not overwritten, but make a backup nevertheless).

wget https://github.com/invoiceninja/invoiceninja/releases/download/v5.3.73/invoiceninja.zip
unzip invoiceninja.zip -d /path/to/invoiceninja5/

Invoice Ninja is now up again for our customer.

But something like this definitely should not happen…

2 Likes

Thank you very much @napsty! That solved my problem. Again, I ran php artisan optimize afterwards. I love InvoiceNinja but I agree with you that this should not happen…

composer update fixed it for me

Yea, I tried that also but no luck… Good it’s solved now.

@christopherus assuming you’re in Europe, you might also be interested in this topic: PDF size sticks to Letter after upgrading to v5.3.73-C77 - #4 by napsty

1 Like

I was able to correct the issue with a work around. Here is my post on the work around

Thanks for sharing @amp51, now we have a few possible solutions in this thread if anyone needs it.

Hi guys,

I’ll try and create more detailed release notes going forward, i’ll link to the documentation on our github wiki here:

1 Like