Connection.php line 571

Version ie <v5.10.30>

Invoice Ninja 5.10?
mariadb:10.4

Environment <Docker/Shared Hosting/Zip/Other>

Docker - Caprover

Describe the bug

Login to desktop app would not work.
Connection.php line 571 claiming duplication which could not be found.

Steps To Reproduce

Login to desktop app would not work.
Connection.php line 571
Install new instance running the latest InvoiceNinja.
Try various database backups.
All result in ‘Connection.php line 571’ but vary in file cause

Rollback to InvoiceNinja V 5.9
Works!

Expected Behavior

InvoiceNinja works correctly on latest version.

Additional context

Logs

In Connection.php line 825:
2024-10-12T07:12:58.867739895Z
2024-10-12T07:12:58.867744675Z SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name ‘sync’ (
2024-10-12T07:12:58.867748602Z Connection: mysql, SQL: alter table clients add sync text null)
2024-10-12T07:12:58.867752363Z
2024-10-12T07:12:58.867756122Z
2024-10-12T07:12:58.867859856Z In Connection.php line 571:
2024-10-12T07:12:58.867873398Z
2024-10-12T07:12:58.867877244Z SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name ‘sync’

Hi,

It looks like the database migration is failing, you’ll need to comment out the parts of the migration which have already been run and then run php artisan migrate.

Thanks Hillel.
Can you point to any info on how to do these things you mentioned?
Cheers.

nb. I am not familiar with how to do this - particularly with Docker.
I thought as an alternative, now that I can login to v9, that I would use the export function of csv, start a new instance of InvoiceNinja and import the csv files.
Would this be a solution?

Thanks

What do you see when you run php artisan migrate

php artisan migrate
Command 'php' not found, but can be installed with:
apt install php8.1-cli  # version 8.1.2-1ubuntu2.18, or
apt install php-cli     # version 2:8.1+92ubuntu1

This is after I ssh in to the server. Do I need to exec into a shell for the Invoice Ninja docker container before I run the command though?
I will need to research on how to do so first.

Hmm… I’d expect PHP to already be installed, I suggest creating a discussion on GitHub to follow up.

I tired a clean install. I could not install any 5.10 version in Caprover (Docker)
I could install 5.9.9 - but could not upgrade from there.

I get this when attempting version 5.10.0

Failed: Error: {"message":"manifest for invoiceninja/invoiceninja:5.10.0 not found: manifest unknown: manifest unknown"} manifest for invoiceninja/invoiceninja:5.10.0 not found: manifest unknown: manifest unknown

I am able to install 5.9.9. I am not able to upgrade from the 5.9 series. Breaking changes with 5.10 and Caprover configuration?
`Build started for account-app
An explicit image name was provided (5.10.0). Therefore, no build process is needed.
Pulling this image: 5.10.0 This process might take a few minutes.
Build has failed!

Deploy failed!
Error: (HTTP code 404) unexpected - pull access denied for 5.10.0, repository does not exist or may require ‘docker login’: denied: requested access to the resource is denied`

Are you able to try with the latest version: v5.10.43

I originally tired v5.10.43 as a fresh install with Caprover/docker. This failed.
I then installed v5.9.9 and tried to unsuccessfully upgrade.
The Caprover install method pointed to github but,
after getting the pull tag from dockerhub instead I was able to uprgrade from 5.9.9 to v5.10.43.

I now have another issue!
I exported all the csv files from the borked upgrade that I am attempting to replace.
The new version does not have the same import process however.
This is what I was expecting:


This is what I got in 5.10.43:

I could install clients - but even then it split one entry in two!
I could install invoices - but they are all blank!

Is there a way to get the missing info in?
Should I blow away this install, go for an earlier version with the same import format, import the csv files, then upgrade??

Thanks,

If you’re transferring from one selfhost install to another we recommend using mysqldump. If that isn’t an option then you’ll want to use the JSON import/export.

Note: the screenshots are comparing the original Flutter web interface with the new React web interface. The original interface is still available as a desktop app.

Ok, thanks.
I had previously attempted a new install and mapped back the storage and mariadb. This did not work, hence the csv file attempt.
Ok, so if I log out of the desktop app (from the old install) and login to the new install I should see the same options?
I will give that a try!

Nice! The json method works!
The new version looks amazing and is so much more responsive! Incredible!
Well done everyone at Invoicninja!
Thanks Hillel!

1 Like

Glad to hear it, thanks for the update!