Importing JSON in pro plan dosn't work

Hi, after setting both my local self hosted Invoice Ninja and my pro plan to English, I exported to a JSON file and imported both data and settings to my pro plan, but it failed. I’ve tried to import data only or settings only with the same lack of success. The only message I get is “Please select a file” in a reddish line up the screen.
I’ve had no luck with the knowledge base or the forum.
I have custom fields, but I don’t think it is a problem, is it?
Is there anything I should double check or configure ? Thanks !

(By the way, I think import/export should be independent from language.)

CSV seems to work, but it seems like I can’t get all the data from it.

Hmmm… the language shouldn’t affect the JSON import/export.

If you’re transferring from self-host to hosted can you confirm the self host app is running the latest version.

About the language, I assumed it was sensitive because there’s a warning on the app’s import page (“use English”).
My local install is very close to the latest version, i.e. 4.5.xx. I’ll check tomorrow 'cause it’s past bedtime here.

Checked : self hosted is v.4.5.4. I don’t think such a minor difference in version should be a problem : I understand you can’t guarantee backward compatibility, but forward compatibility on a third digit version shouldn’t matter. Am I mistaken ?

I’m not sure… that said if the problem were due to a version mismatch I’d expect it to fail during the import, it sounds like you aren’t able to upload the JSON file itself. How large is the file, maybe it’s a size issue?

Yes it seems like no file was passed to the app. File is 2.4Mo. Nothing close to a big data problem. Maybe a timeout if your server is a bit too busy ?
I tried to create another account on my self hosted Invoice Ninja and to import the same file : it took a few minutes but it worked, so I don’t think the file is corrupted. I had about 30 error messages though :
“{“account_key”:“bbeqkrvxhdkk3mh85mbwpup1st3f3nit”,“is_owner”:true,“amount”:100,“transaction_reference”:”",“payment_date”:“2019-10-30”,“updated_at”:1572430401,“archived_at”:null,“is_deleted”:false,“payment_type_id”:1,“invoice_id”:236,“invoice_number”:“F201910347”,“private_notes”:"",“exchange_rate”:1,“exchange_currency_id”:0,“refunded”:0,“payment_status_id”:4,“type”:“payment”,“error”:“The client does not have enough credit.”}
After some investigation, it seems like I lost past/used and pending credits, creating this problem.

Any idea on one of these now two problems ? That’s quite annoying, I can’t use my pro plan if I can’t transfer the data safely.

I’m not sure about the first issue, maybe it’s related to the character encoding?

I believe the second issue is an open bug.

So what can I do ?

How can I transfer my data to my pro plan ? CSV doesn’t seem to be an option, as it can only transfer some fields, not all the data. I like the JSON process, because it’s complete (settings and all the data).

It raises another question : on a pro plan, I guess you have a backup system for the data we put in the app. But if I want to backup on my side using JSON and cannot use it, I don’t feel safe.

You’re right the second issue is #2075 bug for applied credits of may 2018 :
I can manually correct it because I only have 3 dozens of concerned invoices. I’m lucky I don’t have 3 hundreds.

Still I can’t import the JSON on my pro plan (first issue). Is there any workaround you could think of ?

Another option would be to use a third party site such as Zapier, Intergormat or Piesync to transfer the data.

I won’t, because I subscribed to the pro plan to simplify my tasks at the shop, not to spend hours searching how to use a third party app to transfert data from invoiceninja to invoiceninja.

I tried to change endlines or things of the kind to the files (dos2unix / unix2dos) with no success. I tried to export from the online version and import into the online version : no problem, even with applied credits (bug #2075 not reproduced here, that’s encouraging).

OKay, some new progress : updating my local app to v4.5.17 did no change, but exporting from online app and importing back again works perfectly fine, even for applied credits (no more bug #2075).

I think the problem is related to file size : my current failing JSON file is 2.5M, but a much smaller 20k JSON file makes it from my local app to the online one hands down !

Hillel : would you or someone of your crew check the file size limit for JSON import on pro plans please ?

I agree it seems like a server configuration issue, we’ll look into it…

Thank you, let me know when you think it’s ok, because I really need to transfer all this on my pro plan before Jan.1st.


Can you send us an email i’ll give you some instructions from there.