Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Queue Job Batching #446

Closed
moisish opened this issue Feb 28, 2023 · 17 comments
Closed

Queue Job Batching #446

moisish opened this issue Feb 28, 2023 · 17 comments

Comments

@moisish
Copy link
Contributor

moisish commented Feb 28, 2023

I am experiencing the same issue that has been discussed here #356

I am dispatching couple of jobs in a batch which on a successful run will run a final job

Bus::batch($jobs)
            ->then(function (Batch $batch) use ($reportJob) {
                dispatch($reportJob);
            })
            ->dispatch();

Some of the batched jobs are failing with the following error

Error: Call to a member function prepare() on null in /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:414

So far I have identify that this exists only when the job_batches table is on the tenant's connection

@moisish
Copy link
Contributor Author

moisish commented Feb 28, 2023

@masterix21 I believe this is a breaking change due to 3.0.2 changes in #438

If I revert back to 3.0.1 I cannot replicate the issue anymore

@ChristiaanBilthof
Copy link

I'm experiencing this issue on 3.0.1 as well unfortunately. Did you change anything else?

@ChristiaanBilthof
Copy link

ChristiaanBilthof commented Mar 4, 2023

Hey I may have a solution to the problem which works for me. I'm not 100% sure why it works, because it has to do with (this is just my inclination) the way laravel handles these batched types of jobs.

So when I looked at my queue logs, I saw that the first was working and the second was not, which led me to believe that the 'next' jobs in the batch are failing because of some reason. So I went looking into what happended in the package whenever a job gets handled. Which is:

In the "MakeQueueTenantAwareAction" class, you will see that before a job is being processed or retried this code is called:

$this->getTenantModel()::forgetCurrent();

After that the tenantId is checked for being on the job and if so, the tenant is made current again. In all my jobs, this tenantId is there so that is not the problem, but removing the code as above here, so just 'not forgetting the tenant' makes the problem go away (at least for me).

Again I'm unsure why, but it works.

So I created my own MakeQueueTenantAwareAction, extended theirs and wrote my own two functions for where that code get called. Result below:

class MakeQueueTenantAwareAction extends \Spatie\Multitenancy\Actions\MakeQueueTenantAwareAction
{
    protected function listenForJobsBeingProcessed(): static
    {
        app('events')->listen(JobProcessing::class, function (JobProcessing $event) {
            if (array_key_exists('tenantId', $event->job->payload())) {
                $this->findTenant($event)->makeCurrent();
            }
        });

        return $this;
    }

    protected function listenForJobsRetryRequested(): static
    {
        app('events')->listen(JobRetryRequested::class, function (JobRetryRequested $event) {
            if (array_key_exists('tenantId', $event->payload())) {
                $this->findTenant($event)->makeCurrent();
            }
        });

        return $this;
    }
}

Let me know if this works for you!

Or if you have any idea why this solution tends to work haha.

Cheers!

@moisish
Copy link
Contributor Author

moisish commented Mar 4, 2023

@ChristiaanBilthof That’s why I revert to 3.0.1 because I have identify as well what you are saying.

Forgetting the tenant was added on 3.0.2 to fix a different issue but it seems it’s not the proper way

@adarmanto
Copy link

Same issue here:

