invoiceninja / invoiceninja

A source-available invoice, quote, project and time-tracking app built with Laravel
https://invoiceninja.com
Other
8.26k stars 2.28k forks source link

Error on migration from V4.5.42 to V5.2.7-C51 | Serialization of 'Closure' is not allowed #6174

Closed solokco closed 3 years ago

solokco commented 3 years ago

Everty time I try to excute the migration I get an error regarding Serialization of 'Closure' is not allowed

I went hunting for this solution but I dont see anyone else with this problem. I did find cases with laravel but all of them point me to edit the code, and I dont think thats the correct solution.

Any ideas??

Here is part of the LOG file

[2021-06-30 19:51:06] production.INFO: Importing account
[2021-06-30 19:51:06] production.INFO: Importing company
[2021-06-30 19:51:06] production.INFO: Importing users
[2021-06-30 19:51:07] production.INFO: Serialization of 'Closure' is not allowed
[2021-06-30 19:51:07] production.ERROR: Serialization of 'Closure' is not allowed {"userId":1,"exception":"[object] (Exception(code: 0): Serialization of 'Closure' is not allowed at /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Queue/Queue.php:158) [stacktrace]

0 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Queue/Queue.php(158): serialize(Object(Illuminate\Events\CallQueuedListener))

1 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Queue/Queue.php(127): Illuminate\Queue\Queue->createObjectPayload(Object(Illuminate\Events\CallQueuedListener), NULL)

2 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Queue/Queue.php(105): Illuminate\Queue\Queue->createPayloadArray(Object(Illuminate\Events\CallQueuedListener), NULL, '')

3 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Queue/SyncQueue.php(38): Illuminate\Queue\Queue->createPayload(Object(Illuminate\Events\CallQueuedListener), NULL, '')

4 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Queue/Queue.php(57): Illuminate\Queue\SyncQueue->push(Object(Illuminate\Events\CallQueuedListener), '', NULL)

5 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(562): Illuminate\Queue\Queue->pushOn(NULL, Object(Illuminate\Events\CallQueuedListener))

6 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(486): Illuminate\Events\Dispatcher->queueHandler('App\\Listeners\\M...', 'handle', Array)

7 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(412): Illuminate\Events\Dispatcher->Illuminate\Events\{closure}(Object(Illuminate\Mail\Events\MessageSent))

8 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(237): Illuminate\Events\Dispatcher->Illuminate\Events\{closure}('Illuminate\\Mail...', Array)

9 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Mail/Mailer.php(556): Illuminate\Events\Dispatcher->dispatch('Illuminate\\Mail...')

10 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Mail/Mailer.php(290): Illuminate\Mail\Mailer->dispatchSentEvent(Object(Illuminate\Mail\Message), Array)

11 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Mail/Mailable.php(187): Illuminate\Mail\Mailer->send('email.migration...', Array, Object(Closure))

12 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Support/Traits/Localizable.php(19): Illuminate\Mail\Mailable->Illuminate\Mail\{closure}()

13 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Mail/Mailable.php(188): Illuminate\Mail\Mailable->withLocale(NULL, Object(Closure))

14 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Mail/Mailer.php(304): Illuminate\Mail\Mailable->send(Object(Illuminate\Mail\Mailer))

15 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Mail/Mailer.php(258): Illuminate\Mail\Mailer->sendMailable(Object(App\Mail\MigrationFailed))

16 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Mail/PendingMail.php(121): Illuminate\Mail\Mailer->send(Object(App\Mail\MigrationFailed))

17 /home/customer/www/facturacion.mingoagency.com/public_html/v5/app/Jobs/Util/StartMigration.php(147): Illuminate\Mail\PendingMail->send(Object(App\Mail\MigrationFailed))

18 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): App\Jobs\Util\StartMigration->handle()

19 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Container/Util.php(40): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()

20 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure(Object(Closure))

21 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))

22 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Container/Container.php(614): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)

23 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(128): Illuminate\Container\Container->call(Array)

24 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\Bus\Dispatcher->Illuminate\Bus\{closure}(Object(App\Jobs\Util\StartMigration))

25 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(App\Jobs\Util\StartMigration))

26 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(132): Illuminate\Pipeline\Pipeline->then(Object(Closure))

27 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(120): Illuminate\Bus\Dispatcher->dispatchNow(Object(App\Jobs\Util\StartMigration), false)

28 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\Queue\CallQueuedHandler->Illuminate\Queue\{closure}(Object(App\Jobs\Util\StartMigration))

29 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(App\Jobs\Util\StartMigration))

30 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(122): Illuminate\Pipeline\Pipeline->then(Object(Closure))

31 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(70): Illuminate\Queue\CallQueuedHandler->dispatchThroughMiddleware(Object(Illuminate\Queue\Jobs\SyncJob), Object(App\Jobs\Util\StartMigration))

32 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php(98): Illuminate\Queue\CallQueuedHandler->call(Object(Illuminate\Queue\Jobs\SyncJob), Array)

33 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Queue/SyncQueue.php(43): Illuminate\Queue\Jobs\Job->fire()

