theProfit's avatar

Laravel Horizon Error: The script tried to call a method on an incomplete object

Hi All,

i get this error by some jobs in laravel Horizon :

Error: The script tried to call a method on an incomplete object. Please ensure that the class definition "App\Jobs\SWUpdateStock" 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 /home/forge/blablabla.com/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php:117

i dont know why this is happend i have deployed and restart the server cleared cache ect, some work others dont work.

0 likes
2 replies
newbie360's avatar

@theprofit I guess you have multiple projects on the web server, but you started one worker for all these projects ?

so some project-A jobs may not exists in project-B ?

1 like
r14ull's avatar

Hello @theprofit did you ever figure out the problem? I have the same intermittent issue with Horizon

Please or to participate in this conversation.