[SOLVED] Trying to Migrate to Docker v5, no such file

I am attempting to migrate from 4.5.33 to V5 with docker.

I have a fresh install of Docker, with the username and password the same as in V4.

I have run sudo chown -R 1500:1500 ./INVOICENINJA/ to ensure the permissions for storage and app should be correct.

The migration lets me go all the way to companies page, but when I click continue, I get an error page.

Here’s a snippet:

ZipArchive::close(): Failure to create temporary file: No such file or directory

in StepsController.php line 262

at HandleExceptions->handleError(2, ‘ZipArchive::close(): Failure to create temporary file: No such file or directory’, '/var/www/html/invoiceninja/app/Http/Controllers/Migration/StepsController.php

Is there a permission (possibly in the app docker) that needs to be tweaked?

@david, @ben any ideas?

@cwesterfield

The issue will be in your V4 docker container instance, the app is not able to write to the storage directory.

The v4 is a regular debian install. Let me check and see whats going on there.

Permissions looked fine. I got it to continue on by manually creating the migration folder.

mkdir storage/migrations
chown -R www-data:www-data storage/

After that it worked!

2 Likes

Hi there ,
I have the same error message, migrating from 4.5.34 to v5.1.14.
invoice-ninja/app/Http/Controllers/Migration/StepsController.php [Line 262] => ZipArchive::close(): Failure to create temporary

both instances are on ubuntu (v4 is on 18.04 and v5 is on 20.04)

no ssl issues either.
I used the commands that worked for [cwesterfield] but didn’t make any difference for me.
End up with “Whoops, looks like something went wrong.” message on the browser and
production.ERROR: ErrorException [0] : /var/www/invoice-ninja/app/Http/Controllers/Migration/StepsController.php [Line 262] => ZipArchive::close(): Failure to create temporary file: No such file or directory {“context”:“PHP”,“user_id”:1,“account_id”:1,“user_name”:…“is_api”:“no”,“db_server”:“mysql”,“url”:"migration/companies

any advice?

Thank you

UPDATE: I ran the commands on both servers and the migration started. I got the following message.

Welcome to the new version of Invoice Ninja

Migration has started. We’ll update you with status, on your company e-mail.

I haven’t received any emails yet, how do I make sure that the migration is working?
I am no longer able to log in to the v5 instance at this point. (XMLHttpRequest error.)
where does it go from here?
Thank you

OK, though the email never arrived, I was able to log in to the v5 instance and it seems to be working.

thank you