34 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(253): Illuminate\Queue\SyncQueue->push(Object(App\Jobs\Util\StartMigration))

35 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(229): Illuminate\Bus\Dispatcher->pushCommandToQueue(Object(Illuminate\Queue\SyncQueue), Object(App\Jobs\Util\StartMigration))

36 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(77): Illuminate\Bus\Dispatcher->dispatchToQueue(Object(App\Jobs\Util\StartMigration))

37 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Foundation/Bus/PendingDispatch.php(202): Illuminate\Bus\Dispatcher->dispatch(Object(App\Jobs\Util\StartMigration))

38 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Foundation/Bus/Dispatchable.php(17): Illuminate\Foundation\Bus\PendingDispatch->__destruct()

39 /home/customer/www/facturacion.mingoagency.com/public_html/v5/app/Http/Controllers/MigrationController.php(388): App\Jobs\Util\StartMigration::dispatch('migrations/ZScV...', Object(App\Models\User), Object(App\Models\Company))

40 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): App\Http\Controllers\MigrationController->startMigration(Object(Illuminate\Http\Request))

41 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(45): Illuminate\Routing\Controller->callAction('startMigration', Array)

42 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Routing/Route.php(254): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(App\Http\Controllers\MigrationController), 'startMigration')

43 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Routing/Route.php(197): Illuminate\Routing\Route->runController()

44 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Routing/Router.php(695): Illuminate\Routing\Route->run()

45 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\Routing\Router->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))

46 /home/customer/www/facturacion.mingoagency.com/public_html/v5/app/Http/Middleware/QueryLogging.php(40): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))

47 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\QueryLogging->handle(Object(Illuminate\Http\Request), Object(Closure))

48 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(50): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))

49 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Routing\Middleware\SubstituteBindings->handle(Object(Illuminate\Http\Request), Object(Closure))

50 /home/customer/www/facturacion.mingoagency.com/public_html/v5/app/Http/Middleware/Locale.php(34): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))

51 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\Locale->handle(Object(Illuminate\Http\Request), Object(Closure))

52 /home/customer/www/facturacion.mingoagency.com/public_html/v5/app/Http/Middleware/TokenAuth.php(80): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))

53 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\TokenAuth->handle(Object(Illuminate\Http\Request), Object(Closure))

54 /home/customer/www/facturacion.mingoagency.com/public_html/v5/app/Http/Middleware/SetDb.php(41): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))

55 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\SetDb->handle(Object(Illuminate\Http\Request), Object(Closure))

56 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php(127): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))

57 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php(63): Illuminate\Routing\Middleware\ThrottleRequests->handleRequest(Object(Illuminate\Http\Request), Object(Closure), Array)

58 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Routing\Middleware\ThrottleRequests->handle(Object(Illuminate\Http\Request), Object(Closure), '300', '1')

59 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))

60 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Routing/Router.php(697): Illuminate\Pipeline\Pipeline->then(Object(Closure))

61 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Routing/Router.php(672): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))

62 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Routing/Router.php(636): Illuminate\Routing\Router->runRoute(Object(Illuminate\Http\Request), Object(Illuminate\Routing\Route))

63 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Routing/Router.php(625): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))

64 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(166): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))

65 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}(Object(Illuminate\Http\Request))

66 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Http/SetRequestIpMiddleware.php(55): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))

67 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Sentry\Laravel\Http\SetRequestIpMiddleware->handle(Object(Illuminate\Http\Request), Object(Closure))

68 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Http/SetRequestMiddleware.php(52): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))

69 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Sentry\Laravel\Http\SetRequestMiddleware->handle(Object(Illuminate\Http\Request), Object(Closure))

70 /home/customer/www/facturacion.mingoagency.com/public_html/v5/app/Http/Middleware/Cors.php(25): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))

71 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\Cors->handle(Object(Illuminate\Http\Request), Object(Closure))

72 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/fideloper/proxy/src/TrustProxies.php(57): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))

73 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Fideloper\Proxy\TrustProxies->handle(Object(Illuminate\Http\Request), Object(Closure))

74 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))

75 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php(31): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle(Object(Illuminate\Http\Request), Object(Closure))

76 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull->handle(Object(Illuminate\Http\Request), Object(Closure))

77 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))

78 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php(40): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle(Object(Illuminate\Http\Request), Object(Closure))

79 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\TrimStrings->handle(Object(Illuminate\Http\Request), Object(Closure))

80 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))

81 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\ValidatePostSize->handle(Object(Illuminate\Http\Request), Object(Closure))

82 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(86): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))

83 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance->handle(Object(Illuminate\Http\Request), Object(Closure))

84 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))

85 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(141): Illuminate\Pipeline\Pipeline->then(Object(Closure))

86 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(110): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))

87 /home/customer/www/facturacion.mingoagency.com/public_html/v5/public/index.php(57): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))

88 {main}

"}

turbo124 commented 3 years ago

So this is an interesting one. The migration is failing - but this stacktrace is failing because the system couldn't push the mail onto the queue.

