Migration old v4 install to v5 in TrueNAS Scale

Version ie <v5.10.30>

5.11.33

Environment <Docker/Shared Hosting/Zip/Other>

Docker (TrueNAS Scale App Catalog)

Checklist

Describe the bug

Migration from v4 fails, either creating an empty company when triggered from the v4 interface, or doing nothing when triggered with php artisan ninja:import --email=<MYEMAIL>.

Steps To Reproduce

  1. Find an old v4 Invoice Ninja Install with a bit of data in it (my migration.json is 716 KB)
  2. Update it as far as you can
  3. Set up a new v5 install in TrueNAS Scale
  4. Attempt to run the migration
  5. Observe an empty company appear in v5

Expected Behavior

Import completes successfully without issue.

Additional context

I’ve been trying to migrate my old v4 install to v5 for the past 3 days. I haven’t used it in quite a while, so it was very out of date, to the point that I couldn’t get it to run anymore on my Digital Ocean droplet. I spent some time figuring out how to get it up and running in a local Docker instance, and was able to get updated to alpine-4.5.35, but going any further was leading to PHP errors due to version mismatches, and attempting to fix these things on my own was going nowhere, so I’m stuck on 4.5.35.

When I run the migration process in v4, it does generate an export file, but on the v5 side, the import just creates a blank company and never finishes. I’ve also tried using php artisan ninja:import --email=<MYEMAIL> but while it says “Started processing: OmT9LMTZjoTTigFI3GH5qpOLnfcTAEp8-2025-02-02-invoiceninja.zip at 2025-02-02 16:55:00” (after I manually copied over the file), it doesn’t actually seem to get anywhere, never generating anything in the dashboard, with no errors output.

So at this point I’ve got my migration.json, and a clean install of v5, but no way to get the data in to v5. Any help would be greatly appreciated, I’m quite tired of fighting with this.

Screenshots

N / A

Logs

I don’t really see anything that appears very relevant, but here’s what I’ve got:

Laravel:

