[cloudron] Migration from 4.5.45 to 5.3.44 fails: "payment_terms is not a valid string ( 30 )"

Hi everybody,

As I am starting to pull my hair out now, I am seeking your help for the first time ever. I am a happy subscriber to InvoiceNinja whitelabeling for 2 years now.

I am self-hosting InvoiceNinja via cloudron, which means that the newest v4 available to me is 4.5.45 (newest v5 is 5.3.44).
My login credentials match on both installs. Two additional (archived) accounts exist on v4.
I intent to migrate from v4 to v5 using the supplied step-by-step guide.

After starting the migration process on my v4 instance “successfully”, I get this e-mail seconds later:

Migration failed
Looks like something went wrong with the migration for the following company: Untitled Company
{“settings”:[“payment_terms is not a valid string ( 30 )”]}
{“settings”:[“payment_terms is not a valid string ( 30 )”]}

Two things seem fishy to me:

  1. My company certainly is not called “Untitled Company” - in neither installs.
  2. ‘30’ should be a valid string - better yet, there aren´t any options to choose from at */settings/payment_terms, but there are plenty to choose from at */settings/company_details:

Looking at the logs, migration starts, but halts after

[xxx] development.INFO: Importing account
[xxx] development.INFO: Importing company

I have uninstalled the v5 install many times and started over, in fear of migrating on to a broken import. But to no avail.

I am happy to provide further logs/info if necessary. Many thanks in advance!


You may want to reach out to Cloudron to see if they can update the v4 app, the latest version is 4.5.47.

@david do you have any suggestions?

Hi hillel, thank you for answering!

cloudron will not update their v4 packages anymore, it seems:

Thanks for sharing the post, I’ll reply

1 Like

Thank you (and nebulon!) for working together. They pushed out an update very quickly.

Sadly, my issue persists even after updating to v4.5.47.
It seems to be an issue isolated to my specific ‘payment_terms’ string. I can´t remember ever changing it manually.


I can recreate this. We will need to tag a new v4 release for this, in the mean time if you edit


and delete line 209

  'payment_terms' => $this->account->payment_terms ?: '',

The migration will run as expected.

Hey David,
that´s not possible, I´m afraid. Cloudron uses a read-only filesystem, so I can´t edit ‘GenerateMigrationResources.php’:

However, I am happy to wait for a new v4 release if a temporary fix is more cumbersome.

Invoice Ninja v5 5.3.48 fixes my issue (sort of).
I had to manually add every user, not just the initial user as suggested here. Otherwise the migration would fail with the following output:

SQLSTATE[HY000] [2002] No such file or directory (SQL: select exists(select * from users where (email = info@domain.tld)) as exists)
SQLSTATE[HY000] [2002] No such file or directory (SQL: select exists(select * from users where (email = info@domain.tld)) as exists)

Anyway, I can happily continue to use Invoice Ninja. Thank you all.

Thanks for letting us know!

cc @david