Official Update Guide for V5 to V5?

Currently on V5.1.40-C45, Attempting to update to latest (5.3.22)

I followed the instructions in the official documentation Update — Invoice Ninja 4.5.37 documentation regarding “just download the new code, copy it into the existing folder, and reboot”, unfortunately, this caused an error 500 server error (from invoice ninja) and also wiped away my .env file, I rolled back to a previous snapshot, tried again and made a copy of the .env, replaced it, and no dice. for now, I’ve just rolled back to the old snapshot, but is there something I missed? I’m running newer than PHP7.1, I feel like I’m missing something glaringly obvious, but I cant find it in any of the documentation, suggestions?

Hi,

Those are the v4 docs, the v5 docs are available here:

https://invoiceninja.github.io/docs/self-host-updating/

Are you seeing an error in storage/logs?

Note: v5 requires PHP >= 7.4.

Hi,

So I see now my errors, I have tried pushing an update from the webUI instead of replacing files, in non debug mode I get a 500 error, in debug mode I get the following: “command git update-index -q --refresh failed (exit code 127).”, I’ve double-checked the basics, made sure the servers root folder is recursively www-data:www-data, I’ve double-checked the crontab file for the www-data user to ensure it has the entry, any suggestions?

EDIT: Update, I tried installing git (server is deb 10), error has changed to “Command ‘git ‘pull origin’’ failed (exit-code 1)”, still not sure how to proceed, but its a step forward I guess?

You may want to try manually copying over the latest version.

https://github.com/invoiceninja/invoiceninja/releases/download/v5.3.23/invoiceninja.zip

Alright, so as I did in my original post, I went ahead and downloaded latest, recursively copied the new files into the existing server folder after making a backup of the existing folder, I then copied the old .env file back into the running server folder, as the downloaded zip copy overwrote the existing .env, and rebooted the server. The error I got attempting to connect to the server, see below:

" Unresolvable dependency resolving [Parameter #0 [ array $options ]] in class App\Utils\CssInlinerPlugin"

BindingResolutionException

Illuminate\Contracts\Container\BindingResolutionException:
Unresolvable dependency resolving [Parameter #0 [ <required> array $options ]] in class App\Utils\CssInlinerPlugin

  at /var/www/ninja/vendor/laravel/framework/src/Illuminate/Container/Container.php:1108
  at Illuminate\Container\Container->unresolvablePrimitive()
     (/var/www/ninja/vendor/laravel/framework/src/Illuminate/Container/Container.php:1015)
  at Illuminate\Container\Container->resolvePrimitive()
     (/var/www/ninja/vendor/laravel/framework/src/Illuminate/Container/Container.php:950)
  at Illuminate\Container\Container->resolveDependencies()
     (/var/www/ninja/vendor/laravel/framework/src/Illuminate/Container/Container.php:912)
  at Illuminate\Container\Container->build()
     (/var/www/ninja/vendor/laravel/framework/src/Illuminate/Container/Container.php:758)
  at Illuminate\Container\Container->resolve()
     (/var/www/ninja/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:841)
  at Illuminate\Foundation\Application->resolve()
     (/var/www/ninja/vendor/laravel/framework/src/Illuminate/Container/Container.php:694)
  at Illuminate\Container\Container->make()
     (/var/www/ninja/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:826)
  at Illuminate\Foundation\Application->make()
     (/var/www/ninja/app/Providers/MailServiceProvider.php:31)
  at App\Providers\MailServiceProvider->boot()
     (/var/www/ninja/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:36)
  at Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
     (/var/www/ninja/vendor/laravel/framework/src/Illuminate/Container/Util.php:40)
  at Illuminate\Container\Util::unwrapIfClosure()
     (/var/www/ninja/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:93)
  at Illuminate\Container\BoundMethod::callBoundMethod()
     (/var/www/ninja/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:37)
  at Illuminate\Container\BoundMethod::call()
     (/var/www/ninja/vendor/laravel/framework/src/Illuminate/Container/Container.php:653)
  at Illuminate\Container\Container->call()
     (/var/www/ninja/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:914)
  at Illuminate\Foundation\Application->bootProvider()
     (/var/www/ninja/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:895)
  at Illuminate\Foundation\Application->Illuminate\Foundation\{closure}()
  at array_walk()
     (/var/www/ninja/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:896)
  at Illuminate\Foundation\Application->boot()
     (/var/www/ninja/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/BootProviders.php:17)
  at Illuminate\Foundation\Bootstrap\BootProviders->bootstrap()
     (/var/www/ninja/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:237)
  at Illuminate\Foundation\Application->bootstrapWith()
     (/var/www/ninja/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:152)
  at Illuminate\Foundation\Http\Kernel->bootstrap()
     (/var/www/ninja/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:136)
  at Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter()
     (/var/www/ninja/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:110)
  at Illuminate\Foundation\Http\Kernel->handle()
     (/var/www/ninja/public/index.php:57)      

UPDATE: error partially fixed, followed instructions from Error in Class App\Utils\CssInlinerPlugin regarding "delete files inside bootstrap/cache, I now see the following:

Target class [db] does not exist.

Illuminate\Contracts\Container\BindingResolutionException:
Target class [db] does not exist.

  at /var/www/ninja/vendor/laravel/framework/src/Illuminate/Container/Container.php:879
  at Illuminate\Container\Container->build()
     (/var/www/ninja/vendor/laravel/framework/src/Illuminate/Container/Container.php:758)
  at Illuminate\Container\Container->resolve()
     (/var/www/ninja/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:841)
  at Illuminate\Foundation\Application->resolve()
     (/var/www/ninja/vendor/laravel/framework/src/Illuminate/Container/Container.php:694)
  at Illuminate\Container\Container->make()
     (/var/www/ninja/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:826)
  at Illuminate\Foundation\Application->make()
     (/var/www/ninja/vendor/laravel/framework/src/Illuminate/Container/Container.php:1423)
  at Illuminate\Container\Container->offsetGet()
     (/var/www/ninja/vendor/laravel/framework/src/Illuminate/Support/Facades/Schema.php:45)
  at Illuminate\Support\Facades\Schema::getFacadeAccessor()
     (/var/www/ninja/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:166)
  at Illuminate\Support\Facades\Facade::getFacadeRoot()
     (/var/www/ninja/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:255)
  at Illuminate\Support\Facades\Facade::__callStatic()
     (/var/www/ninja/app/Exceptions/Handler.php:76)
  at App\Exceptions\Handler->report()
     (/var/www/ninja/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:88)
  at Illuminate\Foundation\Bootstrap\HandleExceptions->handleException()  

UPDATE 2: running php artisan migrate, followed by php artisan optimize, as sudo, in the root directory of the server, appears to have cleared the remaining issues, marking solved.