Can you advise your full environment.

PHP version (both FPM and cli) InvoiceNinja v4 version InvoiceNinja v5 version

solokco commented 3 years ago

Is a shared hosting (sitegorund.com)

PHP 7.4.20 Linux us36.siteground.us 3.12.18-clouder0 #6 SMP PREEMPT Mon Apr 12 16:04:39 EEST 2021 x86_64 Invoice Ninja V4.5.42 Invoice Ninja V5.2.7-C51

Let me know if this information works for you or need anything further.

Thanks

turbo124 commented 3 years ago

@solokco

Can you try with QUEUE_CONNECTION=sync on V5 please

afterwards run /update?secret=

Then retry the migration.

solokco commented 3 years ago

Did not work.

On .env this was already set:

BROADCAST_DRIVER=log
LOG_CHANNEL=stack
CACHE_DRIVER=file
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120

Ran the /update?secret=

then tried migration again and this is part of the log

[2021-07-01 12:53:49] production.INFO: Importing account  
[2021-07-01 12:53:49] production.INFO: Importing company  
[2021-07-01 12:53:49] production.INFO: Importing users  
[2021-07-01 12:53:50] production.INFO: Serialization of 'Closure' is not allowed  
[2021-07-01 12:53:50] production.ERROR: Serialization of 'Closure' is not allowed {"userId":1,"exception":"[object] (Exception(code: 0): Serialization of 'Closure' is not allowed at /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Queue/Queue.php:158)
[stacktrace]
#0 /home/customer/www/facturacion.mingoagency.com/public_html/v5/vendor/laravel/framework/src/Illuminate/Queue/Queue.php(158): serialize(Object(Illuminate\\Events\\CallQueuedListener))

BUT something new that happend is that I got an email with an error message this time saying this:

SQLSTATE[HY000] [1045] Access denied for user 'ninja'@'localhost' (using password: YES) (SQL: select exists(select * from `users` where (`email` = administracion@mingoagency.com) and `users`.`deleted_at` is null) as `exists`)

SQLSTATE[HY000] [1045] Access denied for user 'ninja'@'localhost' (using password: YES) (SQL: select exists(select * from `users` where (`email` = administracion@mingoagency.com) and `users`.`deleted_at` is null) as `exists`)

But makes no sense considering that the installation on V5 worked perfectly when connecting to the database

solokco commented 3 years ago

Any ideas?

All the permissions on the database are fine. Should I create a new user called NINJA?

dinandmentink commented 3 years ago

Can confirm, receiving the exact same error during migration from 4.5.42 to current v5-stable.

turbo124 commented 3 years ago

@dinandmentink

Can you confirm which queue_driver you are using?

dinandmentink commented 3 years ago

In this specific instance I was using database. Configured with a queue worker, I am familiar with laravel and it's queueing system I'm positive it was setup correctly.

It could be that switching to sync helps?

turbo124 commented 3 years ago

certainly worth a shot, the error is being thrown inside the Queue

dinandmentink commented 3 years ago

Will try and report.

turbo124 commented 3 years ago

closing this, let us know if you are still seeing this.

dinandmentink commented 3 years ago

After some tinkering (newer version of v4 and v5) I got further into the process. I don't think the queue is the issue. The php artisan queue:work command works (as expected) and logging (including mail logger) now works as well. While migrating I am still getting an error which is only send through mail: Missing resource key: clients_1.

The full log is:

[2021-10-20 15:53:50] production.INFO: Importing account  
[2021-10-20 15:53:50] production.INFO: Importing company  
[2021-10-20 15:53:50] production.INFO: Importing users  
[2021-10-20 15:53:50] production.INFO: Importing payment_terms  
[2021-10-20 15:53:50] production.INFO: Importing tax_rates  
[2021-10-20 15:53:50] production.INFO: Importing clients  
[2021-10-20 15:54:11] production.INFO: Importing company_gateways  
[2021-10-20 15:54:11] production.INFO: Importing client_gateway_tokens  
[2021-10-20 15:54:11] production.INFO: Importing vendors  
[2021-10-20 15:54:11] production.INFO: Importing projects  
[2021-10-20 15:54:11] production.INFO: Importing products  
[2021-10-20 15:54:11] production.INFO: Importing credits  
[2021-10-20 15:54:11] production.INFO: Importing recurring_invoices  
[2021-10-20 15:54:23] production.INFO: Importing invoices  
[2021-10-20 15:55:22] production.INFO: Importing quotes  
[2021-10-20 15:55:22] production.INFO: Importing payments  
[2021-10-20 15:55:22] production.DEBUG: Message-ID: <f802b9c5b2add006b2f318318e6e6b41@swift.generated>

(mail message omitted, includes the error message above).

Would really appreciate any help.

Edit: It seems I have a payment in my V4 database which is invalid. I'll add if I get this figured out.

dinandmentink commented 3 years ago

Update, maybe of interest for anyone reading in the future.

It seems in my case there was a (soft-deleted) payment in my V4 database which was faulty. After deleting this payment everything worked ok.