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

[BUG] Error: The script tried to call a method on an incomplete object. #203

Open
dragonfire1119 opened this issue May 16, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@dragonfire1119
Copy link

Describe the bug
When eager loading is enabled, scout:import fails on the horizon queue.

To Reproduce
Steps to reproduce the behavior:

  1. Run a command 'php artisan scout:import App\Post'
  2. Error: The script tried to call a method on an incomplete object. Please ensure that the class definition "App\Services\WithPostsScope" of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide an autoloader to load the class definition in /app/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php:163

Expected behavior
To use horizon queue to import my model.

Additional context
Only appears to fail when queuing the import.

Version
This package version: 5.0.2

Laravel Framework 9.10.1
Laravel Scout 9.4.7
Laravel Horizon 5.9

@dragonfire1119 dragonfire1119 added the bug Something isn't working label May 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant