Best Way to migrate to V5

@ben I was set to clean, and was migrated to plain.

Thanks for the feedback, this is a really great point. I’ll have a look at this and let you know.

Cheers :+1:

@david

I had to reset my V5 installation, as i was not able to login at all after upgrading to 5.0.39.
I used this command:
php artisan migrate:fresh --seed

Then ran the setup and initiated the migration again from v4 (upgraded to the latest as well) all migration happened successfully with no issues, however i have the follwing:

  • The additional users in the V4, i can not edit this at all, i am getting the grey blank screen when i try to edit. Also i only can see the Dashboard/Reports/ and Settings when i login with the additional user.
  • I am getting the following error when i try to open pdf invoice:
    [2020-12-23 22:16:18] production.ERROR: Class ‘Beganovich\Snappdf\Snappdf’ not found {“userId”:1,“exception”:"[object] (Error(code: 0): Class ‘Beganovich\Snappdf\Snappdf’ not found at /var/www/html/ninja5/app/Utils/Traits/Pdf/PdfMaker.php:30)

@hillel tag for edit user

@ben tag for snap

@gerootech you’ll need to run the following command

vendor/bin/snappdf download

this will download the chrome package for you.

@david
The command couldn’t be found in vendor/bin folder.

@gerootech you may need to run composer update to bring in the package.

@david, thanks this fixed it.

another note though, when i am using https to view access my invoiceninja v5 and try to view the pdf invoice i get the following error in my browser console:

main.dart.js?v=5.0.39:68567 Mixed Content: The page at ‘https://in5.ghf.loc/#/’ was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint ‘http://in5.ghf.loc/client/invoice/k8RLqIABP9RSiN2c1tOupfPferJD7AQGQFXAiCvUklwEOmSuhNMG3bR7iy2JsduW/download’. This request has been blocked; the content must be served over HTTPS.

i cannot view it unless i use http instead.

When logged in as the primary user is the second user shown as an admin on Settings > User Management?

When i log in with the primary user, i can see the user under settings, user management, but i cannot tel of it is admin or not.

When i try to edit the user it shows blank grey page.

Thanks, I see the same error. We’ll work on a fix.

@david and @hillel

I am trying to upgrade through the gui to the v5.0.40 from 5.0.39 but it is failing and i am getting the following error:
[2020-12-24 19:11:35] production.INFO: Are there changes to pull? 1
[2020-12-24 19:11:41] production.INFO: Command 'git pull ’ failed (exit-code 1).

@gerootech

This sounds like permissions may have changed in your repository.

from the command like try this

sudo -u www-data git pull

This will give you more information on why the update command couldn’t run.

@david
I got the following:

error: insufficient permission for adding an object to repository database .git/objects
fatal: failed to write object
fatal: unpack-objects failed

so i ran chown -R www-data on the ninja v5 folder

then i tried to do udpate from the gui again. I tells me that the update is successful but still getting the warning that there is a new version.

when i do the git pull through the command line now i get the following:

Updating 28e4a00644…8e8f84d069
error: Your local changes to the following files would be overwritten by merge:
composer.lock
Please commit your changes or stash them before you merge.
Aborting

this has probably happened due to the previous composer update you ran… try the following

sudo -u www-data git stash
sudo -u www-data git pull
sudo -u composer install --no-dev

this did the update, but still gui says i am on v5.0.39, no matter what browser i am using, so it is not caching. and i cleared the browser history and still the same.

when i cat VERSION, it gives me 5.0.40, and when i try sudo -u www-data git pull says i am all up to date.

There is a daily cron which checks the version number, it sounds like it just hasn’t run yet.

@hillel,

i can see now in 5.0.41 the user issue is fixed. Thanks, now i am able to edit my user and assigned admin rights.

Was wondering, what new pdf generation that is included in 5.0.41 ??

Also i did new migration from v4.5.25 to 5.0.41 and all invoices migrated as DRAFT invoices.

Great, glad to hear it!

The new PDF renderer uses headless Chrome and is much faster.

We plan to release a new v4 today with a fix.

I just tried 4.5.26, and still got the invoices as draft as well

I believe this may also require a fix in v5, please retest with the next release.

Thanks again for your patience, I think we’re close…