Update 5.8.x -> 5.10.26 results in HTTP 500 (Lavarel class not found)

Hi all,
Manual update from 5.8.XX to 5.10.26 results in HTTP 500 error…

Any ideas?

Log:

[2024-08-30 10:36:36] production.ERROR: Class "Spatie\LaravelData\LaravelDataServiceProvider" not found {"exception":"[object] (Error(code: 0): Class \"Spatie\\LaravelData\\LaravelDataServiceProvider\" not found at /home/customer/www/invoiceninja.url/public_html/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php:206)
[stacktrace]
#0 /home/customer/www/invoiceninja.url/public_html/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php(142): Illuminate\\Foundation\\ProviderRepository->createProvider('Spatie\\\\LaravelD...')
#1 /home/customer/www/invoiceninja.url/public_html/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php(61): Illuminate\\Foundation\\ProviderRepository->compileManifest(Array)
#2 /home/customer/www/invoiceninja.url/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(843): Illuminate\\Foundation\\ProviderRepository->load(Array)
#3 /home/customer/www/invoiceninja.url/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/RegisterProviders.php(37): Illuminate\\Foundation\\Application->registerConfiguredProviders()
#4 /home/customer/www/invoiceninja.url/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(316): Illuminate\\Foundation\\Bootstrap\\RegisterProviders->bootstrap(Object(Illuminate\\Foundation\\Application))
#5 /home/customer/www/invoiceninja.url/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(187): Illuminate\\Foundation\\Application->bootstrapWith(Array)
#6 /home/customer/www/invoiceninja.url/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(171): Illuminate\\Foundation\\Http\\Kernel->bootstrap()
#7 /home/customer/www/invoiceninja.url/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(145): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter(Object(Illuminate\\Http\\Request))
#8 /home/customer/www/invoiceninja.url/public_html/public/index.php(56): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request))
#9 {main}
"} 
[2024-08-30 10:36:36] production.ERROR: Target class [view] does not exist. {"exception":"[object] (Illuminate\\Contracts\\Container\\BindingResolutionException(code: 0): Target class [view] does not exist. at /home/customer/www/invoiceninja.url/public_html/vendor/laravel/framework/src/Illuminate/Container/Container.php:940)
[stacktrace]
#0 /home/customer/www/invoiceninja.url/public_html/vendor/laravel/framework/src/Illuminate/Container/Container.php(815): Illuminate\\Container\\Container->build('view')
#1 /home/customer/www/invoiceninja.url/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1046): Illuminate\\Container\\Container->resolve('view', Array, true)
#2 /home/customer/www/invoiceninja.url/public_html/vendor/laravel/framework/src/Illuminate/Container/Container.php(751): Illuminate\\Foundation\\Application->resolve('view', Array)
#3 /home/customer/www/invoiceninja.url/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1028): Illuminate\\Container\\Container->make('view', Array)
#4 /home/customer/www/invoiceninja.url/public_html/vendor/laravel/framework/src/Illuminate/Container/Container.php(1559): Illuminate\\Foundation\\Application->make('view')
#5 /home/customer/www/invoiceninja.url/public_html/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(237): Illuminate\\Container\\Container->offsetGet('view')
#6 /home/customer/www/invoiceninja.url/public_html/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(208): Illuminate\\Support\\Facades\\Facade::resolveFacadeInstance('view')
#7 /home/customer/www/invoiceninja.url/public_html/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(351): Illuminate\\Support\\Facades\\Facade::getFacadeRoot()
#8 /home/customer/www/invoiceninja.url/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/RegisterErrorViewPaths.php(16): Illuminate\\Support\\Facades\\Facade::__callStatic('replaceNamespac...', Array)
#9 /home/customer/www/invoiceninja.url/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(912): Illuminate\\Foundation\\Exceptions\\RegisterErrorViewPaths->__invoke()
#10 /home/customer/www/invoiceninja.url/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(887): Illuminate\\Foundation\\Exceptions\\Handler->registerErrorViewPaths()
#11 /home/customer/www/invoiceninja.url/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(812): Illuminate\\Foundation\\Exceptions\\Handler->renderHttpException(Object(Symfony\\Component\\HttpKernel\\Exception\\HttpException))
#12 /home/customer/www/invoiceninja.url/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(703): Illuminate\\Foundation\\Exceptions\\Handler->prepareResponse(Object(Illuminate\\Http\\Request), Object(Symfony\\Component\\HttpKernel\\Exception\\HttpException))
#13 /home/customer/www/invoiceninja.url/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(592): Illuminate\\Foundation\\Exceptions\\Handler->renderExceptionResponse(Object(Illuminate\\Http\\Request), Object(Error))
#14 /home/customer/www/invoiceninja.url/public_html/app/Exceptions/Handler.php(247): Illuminate\\Foundation\\Exceptions\\Handler->render(Object(Illuminate\\Http\\Request), Object(Error))
#15 /home/customer/www/invoiceninja.url/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(512): App\\Exceptions\\Handler->render(Object(Illuminate\\Http\\Request), Object(Error))
#16 /home/customer/www/invoiceninja.url/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(149): Illuminate\\Foundation\\Http\\Kernel->renderException(Object(Illuminate\\Http\\Request), Object(Error))
#17 /home/customer/www/invoiceninja.url/public_html/public/index.php(56): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request))
#18 {main}

[previous exception] [object] (ReflectionException(code: -1): Class \"view\" does not exist at /home/customer/www/invoiceninja.url/public_html/vendor/laravel/framework/src/Illuminate/Container/Container.php:938)
[stacktrace]
#0 /home/customer/www/invoiceninja.url/public_html/vendor/laravel/framework/src/Illuminate/Container/Container.php(938): ReflectionClass->__construct('view')
#1 /home/customer/www/invoiceninja.url/public_html/vendor/laravel/framework/src/Illuminate/Container/Container.php(815): Illuminate\\Container\\Container->build('view')
#2 /home/customer/www/invoiceninja.url/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1046): Illuminate\\Container\\Container->resolve('view', Array, true)
#3 /home/customer/www/invoiceninja.url/public_html/vendor/laravel/framework/src/Illuminate/Container/Container.php(751): Illuminate\\Foundation\\Application->resolve('view', Array)
#4 /home/customer/www/invoiceninja.url/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1028): Illuminate\\Container\\Container->make('view', Array)
#5 /home/customer/www/invoiceninja.url/public_html/vendor/laravel/framework/src/Illuminate/Container/Container.php(1559): Illuminate\\Foundation\\Application->make('view')
#6 /home/customer/www/invoiceninja.url/public_html/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(237): Illuminate\\Container\\Container->offsetGet('view')
#7 /home/customer/www/invoiceninja.url/public_html/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(208): Illuminate\\Support\\Facades\\Facade::resolveFacadeInstance('view')
#8 /home/customer/www/invoiceninja.url/public_html/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(351): Illuminate\\Support\\Facades\\Facade::getFacadeRoot()
#9 /home/customer/www/invoiceninja.url/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/RegisterErrorViewPaths.php(16): Illuminate\\Support\\Facades\\Facade::__callStatic('replaceNamespac...', Array)
#10 /home/customer/www/invoiceninja.url/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(912): Illuminate\\Foundation\\Exceptions\\RegisterErrorViewPaths->__invoke()
#11 /home/customer/www/invoiceninja.url/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(887): Illuminate\\Foundation\\Exceptions\\Handler->registerErrorViewPaths()
#12 /home/customer/www/invoiceninja.url/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(812): Illuminate\\Foundation\\Exceptions\\Handler->renderHttpException(Object(Symfony\\Component\\HttpKernel\\Exception\\HttpException))
#13 /home/customer/www/invoiceninja.url/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(703): Illuminate\\Foundation\\Exceptions\\Handler->prepareResponse(Object(Illuminate\\Http\\Request), Object(Symfony\\Component\\HttpKernel\\Exception\\HttpException))
#14 /home/customer/www/invoiceninja.url/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(592): Illuminate\\Foundation\\Exceptions\\Handler->renderExceptionResponse(Object(Illuminate\\Http\\Request), Object(Error))
#15 /home/customer/www/invoiceninja.url/public_html/app/Exceptions/Handler.php(247): Illuminate\\Foundation\\Exceptions\\Handler->render(Object(Illuminate\\Http\\Request), Object(Error))
#16 /home/customer/www/invoiceninja.url/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(512): App\\Exceptions\\Handler->render(Object(Illuminate\\Http\\Request), Object(Error))
#17 /home/customer/www/invoiceninja.url/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(149): Illuminate\\Foundation\\Http\\Kernel->renderException(Object(Illuminate\\Http\\Request), Object(Error))
#18 /home/customer/www/invoiceninja.url/public_html/public/index.php(56): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request))
#19 {main}
"} 
[2024-08-30 10:36:36] production.ERROR: Uncaught ReflectionException: Class "view" does not exist in /home/customer/www/invoiceninja.url/public_html/vendor/laravel/framework/src/Illuminate/Container/Container.php:938
Stack trace:
:
:

Hi,

I suggest:

  • Running composer install
  • Deleting the contents of the bootstrap/cache folder

Thx hillel,
Deleting the contents of the bootstrap/cache folder solved the problem.

→ Maybe you should mention to delete the bootstrap/cache in

1 Like

I believe it was prior to version 5.10.20 this was not necessary. I’m not sure if it was related to the recent caching issue or not. You can always search for an issue on GitHub and report there if you cannot find one.

I have a test version of InvoiceNinja setup and will try updating to latest and see how it goes. I was away on holiday and am getting caught up and haven’t gotten to updating yet.

Yes, I encountered the same problem. Went to manual update because update from app doesn’t work anymore.

I have updated both my personal instance and an older test instance via the web UI and both ran successfully, without any issues.