Upgrade from v5.1.32-C44 to 5.3?

Hi.

What would be the best way to update from v5.1.32-C44 to 5.3?. If I just overwrite the folder (excluded env file) it fails.

Force update link shows:
Current version: v5.1.32
Latest Version: v5.1.32

Thank you

Br,
Dali

Hi,

Are you seeing a specific error?

Hi Hillel.

Thank you for reply.

No, browser just wouldn’t load the page as it doesn’t exist. I didn’t look any further.

Maybe just a file/folder permissions that need to be applied again after the file overwriting.
sudo chown www-data:www-data /var/www/invoice-ninja/ -R

have to try that again

Br,
Dali

By the way.

Last time we spent days on migration error, that we later found was the lack of Braintree support in v5. Is that fixed now? Can I migrate from v4.5.43 for 5.3 using braintree?

Thank you

Br,
Dali

Braintree is now supported in v5

When I apply folder permissions:
sudo chown www-data:www-data /var/www/invoice-ninja/ -R

500

Same with APP DEBUG=true

Br,
Dali

Are there details about the error in storage/logs/

Yes

laravel.log

[2021-08-24 11:43:49] production.ERROR: Unresolvable dependency resolving [Parameter #0 [ <required> array $options ]] in class App\Utils\CssInlinerPlugin {"exception":"[object] (Illuminate\\Contracts\\Container\\BindingResolutionExcepti
[stacktrace]
#0 /var/www/invoice-ninja/vendor/laravel/framework/src/Illuminate/Container/Container.php(1011): Illuminate\\Container\\Container->unresolvablePrimitive()
#1 /var/www/invoice-ninja/vendor/laravel/framework/src/Illuminate/Container/Container.php(946): Illuminate\\Container\\Container->resolvePrimitive()
#2 /var/www/invoice-ninja/vendor/laravel/framework/src/Illuminate/Container/Container.php(908): Illuminate\\Container\\Container->resolveDependencies()
#3 /var/www/invoice-ninja/vendor/laravel/framework/src/Illuminate/Container/Container.php(754): Illuminate\\Container\\Container->build()
#4 /var/www/invoice-ninja/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(841): Illuminate\\Container\\Container->resolve()
#5 /var/www/invoice-ninja/vendor/laravel/framework/src/Illuminate/Container/Container.php(692): Illuminate\\Foundation\\Application->resolve()
#6 /var/www/invoice-ninja/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(826): Illuminate\\Container\\Container->make()
#7 /var/www/invoice-ninja/app/Providers/MailServiceProvider.php(31): Illuminate\\Foundation\\Application->make()
#8 /var/www/invoice-ninja/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): App\\Providers\\MailServiceProvider->boot()
#9 /var/www/invoice-ninja/vendor/laravel/framework/src/Illuminate/Container/Util.php(40): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#10 /var/www/invoice-ninja/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure()
#11 /var/www/invoice-ninja/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\\Container\\BoundMethod::callBoundMethod()
#12 /var/www/invoice-ninja/vendor/laravel/framework/src/Illuminate/Container/Container.php(651): Illuminate\\Container\\BoundMethod::call()
#13 /var/www/invoice-ninja/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(914): Illuminate\\Container\\Container->call()
#14 /var/www/invoice-ninja/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(895): Illuminate\\Foundation\\Application->bootProvider()
#15 [internal function]: Illuminate\\Foundation\\Application->Illuminate\\Foundation\\{closure}()
#16 /var/www/invoice-ninja/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(896): array_walk()
#17 /var/www/invoice-ninja/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/BootProviders.php(17): Illuminate\\Foundation\\Application->boot()
#18 /var/www/invoice-ninja/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(237): Illuminate\\Foundation\\Bootstrap\\BootProviders->bootstrap()
#19 /var/www/invoice-ninja/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(152): Illuminate\\Foundation\\Application->bootstrapWith()
#20 /var/www/invoice-ninja/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(136): Illuminate\\Foundation\\Http\\Kernel->bootstrap()
#21 /var/www/invoice-ninja/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(110): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter()
#22 /var/www/invoice-ninja/public/index.php(57): Illuminate\\Foundation\\Http\\Kernel->handle()
#23 {main}
"}.

Thank you
Br,
Dali

Thanks, this may help:

https://invoiceninja.github.io/docs/self-host-troubleshooting/#unresolvable-dependency-resolving-parameter-0-array-options-in-c

Hi Hillel:

You are refering to mysql, not PHP?

I uncomment the and changed the line
max_allowed_packet=1024M
in
/etc/mysql/mysql.conf.d/mysqld.cnf

restart the mysql server.

Nothing changed.

Br,
Dali

From the docs…

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

When changes are made to the container this can causes the cache to become stale in the application preventing it from booting.

The solution is to clear the contents of the folder bootstrap/cache, by either manually deleting files or by running /update?secret= which will also delete the contents of this directory.

Hi Hillel.

Doesn’t seem to be working.

http://192.168.6.16/update?secret=
500

If I manually delete contents of bootstrap/cache the browser will show a blank page.

Laravel.log shows the same error.

Br,
Dali

@david do you have any thoughts?

@kdiamond,

Which file did you use to update at the app? It looks like the composer dependencies are not there.

You’ll want to overwrite your files with this one:

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

Then ensure all files are owned by the webuser and finally run /update

Yes I used the same download. Just did the whole procedure from the scratch.

v5.1.32-C44 works
v5.3 does not.

I replaced all files except .env and applied folder permissions afterwards:
sudo chmod -R 755 /var/www/invoice-ninja/storage/
sudo chown www-data:www-data /var/www/invoice-ninja/ -R

Even if I replace .env (as fresh installation) it will not work. That’s strange.

Br,
Dali