[2025-02-02 16:42:46] laravel.EMERGENCY: Unable to create configured logger. Using emergency logger. {"exception":"[object] (InvalidArgumentException(code: 0): Log [deprecations] is not defined. at /app/vendor/laravel/framework/src/Illuminate/Log/LogManager.php:232)
[stacktrace]
#0 /app/vendor/laravel/framework/src/Illuminate/Log/LogManager.php(139): Illuminate\\Log\\LogManager->resolve()
#1 /app/vendor/laravel/framework/src/Illuminate/Log/LogManager.php(126): Illuminate\\Log\\LogManager->get()
#2 /app/vendor/laravel/framework/src/Illuminate/Log/LogManager.php(115): Illuminate\\Log\\LogManager->driver()
#3 /app/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(109): Illuminate\\Log\\LogManager->channel()
#4 /app/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(78): Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleDeprecationError()
#5 /app/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(290): Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleError()
#6 [internal function]: Illuminate\\Foundation\\Bootstrap\\HandleExceptions->Illuminate\\Foundation\\Bootstrap\\{closure}()
#7 /app/app/Utils/Traits/SettingsSaver.php(62): strlen()
#8 /app/app/Http/ValidationRules/ValidSettingsRule.php(33): App\\Http\\ValidationRules\\ValidSettingsRule->validateSettings()
#9 /app/vendor/laravel/framework/src/Illuminate/Validation/Validator.php(885): App\\Http\\ValidationRules\\ValidSettingsRule->passes()
#10 /app/vendor/laravel/framework/src/Illuminate/Validation/Validator.php(674): Illuminate\\Validation\\Validator->validateUsingCustomRule()
#11 /app/vendor/laravel/framework/src/Illuminate/Validation/Validator.php(477): Illuminate\\Validation\\Validator->validateAttribute()
#12 /app/vendor/laravel/framework/src/Illuminate/Validation/Validator.php(512): Illuminate\\Validation\\Validator->passes()
#13 /app/vendor/laravel/framework/src/Illuminate/Validation/ValidatesWhenResolvedTrait.php(31): Illuminate\\Validation\\Validator->fails()
#14 /app/vendor/laravel/framework/src/Illuminate/Foundation/Providers/FormRequestServiceProvider.php(30): Illuminate\\Foundation\\Http\\FormRequest->validateResolved()
#15 /app/vendor/laravel/framework/src/Illuminate/Container/Container.php(1417): Illuminate\\Foundation\\Providers\\FormRequestServiceProvider->Illuminate\\Foundation\\Providers\\{closure}()
#16 /app/vendor/laravel/framework/src/Illuminate/Container/Container.php(1353): Illuminate\\Container\\Container->fireCallbackArray()
#17 /app/vendor/laravel/framework/src/Illuminate/Container/Container.php(1339): Illuminate\\Container\\Container->fireAfterResolvingCallbacks()
#18 /app/vendor/laravel/framework/src/Illuminate/Container/Container.php(837): Illuminate\\Container\\Container->fireResolvingCallbacks()
#19 /app/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1051): Illuminate\\Container\\Container->resolve()
#20 /app/vendor/laravel/framework/src/Illuminate/Container/Container.php(755): Illuminate\\Foundation\\Application->resolve()
#21 /app/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1033): Illuminate\\Container\\Container->make()
#22 /app/vendor/laravel/framework/src/Illuminate/Routing/ResolvesRouteDependencies.php(92): Illuminate\\Foundation\\Application->make()
#23 /app/vendor/laravel/framework/src/Illuminate/Routing/ResolvesRouteDependencies.php(51): Illuminate\\Routing\\ControllerDispatcher->transformDependency()
#24 /app/vendor/laravel/framework/src/Illuminate/Routing/ResolvesRouteDependencies.php(30): Illuminate\\Routing\\ControllerDispatcher->resolveMethodDependencies()
#25 /app/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(60): Illuminate\\Routing\\ControllerDispatcher->resolveClassMethodDependencies()
#26 /app/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(41): Illuminate\\Routing\\ControllerDispatcher->resolveParameters()
#27 /app/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Tracing/Routing/TracingControllerDispatcherTracing.php(21): Illuminate\\Routing\\ControllerDispatcher->dispatch()
#28 /app/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Tracing/Routing/TracingRoutingDispatcher.php(18): Sentry\\Laravel\\Tracing\\Routing\\TracingControllerDispatcherTracing->Sentry\\Laravel\\Tracing\\Routing\\{closure}()
#29 /app/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Tracing/Routing/TracingControllerDispatcherTracing.php(20): Sentry\\Laravel\\Tracing\\Routing\\TracingRoutingDispatcher->wrapRouteDispatch()
#30 /app/vendor/laravel/framework/src/Illuminate/Routing/Route.php(266): Sentry\\Laravel\\Tracing\\Routing\\TracingControllerDispatcherTracing->dispatch()
#31 /app/vendor/laravel/framework/src/Illuminate/Routing/Route.php(212): Illuminate\\Routing\\Route->runController()
#32 /app/vendor/laravel/framework/src/Illuminate/Routing/Router.php(808): Illuminate\\Routing\\Route->run()
#33 /app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(170): Illuminate\\Routing\\Router->Illuminate\\Routing\\{closure}()
#34 /app/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php(124): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#35 /app/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php(89): Illuminate\\Routing\\Middleware\\ThrottleRequests->handleRequestUsingNamedLimiter()
#36 /app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): Illuminate\\Routing\\Middleware\\ThrottleRequests->handle()
#37 /app/app/Http/Middleware/QueryLogging.php(39): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#38 /app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): App\\Http\\Middleware\\QueryLogging->handle()
#39 /app/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(51): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#40 /app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): Illuminate\\Routing\\Middleware\\SubstituteBindings->handle()
#41 /app/app/Http/Middleware/Locale.php(94): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#42 /app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): App\\Http\\Middleware\\Locale->handle()
#43 /app/app/Http/Middleware/TokenAuth.php(102): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#44 /app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): App\\Http\\Middleware\\TokenAuth->handle()
#45 /app/app/Http/Middleware/SetDb.php(40): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#46 /app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): App\\Http\\Middleware\\SetDb->handle()
#47 /app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(127): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#48 /app/vendor/laravel/framework/src/Illuminate/Routing/Router.php(807): Illuminate\\Pipeline\\Pipeline->then()
#49 /app/vendor/laravel/framework/src/Illuminate/Routing/Router.php(786): Illuminate\\Routing\\Router->runRouteWithinStack()
#50 /app/vendor/laravel/framework/src/Illuminate/Routing/Router.php(750): Illuminate\\Routing\\Router->runRoute()
#51 /app/vendor/laravel/framework/src/Illuminate/Routing/Router.php(739): Illuminate\\Routing\\Router->dispatchToRoute()
#52 /app/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(201): Illuminate\\Routing\\Router->dispatch()
#53 /app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(170): Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}()
#54 /app/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Http/FlushEventsMiddleware.php(13): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#55 /app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): Sentry\\Laravel\\Http\\FlushEventsMiddleware->handle()
#56 /app/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Http/SetRequestIpMiddleware.php(45): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#57 /app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): Sentry\\Laravel\\Http\\SetRequestIpMiddleware->handle()
#58 /app/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Http/SetRequestMiddleware.php(31): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#59 /app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): Sentry\\Laravel\\Http\\SetRequestMiddleware->handle()
#60 /app/vendor/livewire/livewire/src/Features/SupportDisablingBackButtonCache/DisableBackButtonCacheMiddleware.php(19): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#61 /app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): Livewire\\Features\\SupportDisablingBackButtonCache\\DisableBackButtonCacheMiddleware->handle()
#62 /app/app/Http/Middleware/Cors.php(24): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#63 /app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): App\\Http\\Middleware\\Cors->handle()
#64 /app/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php(58): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#65 /app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): Illuminate\\Http\\Middleware\\TrustProxies->handle()
#66 /app/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#67 /app/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php(31): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle()
#68 /app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull->handle()
#69 /app/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#70 /app/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php(51): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle()
#71 /app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): Illuminate\\Foundation\\Http\\Middleware\\TrimStrings->handle()
#72 /app/vendor/laravel/framework/src/Illuminate/Http/Middleware/ValidatePostSize.php(27): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#73 /app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): Illuminate\\Http\\Middleware\\ValidatePostSize->handle()
#74 /app/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(110): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#75 /app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance->handle()
#76 /app/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Tracing/Middleware.php(79): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#77 /app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(209): Sentry\\Laravel\\Tracing\\Middleware->handle()
#78 /app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(127): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#79 /app/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(176): Illuminate\\Pipeline\\Pipeline->then()
#80 /app/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(145): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter()
#81 /app/vendor/laravel/octane/src/ApplicationGateway.php(36): Illuminate\\Foundation\\Http\\Kernel->handle()
#82 /app/vendor/laravel/octane/src/Worker.php(84): Laravel\\Octane\\ApplicationGateway->handle()
#83 /app/vendor/laravel/octane/bin/frankenphp-worker.php(53): Laravel\\Octane\\Worker->handle()
#84 [internal function]: {closure}()
#85 /app/vendor/laravel/octane/bin/frankenphp-worker.php(74): frankenphp_handle_request()
#86 /app/public/frankenphp-worker.php(7): require('...')
#87 {main}
"}

Otherwise in my TrueNAS logs for Invoice Ninja, I do see this…

2025-02-02 16:42:00.972725+00:00{"level":"error","ts":1738514520.9674313,"msg":"write error","error":"write tcp 172.16.5.4:31105->192.168.86.46:49419: write: broken pipe"}

Could that be anything?

Hi,

You’ll need to update to v4.5.50 for the migration to work. You may want to setup a clean v4 install, copy over your current database and then run the migration.

The problem I’ve had with the latest v4.5 is that when I try to spin up a Docker image, it throws errors saying that dependencies require PHP 7.4+, but the image has 7.3 installed. I’ve tried fixing this by copying the Dockerfile and making adjustments, but it’s just one thing after another trying to get it to work. I’m on the latest version that I’ve been able to get running.

Is there some formatting difference between the migration.json in the latest version? If someone could provide me an example, I can just fix the JSON formatting by hand and run the migration with php artisan ninja:old-import; it seems like almost works, but it fails.

I’m just tired of trying to get v4.5.50 up and running. I can try again tomorrow but after fighting with it for 6 hours I was hoping I could just do it from the version I’m on.

I suggest trying the non-docker version

The v4/v5 JSON files are very different

I understand that, but I’m talking about the file that gets generated during the migration process, not an export file.

Per your guidance, I’m now trying to get 4.5.50 running locally, but of course this is just as much of a pain as the Docker method, because it’s so old.

I’ve got php7.4 installed, and of course I have to download the zip from GitHub because the old download URL doesn’t work, which requires me to install the compose libraries. So I try with, but I get this error:

sudo -u www-data php7.4 /usr/local/bin/composer install

...

[codeception/c3] c3.php is already up-to-date
> rm bootstrap/cache/compiled.php || true
rm: cannot remove 'bootstrap/cache/compiled.php': No such file or directory
> php artisan view:clear
PHP Fatal error:  During inheritance of ArrayAccess: Uncaught ErrorException: Return type of Illuminate\Support\Collection::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/ninja.localhost/public_html/vendor/laravel/framework/src/Illuminate/Support/Collection.php:1277
Stack trace:
#0 /var/www/ninja.localhost/public_html/vendor/laravel/framework/src/Illuminate/Support/Collection.php(11): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError()
#1 /var/www/ninja.localhost/public_html/vendor/composer/ClassLoader.php(576): include('...')
#2 /var/www/ninja.localhost/public_html/vendor/composer/ClassLoader.php(427): Composer\Autoload\{closure}()
#3 /var/www/ninja.localhost/public_html/vendor/laravel/framework/src/Illuminate/Support/helpers.php(109): Composer\Autoload\ClassLoader->loadClass()
#4 /var/www/ninja.localhost/public_html/vendor/laravel/framework/src/Illuminate/Foundation/PackageManifest.php(89): collect()
#5 /var/www/ninja.localhost/public_html/vendor/laravel/framework/src/Illuminate/Foundation/PackageManifest.php(78): Illuminate\Foundation\PackageManifest->config()
#6 /var/www/ninja.localhost/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/RegisterFacades.php(26): Illuminate\Foundation\PackageManifest->aliases()
#7 /var/www/ninja.localhost/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(219): Illuminate\Foundation\Bootstrap\RegisterFacades->bootstrap()
#8 /var/www/ninja.localhost/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(320): Illuminate\Foundation\Application->bootstrapWith()
#9 /var/www/ninja.localhost/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(129): Illuminate\Foundation\Console\Kernel->bootstrap()
#10 /var/www/ninja.localhost/public_html/artisan(33): Illuminate\Foundation\Console\Kernel->handle()
#11 {main} in /var/www/ninja.localhost/public_html/vendor/laravel/framework/src/Illuminate/Support/Collection.php on line 11

In Collection.php line 11:

  During inheritance of ArrayAccess: Uncaught ErrorException: Return type of Illuminate\Support\Collection::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute
   should be used to temporarily suppress the notice in /var/www/ninja.localhost/public_html/vendor/laravel/framework/src/Illuminate/Support/Collection.php:1277
  Stack trace:
  #0 /var/www/ninja.localhost/public_html/vendor/laravel/framework/src/Illuminate/Support/Collection.php(11): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError()
  #1 /var/www/ninja.localhost/public_html/vendor/composer/ClassLoader.php(576): include('...')
  #2 /var/www/ninja.localhost/public_html/vendor/composer/ClassLoader.php(427): Composer\Autoload\{closure}()
  #3 /var/www/ninja.localhost/public_html/vendor/laravel/framework/src/Illuminate/Support/helpers.php(109): Composer\Autoload\ClassLoader->loadClass()
  #4 /var/www/ninja.localhost/public_html/vendor/laravel/framework/src/Illuminate/Foundation/PackageManifest.php(89): collect()
  #5 /var/www/ninja.localhost/public_html/vendor/laravel/framework/src/Illuminate/Foundation/PackageManifest.php(78): Illuminate\Foundation\PackageManifest->config()
  #6 /var/www/ninja.localhost/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/RegisterFacades.php(26): Illuminate\Foundation\PackageManifest->aliases()
  #7 /var/www/ninja.localhost/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(219): Illuminate\Foundation\Bootstrap\RegisterFacades->bootstrap()
  #8 /var/www/ninja.localhost/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(320): Illuminate\Foundation\Application->bootstrapWith()
  #9 /var/www/ninja.localhost/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(129): Illuminate\Foundation\Console\Kernel->bootstrap()
  #10 /var/www/ninja.localhost/public_html/artisan(33): Illuminate\Foundation\Console\Kernel->handle()
  #11 {main}


Script php artisan view:clear handling the post-install-cmd event returned with error code 255

I’m on Composer 2.6.5 if that matters…

I’ll try to find a copy of the v4 release zip

Found one here, working on it, but still very much having issues getting an old version of PHP running…

https://web.archive.org/web/20240713230234/https://download.invoiceninja.com/ninja-v4.5.50.zip

Well, I’ve got it running, but it doesn’t seem to make any difference, it behaves exactly the same way. It seems like the import starts okay, it generates an empty “Untitled Company,” then never seems to finish.

In the v4 laravel-info.log, I see what looks like promising data, but it doesn’t actually seem to finish, and I can’t seem to find any actual errors…

[2025-02-02T18:39:10.416162+00:00] production.INFO: Array (     [data] => Array         (             [0] => Array                 (                     [permissions] =>                      [notifications] => Array                         (          >[2025-02-02T18:39:14.185964+00:00] production.INFO: get account [] []                                                                                                                                                                                       [2025-02-02T18:39:14.187886+00:00] production.INFO: get company [] []                                                                                                                                                                                       [2025-02-02T18:39:14.188039+00:00] production.INFO: get co settings [] []                                                                                                                                                                                   [2025-02-02T18:39:14.189343+00:00] production.INFO: get users 1 [] []                                                                                                                                                                                       [2025-02-02T18:39:14.190067+00:00] production.INFO: get tax rates => 0 [] []                                                                                                                                                                                [2025-02-02T18:39:14.190737+00:00] production.INFO: get payment terms => 8 [] []                                                                                                                                                                            [2025-02-02T18:39:14.191990+00:00] production.INFO: get clients => 2 [] []                                                                                                                                                                                  [2025-02-02T18:39:14.193226+00:00] production.INFO: Importing contacts => 6 [] []                                                                                                                                                                           [2025-02-02T18:39:14.195899+00:00] production.INFO: Importing contacts => 2 [] []                                                                                                                                                                           [2025-02-02T18:39:14.197300+00:00] production.INFO: Importing contacts => 1 [] []                                                                                                                                                                           [2025-02-02T18:39:14.199503+00:00] production.INFO: get get company gateways => 1 [] []                                                                                                                                                                     [2025-02-02T18:39:14.199582+00:00] production.INFO: translating gateway ID = 23 [] []                                                                                                                                                                       [2025-02-02T18:39:14.200719+00:00] production.INFO: translating gateway ID = 23 [] []                                                                                                                                                                       [2025-02-02T18:39:14.200877+00:00] production.INFO: get transform fees and limits [] []                                                                                                                                                                     [2025-02-02T18:39:14.202305+00:00] production.INFO: get client gateway tokens => 0 [] []                                                                                                                                                                    [2025-02-02T18:39:14.202962+00:00] production.INFO: get vendors => 3 [] []                                                                                                                                                                                  [2025-02-02T18:39:14.203585+00:00] production.INFO: get vendor contacts => 1 [] []                                                                                                                                                                          [2025-02-02T18:39:14.204273+00:00] production.INFO: get vendor contacts => 1 [] []                                                                                                                                                                          [2025-02-02T18:39:14.204919+00:00] production.INFO: get vendor contacts => 1 [] []                                                                                                                                                                          [2025-02-02T18:39:14.208153+00:00] production.INFO: get projects => [{"user_id":1,"account_id":1,"client_id":1,"created_at":"2017-04-02 22:46:06","updated_at":"2020-11-27 19:17:36","deleted_at":"2020-11-27 19:17:36","name":"Events Template","is_delete>[2025-02-02T18:39:14.214911+00:00] production.INFO: get products 4 [] []                                                                                                                                                                                    [2025-02-02T18:39:14.215906+00:00] production.INFO: get credit notes => 0 [] []                                                                                                                                                                             [2025-02-02T18:39:14.217766+00:00] production.INFO: get invoices -> 82 [] []                                                                                                                                                                                [2025-02-02T18:39:14.340452+00:00] production.INFO: get recurring Expenses => 1 [] []                                                                                                                                                                       [2025-02-02T18:39:14.343634+00:00] production.INFO: get recurring invoices => 0 [] []                                                                                                                                                                       [2025-02-02T18:39:14.344315+00:00] production.INFO: get quotes => 0 [] []                                                                                                                                                                                   [2025-02-02T18:39:14.345691+00:00] production.INFO: get payments => 87 [] []                                                                                                                                                                                [2025-02-02T18:39:14.419898+00:00] production.INFO: get documents => 13 [] []
[2025-02-02T18:39:14.421416+00:00] production.INFO: get expense categories => 2 [] []
[2025-02-02T18:39:14.422153+00:00] production.INFO: get task statuses => 5 [] []
[2025-02-02T18:39:14.423454+00:00] production.INFO: get expenses => 16 [] []
[2025-02-02T18:39:14.427032+00:00] production.INFO: get tasks => 183 [] []
[2025-02-02T18:39:14.443027+00:00] production.INFO: get documents => 13 [] []

Bit more info, I do see the files appear to be uploading to /app/storage/app/public/migrations in v5, so that’s something…

Have you checked storage/logs in both v4 and v5?

Yes, nothing seems to be related. I’d paste logs here but there’s too much data. The only thing I really see related to the import is just in v4 the record of the data being exported for the migration. When I manually extract the migration file, it looks good to me, all data is there.

In v5, the file appears, but logs say nothing about it; the last log I have in v5 is from 18:37 and I triggered the import at 18:39.

These are the logs I’m able to find in v5; I see the migration start, and some API stuff, but it seems like it doesn’t finish?

2025-02-02 18:58:01.352755+00:00{"level":"info","ts":1738522681.347098,"logger":"http.log.access.log0","msg":"handled request","request":{"remote_ip":"192.168.86.46","remote_port":"50748","client_ip":"192.168.86.46","proto":"HTTP/1.1","method":"POST","host":"192.168.86.26:31105","uri":"/api/v1/migration/start","headers":{"X-Api-Token":["x8sXeiuyHez0kCUl7IWfuLPh54mjtLIxCDlo4LPDoHoxksIQfCieQRjaEINYKrqh"],"User-Agent":["GuzzleHttp/6.5.5 curl/7.81.0 PHP/7.4.33"],"Content-Type":["multipart/form-data; boundary=a6dc33af210b57cea0ea04ea942cc65892b49227"],"Content-Length":["39505"],"X-Requested-With":["XMLHttpRequest"]}},"bytes_read":39505,"user_id":"","duration":0.264689143,"size":106,"status":200,"resp_headers":{"Date":["Sun, 02 Feb 2025 18:58:01 GMT"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Methods":["GET, POST, PUT, DELETE, OPTIONS"],"Access-Control-Allow-Headers":["X-React,X-API-PASSWORD-BASE64,X-API-COMPANY-KEY,X-API-SECRET,X-API-TOKEN,X-API-PASSWORD,DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Disposition,Range,X-CSRF-TOKEN,X-XSRF-TOKEN,X-LIVEWIRE,X-Socket-Id"],"Access-Control-Expose-Headers":["X-APP-VERSION,X-MINIMUM-CLIENT-VERSION,Content-Disposition"],"X-App-Version":["5.11.33"],"X-Minimum-Client-Version":["5.0.16"],"Server":["Caddy"],"X-Powered-By":["PHP/8.3.16"],"Cache-Control":["no-cache, private"],"Content-Type":["application/json"]}}
2025-02-02 18:58:11.157091+00:00{"level":"info","ts":1738522691.1555374,"logger":"http.log.access.log0","msg":"handled request","request":{"remote_ip":"192.168.86.46","remote_port":"52506","client_ip":"192.168.86.46","proto":"HTTP/1.1","method":"GET","host":"192.168.86.26:31105","uri":"/api/v1/documents?per_page=undefined&page=undefined&company_documents=true","headers":{"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:135.0) Gecko/20100101 Firefox/135.0"],"Dnt":["1"],"X-Api-Token":["x8sXeiuyHez0kCUl7IWfuLPh54mjtLIxCDlo4LPDoHoxksIQfCieQRjaEINYKrqh"],"X-Requested-With":["XMLHttpRequest"],"X-Xsrf-Token":["eyJpdiI6IlhLNjJKaTlHR3ZRVWEzc3F2c3BuOWc9PSIsInZhbHVlIjoidVNUV1owbFl3aUlMaVpWS0k3Q1pWVzQ2VXdnVzUrUzRCdHg5d0E2c1ZyTzU5Nk1oaHhlZkxyOWJmd3pKUEFlMXpaMkwzcW1ibUp2elJrOWt4WGtQeWlYdnFkRll1cGJWNlQ2RFBLZVdnRTNPZVJJRGRaZlczMGdZQWFEdWxHTnAiLCJtYWMiOiI0MTNhODcwMTY5ZWVhZDI4NGRmODI5MjAwNTdjZjcwMGViMTQ3MTllNDIxMzZmYjE0YTVkYzEwYjI1ZGFiYjdhIiwidGFnIjoiIn0="],"Connection":["keep-alive"],"Accept-Language":["en-US,en;q=0.5"],"Cookie":["REDACTED"],"Accept-Encoding":["gzip, deflate"],"Sec-Gpc":["1"],"Referer":["http://192.168.86.26:31105/settings/company_details"],"X-React":["true"],"Accept":["application/json, text/plain, */*"],"Priority":["u=0"]}},"bytes_read":0,"user_id":"","duration":0.022476526,"size":234,"status":200,"resp_headers":{"Server":["Caddy"],"Content-Type":["application/json"],"Cache-Control":["no-cache, private"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Methods":["GET, POST, PUT, DELETE, OPTIONS"],"Access-Control-Expose-Headers":["X-APP-VERSION,X-MINIMUM-CLIENT-VERSION,Content-Disposition"],"X-Minimum-Client-Version":["5.0.16"],"X-Powered-By":["PHP/8.3.16"],"X-Api-Version":["5.0.16"],"X-App-Version":["5.11.33"],"Date":["Sun, 02 Feb 2025 18:58:11 GMT"],"Access-Control-Allow-Headers":["X-React,X-API-PASSWORD-BASE64,X-API-COMPANY-KEY,X-API-SECRET,X-API-TOKEN,X-API-PASSWORD,DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Disposition,Range,X-CSRF-TOKEN,X-XSRF-TOKEN,X-LIVEWIRE,X-Socket-Id"]}}
2025-02-02 18:58:14.434670+00:00{"level":"info","ts":1738522694.4327998,"logger":"http.log.access.log0","msg":"handled request","request":{"remote_ip":"192.168.86.46","remote_port":"52506","client_ip":"192.168.86.46","proto":"HTTP/1.1","method":"GET","host":"192.168.86.26:31105","uri":"/api/v1/subscriptions?sort=id%7Cdesc&per_page=10&page=1&filter=&status=active","headers":{"Referer":["http://192.168.86.26:31105/settings/subscriptions"],"Priority":["u=0"],"Connection":["keep-alive"],"Sec-Gpc":["1"],"Accept":["application/json, text/plain, */*"],"Accept-Language":["en-US,en;q=0.5"],"X-Xsrf-Token":["eyJpdiI6IlhLNjJKaTlHR3ZRVWEzc3F2c3BuOWc9PSIsInZhbHVlIjoidVNUV1owbFl3aUlMaVpWS0k3Q1pWVzQ2VXdnVzUrUzRCdHg5d0E2c1ZyTzU5Nk1oaHhlZkxyOWJmd3pKUEFlMXpaMkwzcW1ibUp2elJrOWt4WGtQeWlYdnFkRll1cGJWNlQ2RFBLZVdnRTNPZVJJRGRaZlczMGdZQWFEdWxHTnAiLCJtYWMiOiI0MTNhODcwMTY5ZWVhZDI4NGRmODI5MjAwNTdjZjcwMGViMTQ3MTllNDIxMzZmYjE0YTVkYzEwYjI1ZGFiYjdhIiwidGFnIjoiIn0="],"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:135.0) Gecko/20100101 Firefox/135.0"],"X-Requested-With":["XMLHttpRequest"],"X-Api-Token":["x8sXeiuyHez0kCUl7IWfuLPh54mjtLIxCDlo4LPDoHoxksIQfCieQRjaEINYKrqh"],"X-React":["true"],"Dnt":["1"],"Cookie":["REDACTED"],"Accept-Encoding":["gzip, deflate"]}},"bytes_read":0,"user_id":"","duration":0.151786605,"size":234,"status":200,"resp_headers":{"X-Api-Version":["5.0.16"],"X-App-Version":["5.11.33"],"Date":["Sun, 02 Feb 2025 18:58:14 GMT"],"Access-Control-Allow-Methods":["GET, POST, PUT, DELETE, OPTIONS"],"Access-Control-Allow-Headers":["X-React,X-API-PASSWORD-BASE64,X-API-COMPANY-KEY,X-API-SECRET,X-API-TOKEN,X-API-PASSWORD,DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Disposition,Range,X-CSRF-TOKEN,X-XSRF-TOKEN,X-LIVEWIRE,X-Socket-Id"],"Access-Control-Expose-Headers":["X-APP-VERSION,X-MINIMUM-CLIENT-VERSION,Content-Disposition"],"X-Minimum-Client-Version":["5.0.16"],"Server":["Caddy"],"X-Powered-By":["PHP/8.3.16"],"Content-Type":["application/json"],"Cache-Control":["no-cache, private"],"Access-Control-Allow-Origin":["*"]}}
2025-02-02 18:58:14.455153+00:00{"level":"info","ts":1738522694.4460654,"logger":"http.log.access.log0","msg":"handled request","request":{"remote_ip":"192.168.86.46","remote_port":"52507","client_ip":"192.168.86.46","proto":"HTTP/1.1","method":"GET","host":"192.168.86.26:31105","uri":"/api/v1/subscriptions?sort=id%7Casc&per_page=10&page=1&filter=&status=active","headers":{"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:135.0) Gecko/20100101 Firefox/135.0"],"Dnt":["1"],"Connection":["keep-alive"],"X-React":["true"],"X-Xsrf-Token":["eyJpdiI6IlhLNjJKaTlHR3ZRVWEzc3F2c3BuOWc9PSIsInZhbHVlIjoidVNUV1owbFl3aUlMaVpWS0k3Q1pWVzQ2VXdnVzUrUzRCdHg5d0E2c1ZyTzU5Nk1oaHhlZkxyOWJmd3pKUEFlMXpaMkwzcW1ibUp2elJrOWt4WGtQeWlYdnFkRll1cGJWNlQ2RFBLZVdnRTNPZVJJRGRaZlczMGdZQWFEdWxHTnAiLCJtYWMiOiI0MTNhODcwMTY5ZWVhZDI4NGRmODI5MjAwNTdjZjcwMGViMTQ3MTllNDIxMzZmYjE0YTVkYzEwYjI1ZGFiYjdhIiwidGFnIjoiIn0="],"Accept-Encoding":["gzip, deflate"],"X-Api-Token":["x8sXeiuyHez0kCUl7IWfuLPh54mjtLIxCDlo4LPDoHoxksIQfCieQRjaEINYKrqh"],"Referer":["http://192.168.86.26:31105/settings/subscriptions"],"Cookie":["REDACTED"],"Sec-Gpc":["1"],"Accept-Language":["en-US,en;q=0.5"],"X-Requested-With":["XMLHttpRequest"],"Accept":["application/json, text/plain, */*"]}},"bytes_read":0,"user_id":"","duration":0.126812565,"size":234,"status":200,"resp_headers":{"Server":["Caddy"],"X-Powered-By":["PHP/8.3.16"],"Content-Type":["application/json"],"X-Api-Version":["5.0.16"],"X-App-Version":["5.11.33"],"Date":["Sun, 02 Feb 2025 18:58:14 GMT"],"Access-Control-Expose-Headers":["X-APP-VERSION,X-MINIMUM-CLIENT-VERSION,Content-Disposition"],"Cache-Control":["no-cache, private"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Methods":["GET, POST, PUT, DELETE, OPTIONS"],"Access-Control-Allow-Headers":["X-React,X-API-PASSWORD-BASE64,X-API-COMPANY-KEY,X-API-SECRET,X-API-TOKEN,X-API-PASSWORD,DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Disposition,Range,X-CSRF-TOKEN,X-XSRF-TOKEN,X-LIVEWIRE,X-Socket-Id"],"X-Minimum-Client-Version":["5.0.16"]}}
2025-02-02 18:58:15.003895+00:00{"level":"info","ts":1738522694.9960282,"logger":"http.log.access.log0","msg":"handled request","request":{"remote_ip":"192.168.86.46","remote_port":"52506","client_ip":"192.168.86.46","proto":"HTTP/1.1","method":"GET","host":"192.168.86.26:31105","uri":"/api/v1/task_schedulers?sort=id%7Cdesc&per_page=10&page=1&filter=&status=active","headers":{"Priority":["u=0"],"X-Api-Token":["x8sXeiuyHez0kCUl7IWfuLPh54mjtLIxCDlo4LPDoHoxksIQfCieQRjaEINYKrqh"],"Dnt":["1"],"X-Requested-With":["XMLHttpRequest"],"Accept-Language":["en-US,en;q=0.5"],"Accept-Encoding":["gzip, deflate"],"X-Xsrf-Token":["eyJpdiI6IlhLNjJKaTlHR3ZRVWEzc3F2c3BuOWc9PSIsInZhbHVlIjoidVNUV1owbFl3aUlMaVpWS0k3Q1pWVzQ2VXdnVzUrUzRCdHg5d0E2c1ZyTzU5Nk1oaHhlZkxyOWJmd3pKUEFlMXpaMkwzcW1ibUp2elJrOWt4WGtQeWlYdnFkRll1cGJWNlQ2RFBLZVdnRTNPZVJJRGRaZlczMGdZQWFEdWxHTnAiLCJtYWMiOiI0MTNhODcwMTY5ZWVhZDI4NGRmODI5MjAwNTdjZjcwMGViMTQ3MTllNDIxMzZmYjE0YTVkYzEwYjI1ZGFiYjdhIiwidGFnIjoiIn0="],"Accept":["application/json, text/plain, */*"],"X-React":["true"],"Cookie":["REDACTED"],"Referer":["http://192.168.86.26:31105/settings/schedules"],"Sec-Gpc":["1"],"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:135.0) Gecko/20100101 Firefox/135.0"],"Connection":["keep-alive"]}},"bytes_read":0,"user_id":"","duration":0.16826709,"size":234,"status":200,"resp_headers":{"X-App-Version":["5.11.33"],"Cache-Control":["no-cache, private"],"Date":["Sun, 02 Feb 2025 18:58:14 GMT"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Methods":["GET, POST, PUT, DELETE, OPTIONS"],"Access-Control-Allow-Headers":["X-React,X-API-PASSWORD-BASE64,X-API-COMPANY-KEY,X-API-SECRET,X-API-TOKEN,X-API-PASSWORD,DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Disposition,Range,X-CSRF-TOKEN,X-XSRF-TOKEN,X-LIVEWIRE,X-Socket-Id"],"Access-Control-Expose-Headers":["X-APP-VERSION,X-MINIMUM-CLIENT-VERSION,Content-Disposition"],"X-Powered-By":["PHP/8.3.16"],"Content-Type":["application/json"],"X-Api-Version":["5.0.16"],"X-Minimum-Client-Version":["5.0.16"],"Server":["Caddy"]}}
2025-02-02 18:58:15.014129+00:00{"level":"info","ts":1738522695.0111046,"logger":"http.log.access.log0","msg":"handled request","request":{"remote_ip":"192.168.86.46","remote_port":"52507","client_ip":"192.168.86.46","proto":"HTTP/1.1","method":"GET","host":"192.168.86.26:31105","uri":"/api/v1/task_schedulers?sort=id%7Casc&per_page=10&page=1&filter=&status=active","headers":{"X-Requested-With":["XMLHttpRequest"],"Sec-Gpc":["1"],"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:135.0) Gecko/20100101 Firefox/135.0"],"X-Api-Token":["x8sXeiuyHez0kCUl7IWfuLPh54mjtLIxCDlo4LPDoHoxksIQfCieQRjaEINYKrqh"],"Referer":["http://192.168.86.26:31105/settings/schedules"],"Connection":["keep-alive"],"Accept-Language":["en-US,en;q=0.5"],"X-Xsrf-Token":["eyJpdiI6IlhLNjJKaTlHR3ZRVWEzc3F2c3BuOWc9PSIsInZhbHVlIjoidVNUV1owbFl3aUlMaVpWS0k3Q1pWVzQ2VXdnVzUrUzRCdHg5d0E2c1ZyTzU5Nk1oaHhlZkxyOWJmd3pKUEFlMXpaMkwzcW1ibUp2elJrOWt4WGtQeWlYdnFkRll1cGJWNlQ2RFBLZVdnRTNPZVJJRGRaZlczMGdZQWFEdWxHTnAiLCJtYWMiOiI0MTNhODcwMTY5ZWVhZDI4NGRmODI5MjAwNTdjZjcwMGViMTQ3MTllNDIxMzZmYjE0YTVkYzEwYjI1ZGFiYjdhIiwidGFnIjoiIn0="],"Dnt":["1"],"Accept-Encoding":["gzip, deflate"],"X-React":["true"],"Cookie":["REDACTED"],"Accept":["application/json, text/plain, */*"]}},"bytes_read":0,"user_id":"","duration":0.153569372,"size":234,"status":200,"resp_headers":{"Content-Type":["application/json"],"Date":["Sun, 02 Feb 2025 18:58:15 GMT"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Methods":["GET, POST, PUT, DELETE, OPTIONS"],"X-Minimum-Client-Version":["5.0.16"],"Server":["Caddy"],"X-Powered-By":["PHP/8.3.16"],"X-Api-Version":["5.0.16"],"X-App-Version":["5.11.33"],"Cache-Control":["no-cache, private"],"Access-Control-Allow-Headers":["X-React,X-API-PASSWORD-BASE64,X-API-COMPANY-KEY,X-API-SECRET,X-API-TOKEN,X-API-PASSWORD,DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Disposition,Range,X-CSRF-TOKEN,X-XSRF-TOKEN,X-LIVEWIRE,X-Socket-Id"],"Access-Control-Expose-Headers":["X-APP-VERSION,X-MINIMUM-CLIENT-VERSION,Content-Disposition"]}}

Sorry I’m not sure, I suggest asking in a discussion on GitHub

Okay, well, I’ve made more progress. Along side the v4.5.50 install, I spun up an install of v5.3.100, which was the release of v5 that came out immediately following the last release of v4. I was then able to migrate from my local v4 install to my local v5 install. From there, I went to Settings → Export, and exported the company in JSON format.

Next, I went to https://app.invoicing.co/ and created an account, then went to Settings → Backup | Restore → Restore, and I uploaded the file and toggled on both “Import Settings” and “Import Data.” The import went through successfully in seconds. Proceeding, I went to Settings → Backup | Restore → Backup, and clicked “Export.” Seconds later, I received a download link in my email.

Finally, in my TrueNAS Scale Invoice Ninja installation (which I just updated), I went to Settings → Backup | Restore → Restore, and followed the exact same process as on https://app.invoicing.co/. I saw the same message, indicating an email would arrive when the import was complete, but no email ever arrives (I do have SMTP configured, and test emails come through correctly).

Under Settings → System Logs, I see nothing related to the “restore” process.

In /app/storage/logs/laravel.log, I see nothing related to the “restore” process. The only other log file that appears to be present is octane-server-state.json, which does not appear to contain any relevant information.

In the TrueNAS logs for Invoice Ninja, I see the following entry that appears related to the “restore” process.

2025-02-03 19:06:56.656553+00:00{"level":"info","ts":1738609616.654882,"logger":"http.log.access.log0","msg":"handled request","request":{"remote_ip":"192.168.86.46","remote_port":"61187","client_ip":"192.168.86.46","proto":"HTTP/1.1","method":"POST","host":"192.168.86.26:31105","uri":"/api/v1/import_json?&import_settings=true&import_data=true","headers":{"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:135.0) Gecko/20100101 Firefox/135.0"],"Referer":["http://192.168.86.26:31105/settings/backup_restore/restore"],"Cookie":["REDACTED"],"Content-Type":["multipart/form-data; boundary=----geckoformboundarybf2fb919df6160531152edb8e9772c12"],"Accept-Language":["en-US,en;q=0.5"],"Accept-Encoding":["gzip, deflate"],"X-React":["true"],"Connection":["keep-alive"],"Priority":["u=0"],"X-Requested-With":["XMLHttpRequest"],"Sec-Gpc":["1"],"Dnt":["1"],"X-Api-Token":["x8sXeiuyHez0kCUl7IWfuLPh54mjtLIxCDlo4LPDoHoxksIQfCieQRjaEINYKrqh"],"Origin":["http://192.168.86.26:31105"],"Accept":["application/json, text/plain, */*"],"Content-Length":["46691"],"X-Xsrf-Token":["eyJpdiI6ImlTb25WRGI1cTNSWGZKSjl6Z3pFS0E9PSIsInZhbHVlIjoicVJxS29yNUxPUWtGVm9UenBLaEMzcStiNjR1TW05aUNvWHpGQW1FSWtuN0JtenNVSFJ2ajd5L3VuT1p5dXJuMmhNR1dRenlhTVRxdDZ6YlJ1bmpjUjh5cERwa3hDM2tzNVQ5c0tPT2Y5QnBlU3duVlE0Z0MwOCtMekkxb2NXT2YiLCJtYWMiOiI4NzYxZDNiMzkzZTBlMmM3MDRhNGYxOTVhYjZiMjBlMjU2MjlkZTJmYzVjZTA5YWZlMzM1MWE0ZDg4OTliZjE5IiwidGFnIjoiIn0="]}},"bytes_read":46691,"user_id":"","duration":0.023471702,"size":24,"status":200,"resp_headers":{"Access-Control-Expose-Headers":["X-APP-VERSION,X-MINIMUM-CLIENT-VERSION,Content-Disposition"],"X-App-Version":["5.11.34"],"X-Minimum-Client-Version":["5.0.16"],"Server":["Caddy"],"X-Powered-By":["PHP/8.3.16"],"Cache-Control":["no-cache, private"],"Access-Control-Allow-Origin":["*"],"Access-Control-Allow-Headers":["X-React,X-API-PASSWORD-BASE64,X-API-COMPANY-KEY,X-API-SECRET,X-API-TOKEN,X-API-PASSWORD,DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Disposition,Range,X-CSRF-TOKEN,X-XSRF-TOKEN,X-LIVEWIRE,X-Socket-Id"],"Date":["Mon, 03 Feb 2025 19:06:56 GMT"],"Content-Type":["application/json"],"Access-Control-Allow-Methods":["GET, POST, PUT, DELETE, OPTIONS"]}}

When I connect via shell, I see the uploaded files in /app/public/storage/migrations, and the file size seems to be correct (46408 bytes).

Aha, found something else! In TrueNAS Scale’s invoice-ninja-worker logs, I see the following:

2025-02-03 19:06:59.109964+00:002025-02-03 19:06:59 App\Jobs\Company\CompanyImport ZhKNAfpPGLjl7RoXZXkRbIFp2AcGgCl7  RUNNING
2025-02-03 19:06:59.125283+00:00ok  2025-02-03 19:06:59 App\Jobs\Company\CompanyImport ZhKNAfpPGLjl7RoXZXkRbIFp2AcGgCl7  15.37ms FAIL

Now to try and find more details…

Interesting…

[2025-02-03 19:06:59] production.ERROR: Backup file does not exist, or is corrupted. {"exception":"[object] (App\\Exceptions\\NonExistingMigrationFile(code: 0): Backup file does not exist, or is corrupted. at /app/app/Jobs/Company/CompanyImport.php:454)
[stacktrace]
#0 /app/app/Jobs/Company/CompanyImport.php(318): App\\Jobs\\Company\\CompanyImport->unzipFile()
#1 /app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): App\\Jobs\\Company\\CompanyImport->handle()
#2 /app/vendor/laravel/framework/src/Illuminate/Container/Util.php(43): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#3 /app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(95): Illuminate\\Container\\Util::unwrapIfClosure()
#4 /app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\\Container\\BoundMethod::callBoundMethod()
#5 /app/vendor/laravel/framework/src/Illuminate/Container/Container.php(694): Illuminate\\Container\\BoundMethod::call()
#6 /app/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(126): Illuminate\\Container\\Container->call()
#7 /app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(170): Illuminate\\Bus\\Dispatcher->Illuminate\\Bus\\{closure}()
#8 /app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(127): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#9 /app/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(130): Illuminate\\Pipeline\\Pipeline->then()
#10 /app/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(126): Illuminate\\Bus\\Dispatcher->dispatchNow()
#11 /app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(170): Illuminate\\Queue\\CallQueuedHandler->Illuminate\\Queue\\{closure}()
#12 /app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(127): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#13 /app/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(121): Illuminate\\Pipeline\\Pipeline->then()
#14 /app/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(69): Illuminate\\Queue\\CallQueuedHandler->dispatchThroughMiddleware()
#15 /app/vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php(102): Illuminate\\Queue\\CallQueuedHandler->call()
#16 /app/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(442): Illuminate\\Queue\\Jobs\\Job->fire()
#17 /app/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(392): Illuminate\\Queue\\Worker->process()
#18 /app/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(178): Illuminate\\Queue\\Worker->runJob()
#19 /app/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(149): Illuminate\\Queue\\Worker->daemon()
#20 /app/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(132): Illuminate\\Queue\\Console\\WorkCommand->runWorker()
#21 /app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Illuminate\\Queue\\Console\\WorkCommand->handle()
#22 /app/vendor/laravel/framework/src/Illuminate/Container/Util.php(43): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#23 /app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(95): Illuminate\\Container\\Util::unwrapIfClosure()
#24 /app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\\Container\\BoundMethod::callBoundMethod()
#25 /app/vendor/laravel/framework/src/Illuminate/Container/Container.php(694): Illuminate\\Container\\BoundMethod::call()
#26 /app/vendor/laravel/framework/src/Illuminate/Console/Command.php(213): Illuminate\\Container\\Container->call()
#27 /app/vendor/symfony/console/Command/Command.php(279): Illuminate\\Console\\Command->execute()
#28 /app/vendor/laravel/framework/src/Illuminate/Console/Command.php(182): Symfony\\Component\\Console\\Command\\Command->run()
#29 /app/vendor/symfony/console/Application.php(1094): Illuminate\\Console\\Command->run()
#30 /app/vendor/symfony/console/Application.php(342): Symfony\\Component\\Console\\Application->doRunCommand()
#31 /app/vendor/symfony/console/Application.php(193): Symfony\\Component\\Console\\Application->doRun()
#32 /app/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(198): Symfony\\Component\\Console\\Application->run()
#33 /app/artisan(35): Illuminate\\Foundation\\Console\\Kernel->handle()
#34 {main}
"}

I suspect the temporary directory isn’t writable? Looks like that would be at /tmp, trying to find a solution… The TrueNAS of it all makes things difficult.

ETA: I see that directories are being generated in /tmp at the times that I’m running the imports, but they’re all empty.

Posted to the TrueNAS Apps GitHub as well… Unable to import company backup in Invoice Ninja · Issue #1538 · truenas/apps · GitHub