Error Upgrading from Web Interface

Hi I am trying to upgrade from the web interface, i am currently 5.3.79 and trying to upgrade to 5.3.82.

getting the following error:
FormatException: SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data

I cannot find any related logs in laravel.log file or apache error logs.

Hi,

It should help to copy over the latest release zip.

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

@david any thoughts?

Will try this, I think i am getting the following error in apache error logs

Allowed memory size of 134217728 bytes exhausted (tried to allocate 32768 bytes) in /var/www/html/ninja5/vendor/symfony/error-handler/Error/FatalError.php on line 1, referer: https://in5.ghf.loc/

it happens each time i try to upgrade.

@hillel

When i replace the whole directory, i get a white page when i try to browse to invoice ninja website and getting this error in the apache log file

[Sat Apr 23 12:04:07.284242 2022] [php7:error] [pid 1702] [client 10.1.1.70:60712] PHP Fatal error: Uncaught ReflectionException: Class translator does not exist in /var/www/html/ninja5/vendor/laravel/framework/src/Illuminate/Container/Container.php:877\nStack trace:\n#0 /var/www/html/ninja5/vendor/laravel/framework/src/Illuminate/Container/Container.php(877): ReflectionClass->__construct()\n#1 /var/www/html/ninja5/vendor/laravel/framework/src/Illuminate/Container/Container.php(758): Illuminate\Container\Container->build()\n#2 /var/www/html/ninja5/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(851): Illuminate\Container\Container->resolve()\n#3 /var/www/html/ninja5/vendor/laravel/framework/src/Illuminate/Container/Container.php(694): Illuminate\Foundation\Application->resolve()\n#4 /var/www/html/ninja5/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(836): Illuminate\Container\Container->make()\n#5 /var/www/html/ninja5/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php(119): Illuminate\Foundation\Application->make()\n#6 /var/www/html/ninja5/vendor/laravel/framework/ in /var/www/html/ninja5/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 879

Note that I am on PHP 7.4

It may help to delete the bootstrap/cache folder

didn’t help, and i am getting the following error in the laravel.log file:

[2022-04-23 18:09:02] production.ERROR: Class ‘Former\FormerServiceProvider’ not found {“exception”:"[object] (Error(code: 0): Class ‘Former\FormerServiceProvider’ not found at /var/www/html/ninja5/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:745)
[stacktrace]
#0 /var/www/html/ninja5/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(679): Illuminate\Foundation\Application->resolveProvider()
#1 /var/www/html/ninja5/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php(75): Illuminate\Foundation\Application->register()
#2 /var/www/html/ninja5/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(659): Illuminate\Foundation\ProviderRepository->load()
#3 /var/www/html/ninja5/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/RegisterProviders.php(17): Illuminate\Foundation\Application->registerConfiguredProviders()
#4 /var/www/html/ninja5/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(237): Illuminate\Foundation\Bootstrap\RegisterProviders->bootstrap()
#5 /var/www/html/ninja5/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(310): Illuminate\Foundation\Application->bootstrapWith()
#6 /var/www/html/ninja5/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(127): Illuminate\Foundation\Console\Kernel->bootstrap()
#7 /var/www/html/ninja5/artisan(37): Illuminate\Foundation\Console\Kernel->handle()
#8 {main}
"}

If you have SSH access to the server it may help to run composer install

Didn’t fix the issue, and i was getting the folliwng :slight_smile:
38/47 [======================>-----] 80% Skipped installation of bin bin/openapi for package zircote/swagger-php: name conflicts with an existing file
45/47 [==========================>-] 95% Skipped installation of bin php-cs-fixer for package friendsofphp/php-cs-fixer: name conflicts with an existing file
Package swiftmailer/swiftmailer is abandoned, you should avoid using it. Use symfony/mailer instead.
Generating optimized autoload files
Class Razorpay\Tests\RegisterNachTest located in ./vendor/razorpay/razorpay/tests/registerNachtest.php does not comply with psr-4 autoloading standard. Skipping.
Class Razorpay\Tests\RegisterEmandateTest located in ./vendor/razorpay/razorpay/tests/registerEmandateTest.php does not comply with psr-4 autoloading standard. Skipping.
Class Razorpay\Tests\SignatureVerificationTest located in ./vendor/razorpay/razorpay/tests/signatureVerificationTest.php does not comply with psr-4 autoloading standard. Skipping.
Class Razorpay\Tests\RefundTest located in ./vendor/razorpay/razorpay/tests/refundTest.php does not comply with psr-4 autoloading standard. Skipping.
Class Razorpay\Tests\SettlementTest located in ./vendor/razorpay/razorpay/tests/settlementTest.php does not comply with psr-4 autoloading standard. Skipping.
Class Razorpay\Tests\QrCodeTest located in ./vendor/razorpay/razorpay/tests/qrCodeTest.php does not comply with psr-4 autoloading standard. Skipping.
Class Razorpay\Tests\PaperNachTest located in ./vendor/razorpay/razorpay/tests/paperNachTest.php does not comply with psr-4 autoloading standard. Skipping.
Class Razorpay\Tests\PlanTest located in ./vendor/razorpay/razorpay/tests/planTest.php does not comply with psr-4 autoloading standard. Skipping.
Class Razorpay\Tests\VirtualAccountTest located in ./vendor/razorpay/razorpay/tests/virtualAccountTest.php does not comply with psr-4 autoloading standard. Skipping.
Class Razorpay\Tests\PaymentLinkTest located in ./vendor/razorpay/razorpay/tests/paymentLinkTest.php does not comply with psr-4 autoloading standard. Skipping.
Class Razorpay\Tests\PaymentTest located in ./vendor/razorpay/razorpay/tests/paymentTest.php does not comply with psr-4 autoloading standard. Skipping.

Illuminate\Foundation\ComposerScripts::postAutoloadDump
@php artisan package:discover --ansi

In Container.php line 879:

Target class [db] does not exist.

In Container.php line 877:

Class db does not exist

113 packages you are using are looking for funding.
Use the composer fund command to find out more!

if [ “${IS_DOCKER:-false}” != “true” ]; then vendor/bin/snappdf download; fi
Chromium binary already downloaded. Provide --force to download again.

Does running php artisan optimize help?

no, i get this error:

In Container.php line 879:

Target class [db] does not exist.

In Container.php line 877:

Class db does not exist

Try running php artisan migrate and then optimize

same error when i ran php artisan migrate:

In Container.php line 879:

Target class [db] does not exist.

In Container.php line 877:

Class db does not exist

Sorry, I think we’ll need to wait for @david

One strange thing above which may be related, you shouldn’t have needed to run composer install. If you copy over the files using the release zip the vendor folder should already include the third-party packages.

Thanks @hillel will wait for @david and see. I have snapshot that i can revert to, but will try to get this fixed first.

@gerootech

After copying over the 5.3.82 release file, please delete the contents of bootstrap/cache/*

this should resolve the issue.

Thanks David,

When @hillel told me this, i delete the whole folder by mistake, just created the folder again and it started working right away

@david and @hillel
what would be the best way to upgrade after copying the whole folder this time ?

is it through the web interface or the git pull command ?

@gerootech

I would suggest trying the inapp upgrader as it has all the post upgrade functionality built in.

1 Like

@david
updating from the mac desktop app didn’t work and getting the following error:

FormatException: Unexpected end of input (at character 1)

^

however worked from my browser with no issues. Thought to give you an update.

@hillel any thoughts by the mac app would trigger a different response to the web app?