JSON Migration Error from V4 to V5

I exported the JSON file from V4, named it backup.JSON, compressed it to backup.zip and when importing both data and settings in V5 I get this error:

500: Path '/app_version' was not found in json stream.

If I skip doing the settings and choose only to import the data I get the message
successfully started import

But the import never seems to happen. When I try
sudo -u www-data php ./artisan migrate
it returns
Nothing to migrate.
I do have debug turned on in my .env and have run sudo -u www-data php ./artisan optimize after each change to see if that would help and so far nothing.

Hi,

The v4 and v5 JSON files aren’t compatible. to transfer your data you need to use the migration option in the v4 app on Settings > Account Management.

1 Like

That makes sense, the next issues is when doing that I get a server 500 error and this is in the laravel-error.log

022-03-10T10:42:06.243382+00:00] production.ERROR: ***Symfony\Component\Debug\Exception\FatalErrorException*** [1] : /var/www/invoiceninja-master/app/Http/Controllers/Migration/StepsController.php [Line 447] => Allowed memory size of 536870912 bytes exhausted (tried to allocate 75685020 bytes)  {"conβ”‚
β”‚[2022-03-10T10:42:06.245152+00:00] production.ERROR: [stacktrace] 2022-03-10 10:42:06 Allowed memory size of 536870912 bytes exhausted (tried to allocate 75685020 bytes): #0 {main}    {"context":"PHP","user_id":1,"account_id":1,"user_name":"Tom Lawrence","method":"POST","user_agent":"Mozilla/5.0 (X11; β”‚

I think I need to do some php memory limit increases. For context we have over 7,000 clients and 27,000 invoices in V4.

Yes, most likely. It should help to increase the limit in the php.info file.

Note: with so many clients it may be worth waiting for the v5.4 beta to change over if you plan to mainly use the web app.

1 Like

Ok, I will wait to the new 5.4 version to put it in production. But I will do the php limit increases for now so I am ready when the 5.4 comes out. Also I want to do some testing with the V5 before we put it in production.

Sounds good, happy to help if you have any questions getting setup.