Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

When running backup after the command completed it throws an error, maybe conflicting with ActivityLogger #1732

Closed
ronnorthrip opened this issue Nov 9, 2023 · 1 comment

Comments

@ronnorthrip
Copy link

PHP Fatal error: Uncaught TypeError: Spatie\Activitylog\ActivityLogger::performedOn(): Argument #1 ($model) must be of type Illuminate\Database\Eloquent\Model, Spatie\Backup\Notifications\Notifiable given, called in /home/forge/bluehorseentries.com/releases/20231109191744/app/Listeners/LogNotification.php on line 23 and defined in /home/forge/bluehorseentries.com/releases/20231109191744/vendor/spatie/laravel-activitylog/src/ActivityLogger.php:48
Stack trace:
#0 /home/forge/bluehorseentries.com/releases/20231109191744/app/Listeners/LogNotification.php(23): Spatie\Activitylog\ActivityLogger->performedOn()
#1 /home/forge/bluehorseentries.com/releases/20231109191744/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(441): App\Listeners\LogNotification->handle()
#2 /home/forge/bluehorseentries.com/releases/20231109191744/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(249): Illuminate\Events\Dispatcher->Illuminate\Events{closure}()
#3 /home/forge/bluehorseentries.com/releases/20231109191744/vendor/laravel/framework/src/Illuminate/Notifications/NotificationSender.php(150): Illuminate\Events\Dispatcher->dispatch()
#4 /home/forge/bluehorseentries.com/releases/20231109191744/vendor/laravel/framework/src/Illuminate/Notifications/NotificationSender.php(106): Illuminate\Notifications\NotificationSender->sendToNotifiable()
#5 /home/forge/bluehorseentries.com/releases/20231109191744/vendor/laravel/framework/src/Illuminate/Support/Traits/Localizable.php(19): Illuminate\Notifications\NotificationSender->Illuminate\Notifications{closure}()
#6 /home/forge/bluehorseentries.com/releases/20231109191744/vendor/laravel/framework/src/Illuminate/Notifications/NotificationSender.php(101): Illuminate\Notifications\NotificationSender->withLocale()
#7 /home/forge/bluehorseentries.com/releases/20231109191744/vendor/laravel/framework/src/Illuminate/Notifications/NotificationSender.php(79): Illuminate\Notifications\NotificationSender->sendNow()
#8 /home/forge/bluehorseentries.com/releases/20231109191744/vendor/laravel/framework/src/Illuminate/Notifications/ChannelManager.php(39): Illuminate\Notifications\NotificationSender->send()
#9 /home/forge/bluehorseentries.com/releases/20231109191744/vendor/laravel/framework/src/Illuminate/Notifications/RoutesNotifications.php(18): Illuminate\Notifications\ChannelManager->send()
#10 /home/forge/bluehorseentries.com/releases/20231109191744/vendor/spatie/laravel-backup/src/Notifications/EventHandler.php(30): Spatie\Backup\Notifications\Notifiable->notify()
#11 /home/forge/bluehorseentries.com/releases/20231109191744/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(421): Spatie\Backup\Notifications\EventHandler->Spatie\Backup\Notifications{closure}()
#12 /home/forge/bluehorseentries.com/releases/20231109191744/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(249): Illuminate\Events\Dispatcher->Illuminate\Events{closure}()
#13 /home/forge/bluehorseentries.com/releases/20231109191744/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php(433): Illuminate\Events\Dispatcher->dispatch()
#14 /home/forge/bluehorseentries.com/releases/20231109191744/vendor/spatie/laravel-backup/src/Tasks/Cleanup/CleanupJob.php(63): event()
#15 /home/forge/bluehorseentries.com/releases/20231109191744/vendor/spatie/laravel-backup/src/Tasks/Cleanup/CleanupJob.php(46): Spatie\Backup\Tasks\Cleanup\CleanupJob->sendNotification()
#16 /home/forge/bluehorseentries.com/releases/20231109191744/vendor/laravel/framework/src/Illuminate/Collections/Traits/EnumeratesValues.php(238): Spatie\Backup\Tasks\Cleanup\CleanupJob->Spatie\Backup\Tasks\Cleanup{closure}()
#17 /home/forge/bluehorseentries.com/releases/20231109191744/vendor/spatie/laravel-backup/src/Tasks/Cleanup/CleanupJob.php(34): Illuminate\Support\Collection->each()
#18 /home/forge/bluehorseentries.com/releases/20231109191744/vendor/spatie/laravel-backup/src/Commands/CleanupCommand.php(46): Spatie\Backup\Tasks\Cleanup\CleanupJob->run()
#19 /home/forge/bluehorseentries.com/releases/20231109191744/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Spatie\Backup\Commands\CleanupCommand->handle()
#20 /home/forge/bluehorseentries.com/releases/20231109191744/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\Container\BoundMethod::Illuminate\Container{closure}()
#21 /home/forge/bluehorseentries.com/releases/20231109191744/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure()
#22 /home/forge/bluehorseentries.com/releases/20231109191744/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\Container\BoundMethod::callBoundMethod()
#23 /home/forge/bluehorseentries.com/releases/20231109191744/vendor/laravel/framework/src/Illuminate/Container/Container.php(662): Illuminate\Container\BoundMethod::call()
#24 /home/forge/bluehorseentries.com/releases/20231109191744/vendor/laravel/framework/src/Illuminate/Console/Command.php(211): Illuminate\Container\Container->call()
#25 /home/forge/bluehorseentries.com/releases/20231109191744/vendor/symfony/console/Command/Command.php(326): Illuminate\Console\Command->execute()
#26 /home/forge/bluehorseentries.com/releases/20231109191744/vendor/laravel/framework/src/Illuminate/Console/Command.php(180): Symfony\Component\Console\Command\Command->run()
#27 /home/forge/bluehorseentries.com/releases/20231109191744/vendor/spatie/laravel-backup/src/Commands/BaseCommand.php(28): Illuminate\Console\Command->run()
#28 /home/forge/bluehorseentries.com/releases/20231109191744/vendor/symfony/console/Application.php(1081): Spatie\Backup\Commands\BaseCommand->run()
#29 /home/forge/bluehorseentries.com/releases/20231109191744/vendor/symfony/console/Application.php(320): Symfony\Component\Console\Application->doRunCommand()
#30 /home/forge/bluehorseentries.com/releases/20231109191744/vendor/symfony/console/Application.php(174): Symfony\Component\Console\Application->doRun()
#31 /home/forge/bluehorseentries.com/releases/20231109191744/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(201): Symfony\Component\Console\Application->run()
#32 /home/forge/bluehorseentries.com/releases/20231109191744/artisan(35): Illuminate\Foundation\Console\Kernel->handle()
#33 {main}
thrown in /home/forge/bluehorseentries.com/releases/20231109191744/vendor/spatie/laravel-activitylog/src/ActivityLogger.php on line 48
PHP Fatal error: Uncaught Symfony\Component\ErrorHandler\Error\FatalError: Uncaught TypeError: Spatie\Activitylog\ActivityLogger::performedOn(): Argument #1 ($model) must be of type Illuminate\Database\Eloquent\Model, Spatie\Backup\Notifications\Notifiable given, called in /home/forge/bluehorseentries.com/releases/20231109191744/app/Listeners/LogNotification.php on line 23 and defined in /home/forge/bluehorseentries.com/releases/20231109191744/vendor/spatie/laravel-activitylog/src/ActivityLogger.php:48
Stack trace:
#0 /home/forge/bluehorseentries.com/releases/20231109191744/app/Listeners/LogNotification.php(23): Spatie\Activitylog\ActivityLogger->performedOn()
#1 /home/forge/bluehorseentries.com/releases/20231109191744/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(441): App\Listeners\LogNotification->handle()
#2 /home/forge/bluehorseentries.com/releases/20231109191744/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(249): Illuminate\Events\Dispatcher->Illuminate\Events{closure}()
#3 /home/forge/bluehorseentries.com/releases/20231109191744/vendor/laravel/framework/src/Illuminate/Notifications/NotificationSender.php(150): Illuminate\Events\Dispatcher->dispatch()
#4 /home/forge/bluehorseentries.com/releases/20231109191744/vendor/laravel/framework/src/Illuminate/Notifications/NotificationSender.php(106): Illuminate\Notifications\NotificationSender->sendToNotifiable()
#5 /home/forge/bluehorseentries.com/releases/20231109191744/vendor/laravel/framework/src/Illuminate/Support/Traits/Localizable.php(19): Illuminate\Notifications\NotificationSender->Illuminate\Notifications{closure}()
#6 /home/forge/bluehorseentries.com/releases/20231109191744/vendor/laravel/framework/src/Illuminate/Notifications/NotificationSender.php(101): Illuminate\Notifications\NotificationSender->withLocale()
#7 /home/forge/bluehorseentries.com/releases/20231109191744/vendor/laravel/framework/src/Illuminate/Notifications/NotificationSender.php(79): Illuminate\Notifications\NotificationSender->sendNow()
#8 /home/forge/bluehorseentries.com/releases/20231109191744/vendor/laravel/framework/src/Illuminate/Notifications/ChannelManager.php(39): Illuminate\Notifications\NotificationSender->send()
#9 /home/forge/bluehorseentries.com/releases/20231109191744/vendor/laravel/framework/src/Illuminate/Notifications/RoutesNotifications.php(18): Illuminate\Notifications\ChannelManager->send()
#10 /home/forge/bluehorseentries.com/releases/20231109191744/vendor/spatie/laravel-backup/src/Notifications/EventHandler.php(30): Spatie\Backup\Notifications\Notifiable->notify()
#11 /home/forge/bluehorseentries.com/releases/20231109191744/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(421): Spatie\Backup\Notifications\EventHandler->Spatie\Backup\Notifications{closure}()
#12 /home/forge/bluehorseentries.com/releases/20231109191744/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(249): Illuminate\Events\Dispatcher->Illuminate\Events{closure}()
#13 /home/forge/bluehorseentries.com/releases/20231109191744/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php(433): Illuminate\Events\Dispatcher->dispatch()
#14 /home/forge/bluehorseentries.com/releases/20231109191744/vendor/spatie/laravel-backup/src/Tasks/Cleanup/CleanupJob.php(63): event()
#15 /home/forge/bluehorseentries.com/releases/20231109191744/vendor/spatie/laravel-backup/src/Tasks/Cleanup/CleanupJob.php(46): Spatie\Backup\Tasks\Cleanup\CleanupJob->sendNotification()
#16 /home/forge/bluehorseentries.com/releases/20231109191744/vendor/laravel/framework/src/Illuminate/Collections/Traits/EnumeratesValues.php(238): Spatie\Backup\Tasks\Cleanup\CleanupJob->Spatie\Backup\Tasks\Cleanup{closure}()
#17 /home/forge/bluehorseentries.com/releases/20231109191744/vendor/spatie/laravel-backup/src/Tasks/Cleanup/CleanupJob.php(34): Illuminate\Support\Collection->each()
#18 /home/forge/bluehorseentries.com/releases/20231109191744/vendor/spatie/laravel-backup/src/Commands/CleanupCommand.php(46): Spatie\Backup\Tasks\Cleanup\CleanupJob->run()
#19 /home/forge/bluehorseentries.com/releases/20231109191744/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Spatie\Backup\Commands\CleanupCommand->handle()
#20 /home/forge/bluehorseentries.com/releases/20231109191744/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\Container\BoundMethod::Illuminate\Container{closure}()
#21 /home/forge/bluehorseentries.com/releases/20231109191744/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure()
#22 /home/forge/bluehorseentries.com/releases/20231109191744/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\Container\BoundMethod::callBoundMethod()
#23 /home/forge/bluehorseentries.com/releases/20231109191744/vendor/laravel/framework/src/Illuminate/Container/Container.php(662): Illuminate\Container\BoundMethod::call()
#24 /home/forge/bluehorseentries.com/releases/20231109191744/vendor/laravel/framework/src/Illuminate/Console/Command.php(211): Illuminate\Container\Container->call()
#25 /home/forge/bluehorseentries.com/releases/20231109191744/vendor/symfony/console/Command/Command.php(326): Illuminate\Console\Command->execute()
#26 /home/forge/bluehorseentries.com/releases/20231109191744/vendor/laravel/framework/src/Illuminate/Console/Command.php(180): Symfony\Component\Console\Command\Command->run()
#27 /home/forge/bluehorseentries.com/releases/20231109191744/vendor/spatie/laravel-backup/src/Commands/BaseCommand.php(28): Illuminate\Console\Command->run()
#28 /home/forge/bluehorseentries.com/releases/20231109191744/vendor/symfony/console/Application.php(1081): Spatie\Backup\Commands\BaseCommand->run()
#29 /home/forge/bluehorseentries.com/releases/20231109191744/vendor/symfony/console/Application.php(320): Symfony\Component\Console\Application->doRunCommand()
#30 /home/forge/bluehorseentries.com/releases/20231109191744/vendor/symfony/console/Application.php(174): Symfony\Component\Console\Application->doRun()
#31 /home/forge/bluehorseentries.com/releases/20231109191744/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(201): Symfony\Component\Console\Application->run()
#32 /home/forge/bluehorseentries.com/releases/20231109191744/artisan(35): Illuminate\Foundation\Console\Kernel->handle()
#33 {main}
thrown in /home/forge/bluehorseentries.com/releases/20231109191744/vendor/spatie/laravel-activitylog/src/ActivityLogger.php:48
Stack trace:
#0 {main}
thrown in /home/forge/bluehorseentries.com/releases/20231109191744/vendor/spatie/laravel-activitylog/src/ActivityLogger.php on line 48

@ronnorthrip
Copy link
Author

Also please note that its working FINE on my local Mac.

Here's my backup config and composer.json in case its relevant:

composer.json
backup.txt

@spatie spatie locked and limited conversation to collaborators Nov 10, 2023
@freekmurze freekmurze converted this issue into discussion #1733 Nov 10, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant