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 resolveAndFire issues #2885

Closed
lol768 opened this issue Dec 8, 2013 · 6 comments
Closed

Queue resolveAndFire issues #2885

lol768 opened this issue Dec 8, 2013 · 6 comments

Comments

@lol768
Copy link
Contributor

lol768 commented Dec 8, 2013

I frequently have issues with the queuing system (I've had the same issue with 4.0 and 4.1) which causes the following error to be printed to the logs:

[2013-12-08 18:58:10] production.ERROR: exception 'ErrorException' with message 'Argument 1 passed to Illuminate\Queue\Jobs\Job::resolveAndFire() must be of the type array, null given, called in /home/application/repo/laravel/vendor/laravel/framework/src/Illuminate/Queue/Jobs/BeanstalkdJob.php on line 50 and defined' in /home/application/repo/laravel/vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php:88
Stack trace:
#0 /home/application/repo/laravel/vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php(88): Illuminate\Exception\Handler->handleError(4096, 'Argument 1 pass...', '/home/applicatio...', 88, Array)
#1 /home/application/repo/laravel/vendor/laravel/framework/src/Illuminate/Queue/Jobs/BeanstalkdJob.php(50): Illuminate\Queue\Jobs\Job->resolveAndFire(NULL)
#2 /home/application/repo/laravel/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(119): Illuminate\Queue\Jobs\BeanstalkdJob->fire()
#3 /home/application/repo/laravel/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(71): Illuminate\Queue\Worker->process('beanstalkd', Object(Illuminate\Queue\Jobs\BeanstalkdJob), '0', '0')
#4 /home/application/repo/laravel/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(64): Illuminate\Queue\Worker->pop(NULL, 'default', '0', '128', '3', '0')
#5 /home/application/repo/laravel/vendor/laravel/framework/src/Illuminate/Console/Command.php(108): Illuminate\Queue\Console\WorkCommand->fire()
#6 /home/application/repo/laravel/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(241): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 /home/application/repo/laravel/vendor/laravel/framework/src/Illuminate/Console/Command.php(96): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 /home/application/repo/laravel/vendor/symfony/console/Symfony/Component/Console/Application.php(881): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 /home/application/repo/laravel/vendor/symfony/console/Symfony/Component/Console/Application.php(191): Symfony\Component\Console\Application->doRunCommand(Object(Illuminate\Queue\Console\WorkCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /home/application/repo/laravel/vendor/symfony/console/Symfony/Component/Console/Application.php(121): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 /home/application/repo/laravel/artisan(59): Symfony\Component\Console\Application->run()

I'm unsure if there's a way to find out which job is causing this and I'm unsure as to why this is happening. By modifying some of the queue handling classes, I was able to determine that it's not receiving any JSON at all in the form of the job data.

@taylorotwell
Copy link
Member

Odd. You might just examine everywhere you push stuff onto the queue and see if anything weird is going on with any of those.

@lol768
Copy link
Contributor Author

lol768 commented Dec 8, 2013

I'll give logging all the data that's sent a go.

@lol768
Copy link
Contributor Author

lol768 commented Dec 9, 2013

Gonna go ahead and close this as I can't reproduce it anymore

@lol768 lol768 closed this as completed Dec 9, 2013
@jahanzebk
Copy link

jahanzebk commented Jun 9, 2016

I know this is old, but for anyone else who finds this, it's probably because the json in the message is invalid or causing an error when php tries to decode it.

@mkhuramj
Copy link

mkhuramj commented Sep 2, 2016

It's old but I had the same issue using beanstalkd. When I debugged the issue by dd() in the vendor/laravel/framework/src/Illuminate/Queue/Jobs/BeanstalkdJob.php in fire() method where json is being decoded. I came to know that the "_data" was null, which means there was no job assigned when Queue::push() was called.
So, it was my mistake, as was checking a couple of scenarios in many files and couldn't update to push correctly in the queue.

@mathiasgrimm
Copy link

had the same problem... I had created a msg from the AWS console and turns out it wasn't a valid message... after deleting the manually created msg everything worked like charm (laravel 5.2)

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

5 participants