V5 Migration failing

I am trying to migrate from v4 to v5. I have gone through the help files on the site and followed all of the checks at the bottom of the migration page. I am on v5.1.48-C46 and v4.5.38.

I can successfully get through the page where i put in my username and password. When I click continue, I immediately get “Whoops, looks like something went wrong.”

The apps are on 2 different servers hosted in Azure, both Ubuntu. The only thing I see in the log is this:

[2021-04-21 13:08:05] production.ERROR: Symfony\Component\Debug\Exception\FatalThrowableError [0] : /var/www/html/ninja/app/Http/Controllers/Migration/StepsController.php [Line 267] => Class ‘ZipArchive’ not found {“context”:“PHP”,“user_id”:1,“account_id”:1,“user_name”:“Chris Hawver”,“method”:“POST”,“user_agent”:“Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.72 Safari/537.36”,“locale”:“en”,“ip”:"*****",“count”:5,“is_console”:“no”,“is_api”:“no”,“db_server”:“mysql”,“url”:“migration/companies”} []

I am not a coder so I was trying to figure out this error. I see that it can’t find the Zip archive, probably because it wasn’t created when I went through the migration wizard. I have checked permissions on the html folder as well and they are all owned by www-data.

Hi,

@david, do you have any thoughts?

Nothing yet huh? It’s so weird. If I can’t get this to work, is there another way for me to upgrade?

It looks like you may not have the PHP zip package installed.

I had a similar issue when trying to install on an old ubuntu version which doesn’t support the zip package for later PHP versions.

That should throw up an error though rather than just getting a whoops.

What operating system and version are you using and which PHP version?

I am on Ubunutu 18.04.5 and PHP version 7.2.24 for the version 4 server and 20.04.2 and php 7.4 for the new version 5 server.

You need at least php 7.3 to run V5 Free Open-Source Invoicing, Expenses & Time-Tracking | Invoice Ninja

I am on 7.4 on my version 5 server and Ubuntu 20.04.2. So do I need to upgrade my version 4 server to 7.3 and try to upgrade again? They are separate servers.

have you run composer install --no-dev on your V4 installation?

That helped. What I found was that I was missing the php zip extension which makes sense as to why it couldn’t create the file. Working on the migration now. Will follow up. Thank you!

Thank you @david and @hillel, That was my issue. Migration worked after that. I am all setup and good.

Thanks again!

2 Likes