[2023-03-05 21:47:01] production.ERROR: Call to a member function prepare() on null {"exception":"[object] (Error(code: 0): Call to a member function prepare() on null at ./vendor/laravel/framework/src/Illuminate/Database/Connection.php:414)
[stacktrace]
#0 ./vendor/laravel/framework/src/Illuminate/Database/Connection.php(753): Illuminate\\Database\\Connection->Illuminate\\Database\\{closure}('select * from `...', Array)
#1 ./vendor/laravel/framework/src/Illuminate/Database/Connection.php(720): Illuminate\\Database\\Connection->runQueryCallback('select * from `...', Array, Object(Closure))
#2 ./vendor/laravel/framework/src/Illuminate/Database/Connection.php(405): Illuminate\\Database\\Connection->run('select * from `...', Array, Object(Closure))
#3 ./vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2718): Illuminate\\Database\\Connection->select('select * from `...', Array, false)
#4 ./vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2707): Illuminate\\Database\\Query\\Builder->runSelect()
#5 ./vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(3247): Illuminate\\Database\\Query\\Builder->Illuminate\\Database\\Query\\{closure}()
#6 ./vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2706): Illuminate\\Database\\Query\\Builder->onceWithColumns(Array, Object(Closure))
#7 ./vendor/laravel/framework/src/Illuminate/Database/Concerns/BuildsQueries.php(296): Illuminate\\Database\\Query\\Builder->get(Array)
#8 ./vendor/laravel/framework/src/Illuminate/Bus/DatabaseBatchRepository.php(81): Illuminate\\Database\\Query\\Builder->first()
#9 ./vendor/laravel/framework/src/Illuminate/Bus/Batchable.php(38): Illuminate\\Bus\\DatabaseBatchRepository->find('989795f0-c6f8-4...')
#10 ./vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(191): App\\Jobs\\FetchOrders->batch()
#11 ./vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(78): Illuminate\\Queue\\CallQueuedHandler->ensureSuccessfulBatchJobIsRecorded(Object(App\\Jobs\\FetchOrders))
#12 ./vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php(98): Illuminate\\Queue\\CallQueuedHandler->call(Object(Illuminate\\Queue\\Jobs\\RedisJob), Array)
#13 ./vendor/laravel/framework/src/Illuminate/Queue/Worker.php(425): Illuminate\\Queue\\Jobs\\Job->fire()
#14 ./vendor/laravel/framework/src/Illuminate/Queue/Worker.php(375): Illuminate\\Queue\\Worker->process('redis', Object(Illuminate\\Queue\\Jobs\\RedisJob), Object(Illuminate\\Queue\\WorkerOptions))
#15 ./vendor/laravel/framework/src/Illuminate/Queue/Worker.php(173): Illuminate\\Queue\\Worker->runJob(Object(Illuminate\\Queue\\Jobs\\RedisJob), 'redis', Object(Illuminate\\Queue\\WorkerOptions))
#16 ./vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(135): Illuminate\\Queue\\Worker->daemon('redis', 'long', Object(Illuminate\\Queue\\WorkerOptions))
#17 ./vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(118): Illuminate\\Queue\\Console\\WorkCommand->runWorker('redis', 'long')
#18 ./vendor/laravel/horizon/src/Console/WorkCommand.php(51): Illuminate\\Queue\\Console\\WorkCommand->handle()
#19 ./vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Laravel\\Horizon\\Console\\WorkCommand->handle()
#20 ./vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#21 ./vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure(Object(Closure))
#22 ./vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\\Container\\BoundMethod::callBoundMethod(Object(Illuminate\\Foundation\\Application), Array, Object(Closure))
#23 ./vendor/laravel/framework/src/Illuminate/Container/Container.php(661): Illuminate\\Container\\BoundMethod::call(Object(Illuminate\\Foundation\\Application), Array, Array, NULL)
#24 ./vendor/laravel/framework/src/Illuminate/Console/Command.php(194): Illuminate\\Container\\Container->call(Array)
#25 ./vendor/symfony/console/Command/Command.php(312): Illuminate\\Console\\Command->execute(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Illuminate\\Console\\OutputStyle))
#26 ./vendor/laravel/framework/src/Illuminate/Console/Command.php(163): Symfony\\Component\\Console\\Command\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Illuminate\\Console\\OutputStyle))
#27 ./vendor/symfony/console/Application.php(1022): Illuminate\\Console\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#28 ./vendor/symfony/console/Application.php(314): Symfony\\Component\\Console\\Application->doRunCommand(Object(Laravel\\Horizon\\Console\\WorkCommand), Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#29 ./vendor/symfony/console/Application.php(168): Symfony\\Component\\Console\\Application->doRun(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#30 ./vendor/laravel/framework/src/Illuminate/Console/Application.php(102): Symfony\\Component\\Console\\Application->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#31 ./vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(155): Illuminate\\Console\\Application->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#32 ./artisan(35): Illuminate\\Foundation\\Console\\Kernel->handle(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#33 {main}

Thanks for the suggestion to revert back to 3.0.1 @moisish

@adarmanto
Copy link

adarmanto commented Mar 7, 2023

Oops, even though it was already reverted to 3.0.1, the issue is still happening in my case.

Moved job_batches from the tenant's db to the landlord's db was fixed my issue as suggested on this discussion.

// config/queue.php
...
'batching' => [
    'database' => 'landlord',
    'table' => 'job_batches',
],

@m7vm7v
Copy link

m7vm7v commented Mar 15, 2023

Hey I may have a solution to the problem which works for me. I'm not 100% sure why it works, because it has to do with (this is just my inclination) the way laravel handles these batched types of jobs.

So when I looked at my queue logs, I saw that the first was working and the second was not, which led me to believe that the 'next' jobs in the batch are failing because of some reason. So I went looking into what happended in the package whenever a job gets handled. Which is:

In the "MakeQueueTenantAwareAction" class, you will see that before a job is being processed or retried this code is called:

$this->getTenantModel()::forgetCurrent();

After that the tenantId is checked for being on the job and if so, the tenant is made current again. In all my jobs, this tenantId is there so that is not the problem, but removing the code as above here, so just 'not forgetting the tenant' makes the problem go away (at least for me).

Again I'm unsure why, but it works.

So I created my own MakeQueueTenantAwareAction, extended theirs and wrote my own two functions for where that code get called. Result below:

class MakeQueueTenantAwareAction extends \Spatie\Multitenancy\Actions\MakeQueueTenantAwareAction
{
    protected function listenForJobsBeingProcessed(): static
    {
        app('events')->listen(JobProcessing::class, function (JobProcessing $event) {
            if (array_key_exists('tenantId', $event->job->payload())) {
                $this->findTenant($event)->makeCurrent();
            }
        });

        return $this;
    }

    protected function listenForJobsRetryRequested(): static
    {
        app('events')->listen(JobRetryRequested::class, function (JobRetryRequested $event) {
            if (array_key_exists('tenantId', $event->payload())) {
                $this->findTenant($event)->makeCurrent();
            }
        });

        return $this;
    }
}

Let me know if this works for you!

Or if you have any idea why this solution tends to work haha.

Cheers!

Thanks for the suggestion @ChristiaanBilthof. Were you able to find any side effects of this solution? Is all the rest working fine? I can't find a solution after a few hours of debugging. But removing that line fixes the issue, just wondering how solid is it in terms of side effects.

@ChristiaanBilthof
Copy link

I haven't encountered any side effects myself (makes me wonder if that code is even neccessary btw).

@moisish
Copy link
Contributor Author

moisish commented Mar 31, 2023

@masterix21 Any thoughts on this?

@sanketr43
Copy link

anyone found solution about this? the batch jobs are failing. somehow the connection in lost in between.

@masterix21
Copy link
Collaborator

@moisish, please create a repository that includes the code with errors and grant me access to it. This will help with testing and fixing the issues. Thank you in advance.

@sanketr43
Copy link

sanketr43 commented May 3, 2023

When I try to dispatch job on localhost using this pacakge it gives me below error. after debug i found that, for batch job when it pick the connection, that time the database value is null.

image

In above image you can see line number 152 for DatabaseQueue.php file for bulk method. and console log have database=null which should dynamically set as current tenant DB.

below is the log

[2023-05-03 19:42:04] development.ERROR: Call to a member function prepare() on null {"exception":"[object] (Error(code: 0): Call to a member function prepare() on null at /Users/sanket.raut/payday/src/vendor/laravel/framework/src/Illuminate/Database/Connection.php:542)
[stacktrace]
#0 /Users/sanket.raut/payday/src/vendor/laravel/framework/src/Illuminate/Database/Connection.php(761): Illuminate\\Database\\Connection->Illuminate\\Database\\{closure}('insert into `jo...', Array)
#1 /Users/sanket.raut/payday/src/vendor/laravel/framework/src/Illuminate/Database/Connection.php(723): Illuminate\\Database\\Connection->runQueryCallback('insert into `jo...', Array, Object(Closure))
#2 /Users/sanket.raut/payday/src/vendor/laravel/framework/src/Illuminate/Database/Connection.php(549): Illuminate\\Database\\Connection->run('insert into `jo...', Array, Object(Closure))
#3 /Users/sanket.raut/payday/src/vendor/laravel/framework/src/Illuminate/Database/Connection.php(501): Illuminate\\Database\\Connection->statement('insert into `jo...', Array)
#4 /Users/sanket.raut/payday/src/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(3274): Illuminate\\Database\\Connection->insert('insert into `jo...', Array)
#5 /Users/sanket.raut/payday/src/vendor/laravel/framework/src/Illuminate/Queue/DatabaseQueue.php(161): Illuminate\\Database\\Query\\Builder->insert(Array)
#6 /Users/sanket.raut/payday/src/vendor/laravel/framework/src/Illuminate/Bus/Batch.php(194): Illuminate\\Queue\\DatabaseQueue->bulk(Array, '', 'default')
#7 /Users/sanket.raut/payday/src/vendor/laravel/framework/src/Illuminate/Bus/DatabaseBatchRepository.php(312): Illuminate\\Bus\\Batch->Illuminate\\Bus\\{closure}()
#8 /Users/sanket.raut/payday/src/vendor/laravel/framework/src/Illuminate/Database/Concerns/ManagesTransactions.php(31): Illuminate\\Bus\\DatabaseBatchRepository->Illuminate\\Bus\\{closure}(Object(Illuminate\\Database\\MySqlConnection))
#9 /Users/sanket.raut/payday/src/vendor/laravel/framework/src/Illuminate/Bus/DatabaseBatchRepository.php(312): Illuminate\\Database\\Connection->transaction(Object(Closure))
#10 /Users/sanket.raut/payday/src/vendor/laravel/framework/src/Illuminate/Bus/Batch.php(196): Illuminate\\Bus\\DatabaseBatchRepository->transaction(Object(Closure))
#11 /Users/sanket.raut/payday/src/app/Services/Tenant/Payroll/PayrunService.php(198): Illuminate\\Bus\\Batch->add(Object(Illuminate\\Support\\Collection))
#12 [internal function]: App\\Services\\Tenant\\Payroll\\PayrunService->App\\Services\\Tenant\\Payroll\\{closure}(Object(App\\Models\\Core\\Auth\\User), 0)
#13 /Users/sanket.raut/payday/src/vendor/laravel/framework/src/Illuminate/Collections/Arr.php(560): array_map(Object(Closure), Array, Array)
#14 /Users/sanket.raut/payday/src/vendor/laravel/framework/src/Illuminate/Collections/Collection.php(768): Illuminate\\Support\\Arr::map(Array, Object(Closure))
#15 /Users/sanket.raut/payday/src/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Collection.php(341): Illuminate\\Support\\Collection->map(Object(Closure))
#16 /Users/sanket.raut/payday/src/app/Services/Tenant/Payroll/PayrunService.php(201): Illuminate\\Database\\Eloquent\\Collection->map(Object(Closure))
#17 /Users/sanket.raut/payday/src/app/Services/Tenant/Payroll/PayrunService.php(100): App\\Services\\Tenant\\Payroll\\PayrunService->generateEmployeesPayslip(Object(App\\Models\\Tenant\\Payroll\\Payrun), Object(Illuminate\\Database\\Eloquent\\Collection), Array, Array)
#18 /Users/sanket.raut/payday/src/app/Services/Tenant/Payroll/PayrunService.php(47): App\\Services\\Tenant\\Payroll\\PayrunService->makePayrunFollowedBySettings(Object(Illuminate\\Database\\Eloquent\\Collection))
#19 /Users/sanket.raut/payday/src/database/seeders/Tenant/DefaultPayrunSeeder.php(18): App\\Services\\Tenant\\Payroll\\PayrunService->runDefaultPayrun()
#20 /Users/sanket.raut/payday/src/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Database\\Seeders\\Tenant\\DefaultPayrunSeeder->run()
#21 /Users/sanket.raut/payday/src/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#22 /Users/sanket.raut/payday/src/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure(Object(Closure))
#23 /Users/sanket.raut/payday/src/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\\Container\\BoundMethod::callBoundMethod(Object(Illuminate\\Foundation\\Application), Array, Object(Closure))
#24 /Users/sanket.raut/payday/src/vendor/laravel/framework/src/Illuminate/Container/Container.php(661): Illuminate\\Container\\BoundMethod::call(Object(Illuminate\\Foundation\\Application), Array, Array, NULL)
#25 /Users/sanket.raut/payday/src/vendor/laravel/framework/src/Illuminate/Database/Seeder.php(184): Illuminate\\Container\\Container->call(Array, Array)
#26 /Users/sanket.raut/payday/src/vendor/laravel/framework/src/Illuminate/Database/Seeder.php(193): Illuminate\\Database\\Seeder->Illuminate\\Database\\{closure}()
#27 /Users/sanket.raut/payday/src/vendor/laravel/framework/src/Illuminate/Database/Seeder.php(61): Illuminate\\Database\\Seeder->__invoke(Array)
#28 /Users/sanket.raut/payday/src/database/seeders/DemoSeeder.php(46): Illuminate\\Database\\Seeder->call('Database\\\\Seeder...')
#29 /Users/sanket.raut/payday/src/vendor/spatie/laravel-activitylog/src/ActivityLogger.php(190): Database\\Seeders\\DemoSeeder->Database\\Seeders\\{closure}()
#30 /Users/sanket.raut/payday/src/database/seeders/DemoSeeder.php(49): Spatie\\Activitylog\\ActivityLogger->withoutLogs(Object(Closure))
#31 /Users/sanket.raut/payday/src/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Database\\Seeders\\DemoSeeder->run()
#32 /Users/sanket.raut/payday/src/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#33 /Users/sanket.raut/payday/src/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure(Object(Closure))
#34 /Users/sanket.raut/payday/src/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\\Container\\BoundMethod::callBoundMethod(Object(Illuminate\\Foundation\\Application), Array, Object(Closure))
#35 /Users/sanket.raut/payday/src/vendor/laravel/framework/src/Illuminate/Container/Container.php(661): Illuminate\\Container\\BoundMethod::call(Object(Illuminate\\Foundation\\Application), Array, Array, NULL)
#36 /Users/sanket.raut/payday/src/vendor/laravel/framework/src/Illuminate/Database/Seeder.php(184): Illuminate\\Container\\Container->call(Array, Array)
#37 /Users/sanket.raut/payday/src/vendor/laravel/framework/src/Illuminate/Database/Seeder.php(193): Illuminate\\Database\\Seeder->Illuminate\\Database\\{closure}()
#38 /Users/sanket.raut/payday/src/vendor/laravel/framework/src/Illuminate/Database/Console/Seeds/SeedCommand.php(81): Illuminate\\Database\\Seeder->__invoke()
#39 /Users/sanket.raut/payday/src/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/GuardsAttributes.php(155): Illuminate\\Database\\Console\\Seeds\\SeedCommand->Illuminate\\Database\\Console\\Seeds\\{closure}()
#40 /Users/sanket.raut/payday/src/vendor/laravel/framework/src/Illuminate/Database/Console/Seeds/SeedCommand.php(82): Illuminate\\Database\\Eloquent\\Model::unguarded(Object(Closure))
#41 /Users/sanket.raut/payday/src/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Illuminate\\Database\\Console\\Seeds\\SeedCommand->handle()
#42 /Users/sanket.raut/payday/src/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#43 /Users/sanket.raut/payday/src/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure(Object(Closure))
#44 /Users/sanket.raut/payday/src/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\\Container\\BoundMethod::callBoundMethod(Object(Illuminate\\Foundation\\Application), Array, Object(Closure))
#45 /Users/sanket.raut/payday/src/vendor/laravel/framework/src/Illuminate/Container/Container.php(661): Illuminate\\Container\\BoundMethod::call(Object(Illuminate\\Foundation\\Application), Array, Array, NULL)
#46 /Users/sanket.raut/payday/src/vendor/laravel/framework/src/Illuminate/Console/Command.php(183): Illuminate\\Container\\Container->call(Array)
#47 /Users/sanket.raut/payday/src/vendor/symfony/console/Command/Command.php(291): Illuminate\\Console\\Command->execute(Object(Symfony\\Component\\Console\\Input\\ArrayInput), Object(Illuminate\\Console\\OutputStyle))
#48 /Users/sanket.raut/payday/src/vendor/laravel/framework/src/Illuminate/Console/Command.php(153): Symfony\\Component\\Console\\Command\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArrayInput), Object(Illuminate\\Console\\OutputStyle))
#49 /Users/sanket.raut/payday/src/vendor/symfony/console/Application.php(1014): Illuminate\\Console\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArrayInput), Object(Symfony\\Component\\Console\\Output\\BufferedOutput))
#50 /Users/sanket.raut/payday/src/vendor/symfony/console/Application.php(301): Symfony\\Component\\Console\\Application->doRunCommand(Object(Illuminate\\Database\\Console\\Seeds\\SeedCommand), Object(Symfony\\Component\\Console\\Input\\ArrayInput), Object(Symfony\\Component\\Console\\Output\\BufferedOutput))
#51 /Users/sanket.raut/payday/src/vendor/symfony/console/Application.php(171): Symfony\\Component\\Console\\Application->doRun(Object(Symfony\\Component\\Console\\Input\\ArrayInput), Object(Symfony\\Component\\Console\\Output\\BufferedOutput))
#52 /Users/sanket.raut/payday/src/vendor/laravel/framework/src/Illuminate/Console/Application.php(102): Symfony\\Component\\Console\\Application->run(Object(Symfony\\Component\\Console\\Input\\ArrayInput), Object(Symfony\\Component\\Console\\Output\\BufferedOutput))
#53 /Users/sanket.raut/payday/src/vendor/laravel/framework/src/Illuminate/Console/Application.php(194): Illuminate\\Console\\Application->run(Object(Symfony\\Component\\Console\\Input\\ArrayInput), Object(Symfony\\Component\\Console\\Output\\BufferedOutput))
#54 /Users/sanket.raut/payday/src/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(336): Illuminate\\Console\\Application->call('db:seed', Array, NULL)
#55 /Users/sanket.raut/payday/src/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(338): Illuminate\\Foundation\\Console\\Kernel->call('db:seed', Array)
#56 /Users/sanket.raut/payday/src/app/Console/Commands/DB/DemoCommand.php(51): Illuminate\\Support\\Facades\\Facade::__callStatic('call', Array)
#57 /Users/sanket.raut/payday/src/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): App\\Console\\Commands\\DB\\DemoCommand->handle()
#58 /Users/sanket.raut/payday/src/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#59 /Users/sanket.raut/payday/src/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure(Object(Closure))
#60 /Users/sanket.raut/payday/src/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\\Container\\BoundMethod::callBoundMethod(Object(Illuminate\\Foundation\\Application), Array, Object(Closure))
#61 /Users/sanket.raut/payday/src/vendor/laravel/framework/src/Illuminate/Container/Container.php(661): Illuminate\\Container\\BoundMethod::call(Object(Illuminate\\Foundation\\Application), Array, Array, NULL)
#62 /Users/sanket.raut/payday/src/vendor/spatie/laravel-multitenancy/src/Commands/Concerns/TenantAware.php(34): Illuminate\\Container\\Container->call(Array)
#63 /Users/sanket.raut/payday/src/vendor/spatie/laravel-multitenancy/src/Models/Tenant.php(97): App\\Console\\Commands\\DB\\DemoCommand->Spatie\\Multitenancy\\Commands\\Concerns\\{closure}(Object(Spatie\\Multitenancy\\Models\\Tenant))
#64 /Users/sanket.raut/payday/src/vendor/spatie/laravel-multitenancy/src/Commands/Concerns/TenantAware.php(34): Spatie\\Multitenancy\\Models\\Tenant->execute(Object(Closure))
#65 /Users/sanket.raut/payday/src/vendor/laravel/framework/src/Illuminate/Collections/LazyCollection.php(789): App\\Console\\Commands\\DB\\DemoCommand->Spatie\\Multitenancy\\Commands\\Concerns\\{closure}(Object(Spatie\\Multitenancy\\Models\\Tenant), 0)
#66 /Users/sanket.raut/payday/src/vendor/laravel/framework/src/Illuminate/Collections/Traits/EnumeratesValues.php(733): Illuminate\\Support\\LazyCollection->Illuminate\\Support\\{closure}()
#67 /Users/sanket.raut/payday/src/vendor/laravel/framework/src/Illuminate/Collections/Traits/EnumeratesValues.php(470): Illuminate\\Support\\LazyCollection->reduce(Object(Closure), 0)
#68 /Users/sanket.raut/payday/src/vendor/spatie/laravel-multitenancy/src/Commands/Concerns/TenantAware.php(35): Illuminate\\Support\\LazyCollection->sum()
#69 /Users/sanket.raut/payday/src/vendor/symfony/console/Command/Command.php(291): App\\Console\\Commands\\DB\\DemoCommand->execute(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Illuminate\\Console\\OutputStyle))
#70 /Users/sanket.raut/payday/src/vendor/laravel/framework/src/Illuminate/Console/Command.php(153): Symfony\\Component\\Console\\Command\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Illuminate\\Console\\OutputStyle))
#71 /Users/sanket.raut/payday/src/vendor/symfony/console/Application.php(1014): Illuminate\\Console\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#72 /Users/sanket.raut/payday/src/vendor/symfony/console/Application.php(301): Symfony\\Component\\Console\\Application->doRunCommand(Object(App\\Console\\Commands\\DB\\DemoCommand), Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#73 /Users/sanket.raut/payday/src/vendor/symfony/console/Application.php(171): Symfony\\Component\\Console\\Application->doRun(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#74 /Users/sanket.raut/payday/src/vendor/laravel/framework/src/Illuminate/Console/Application.php(102): Symfony\\Component\\Console\\Application->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#75 /Users/sanket.raut/payday/src/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(155): Illuminate\\Console\\Application->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#76 /Users/sanket.raut/payday/src/artisan(37): Illuminate\\Foundation\\Console\\Kernel->handle(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#77 {main}
"} 

@masterix21
Copy link
Collaborator

@sanketr43, please create a repository with the issue and add me, so I'll try. If you can't, create a PR here with a pest-test to catch the issue. Thanks

@sanketr43
Copy link

Hello @masterix21
I have added you as a collaborator to my repo. I have mentioned their setup process and how to reproduce the issue. if you need more info then let me know. thank you so much for initiative.

@sanketr43
Copy link

@masterix21 are you able to check?

@masterix21
Copy link
Collaborator

@sanketr43: the invitation has expired

@masterix21
Copy link
Collaborator

Try again with the release 3.0.3. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants