Manual update v5.2.17 to v5.3.22

Hi everyone,

I am using Invoiceninja V5 for a while now, and it’s working fine!

I want to update my version from 5.2.17 to 5.3.22 because of some new features i’m interested in. But if i want to update it via the gui i get the following error:

Laravel log:
[2021-10-10 16:09:22] production.ERROR: Cannot update system because 613b2309f54e2f1039ae91a4822a42d23cc95155 is not writable {“userId”:1,“exception”:"[object] (App\Exceptions\FilePermissionsFailure(code: 0): Cannot update system because 613b2309f54e2f1039ae91a4822a42d23cc95155 is not writable at /www/wwwroot/jornmeijs.nl/administratie/app/Http/Controllers/SelfUpdateController.php:104)
[stacktrace]
#0 /www/wwwroot/jornmeijs.nl/administratie/app/Http/Controllers/SelfUpdateController.php(65): App\Http\Controllers\SelfUpdateController->testWritable()
#1 /www/wwwroot/jornmeijs.nl/administratie/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): App\Http\Controllers\SelfUpdateController->update(Object(Codedge\Updater\UpdaterManager))
#2 /www/wwwroot/jornmeijs.nl/administratie/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(45): Illuminate\Routing\Controller->callAction(‘update’, Array)
#3 /www/wwwroot/jornmeijs.nl/administratie/vendor/laravel/framework/src/Illuminate/Routing/Route.php(254): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(App\Http\Controllers\SelfUpdateController), ‘update’)
#4 /www/wwwroot/jornmeijs.nl/administratie/vendor/laravel/framework/src/Illuminate/Routing/Route.php(197): Illuminate\Routing\Route->runController()
#5 /www/wwwroot/jornmeijs.nl/administratie/vendor/laravel/framework/src/Illuminate/Routing/Router.php(695): Illuminate\Routing\Route->run()
#6 /www/wwwroot/jornmeijs.nl/administratie/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\Routing\Router->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#7 /www/wwwroot/jornmeijs.nl/administratie/app/Http/Middleware/QueryLogging.php(40): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#8 /www/wwwroot/jornmeijs.nl/administratie/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\QueryLogging->handle(Object(Illuminate\Http\Request), Object(Closure))
#9 /www/wwwroot/jornmeijs.nl/administratie/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(50): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#10 /www/wwwroot/jornmeijs.nl/administratie/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Routing\Middleware\SubstituteBindings->handle(Object(Illuminate\Http\Request), Object(Closure))
#11 /www/wwwroot/jornmeijs.nl/administratie/app/Http/Middleware/Locale.php(34): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#12 /www/wwwroot/jornmeijs.nl/administratie/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\Locale->handle(Object(Illuminate\Http\Request), Object(Closure))
#13 /www/wwwroot/jornmeijs.nl/administratie/app/Http/Middleware/PasswordProtection.php(59): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#14 /www/wwwroot/jornmeijs.nl/administratie/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\PasswordProtection->handle(Object(Illuminate\Http\Request), Object(Closure))
#15 /www/wwwroot/jornmeijs.nl/administratie/app/Http/Middleware/TokenAuth.php(80): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#16 /www/wwwroot/jornmeijs.nl/administratie/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\TokenAuth->handle(Object(Illuminate\Http\Request), Object(Closure))
#17 /www/wwwroot/jornmeijs.nl/administratie/app/Http/Middleware/SetDb.php(41): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#18 /www/wwwroot/jornmeijs.nl/administratie/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\SetDb->handle(Object(Illuminate\Http\Request), Object(Closure))
#19 /www/wwwroot/jornmeijs.nl/administratie/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php(127): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#20 /www/wwwroot/jornmeijs.nl/administratie/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php(63): Illuminate\Routing\Middleware\ThrottleRequests->handleRequest(Object(Illuminate\Http\Request), Object(Closure), Array)
#21 /www/wwwroot/jornmeijs.nl/administratie/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Routing\Middleware\ThrottleRequests->handle(Object(Illuminate\Http\Request), Object(Closure), ‘300’, ‘1’)
#22 /www/wwwroot/jornmeijs.nl/administratie/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#23 /www/wwwroot/jornmeijs.nl/administratie/vendor/laravel/framework/src/Illuminate/Routing/Router.php(697): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#24 /www/wwwroot/jornmeijs.nl/administratie/vendor/laravel/framework/src/Illuminate/Routing/Router.php(672): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))
#25 /www/wwwroot/jornmeijs.nl/administratie/vendor/laravel/framework/src/Illuminate/Routing/Router.php(636): Illuminate\Routing\Router->runRoute(Object(Illuminate\Http\Request), Object(Illuminate\Routing\Route))
#26 /www/wwwroot/jornmeijs.nl/administratie/vendor/laravel/framework/src/Illuminate/Routing/Router.php(625): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#27 /www/wwwroot/jornmeijs.nl/administratie/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(166): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
#28 /www/wwwroot/jornmeijs.nl/administratie/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}(Object(Illuminate\Http\Request))
#29 /www/wwwroot/jornmeijs.nl/administratie/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Http/SetRequestIpMiddleware.php(55): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#30 /www/wwwroot/jornmeijs.nl/administratie/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Sentry\Laravel\Http\SetRequestIpMiddleware->handle(Object(Illuminate\Http\Request), Object(Closure))
#31 /www/wwwroot/jornmeijs.nl/administratie/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Http/SetRequestMiddleware.php(52): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#32 /www/wwwroot/jornmeijs.nl/administratie/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Sentry\Laravel\Http\SetRequestMiddleware->handle(Object(Illuminate\Http\Request), Object(Closure))
#33 /www/wwwroot/jornmeijs.nl/administratie/app/Http/Middleware/Cors.php(25): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#34 /www/wwwroot/jornmeijs.nl/administratie/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\Cors->handle(Object(Illuminate\Http\Request), Object(Closure))
#35 /www/wwwroot/jornmeijs.nl/administratie/vendor/fideloper/proxy/src/TrustProxies.php(57): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#36 /www/wwwroot/jornmeijs.nl/administratie/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Fideloper\Proxy\TrustProxies->handle(Object(Illuminate\Http\Request), Object(Closure))
#37 /www/wwwroot/jornmeijs.nl/administratie/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#38 /www/wwwroot/jornmeijs.nl/administratie/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php(31): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle(Object(Illuminate\Http\Request), Object(Closure))
#39 /www/wwwroot/jornmeijs.nl/administratie/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull->handle(Object(Illuminate\Http\Request), Object(Closure))
#40 /www/wwwroot/jornmeijs.nl/administratie/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#41 /www/wwwroot/jornmeijs.nl/administratie/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php(40): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle(Object(Illuminate\Http\Request), Object(Closure))
#42 /www/wwwroot/jornmeijs.nl/administratie/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\TrimStrings->handle(Object(Illuminate\Http\Request), Object(Closure))
#43 /www/wwwroot/jornmeijs.nl/administratie/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#44 /www/wwwroot/jornmeijs.nl/administratie/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\ValidatePostSize->handle(Object(Illuminate\Http\Request), Object(Closure))
#45 /www/wwwroot/jornmeijs.nl/administratie/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(86): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#46 /www/wwwroot/jornmeijs.nl/administratie/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance->handle(Object(Illuminate\Http\Request), Object(Closure))
#47 /www/wwwroot/jornmeijs.nl/administratie/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#48 /www/wwwroot/jornmeijs.nl/administratie/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(141): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#49 /www/wwwroot/jornmeijs.nl/administratie/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(110): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))
#50 /www/wwwroot/jornmeijs.nl/administratie/public/index.php(57): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))
#51 {main}
"}

Is there a possibility to update it manually or to solve this problem without losing my data?

Thanks in advance.

Hi,

It’s most likely a permissions problem. You can either set the folder to be owned by the web user or manually copy over the latest release.

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

Hi,

I have checked the permissions, but the web user have the ownership and full permission to read / write.

Can i copy over the last release without losing data? And if yes, do i need to configure some things in order to let it work?

Yes, you can copy over the latest. The data is stored in the database, the configuration info is in the .env file and there may be uploaded documents.

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

cd /www/wwwroot/jornmeijs.nl/administratie
find . ( ! -user www-data -o ! -perm -644 ) -ls

might be helpful to find the file with wrong permissions or ownership preventing the in-app upgrade.

(Caveat emptor: Depending on your shell some or all of the “(”, “!”, and “)” characters might require escaping and the username “www-data” might need to be changed to your web user.)

If you want to overwrite your installation, save your .env before you do, as the zip usually contains a default .env.

1 Like