-
Notifications
You must be signed in to change notification settings - Fork 70
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
exception 'InvalidArgumentException' with message 'There are no commands defined in the "xxx" namespace.' #68
Comments
This doesn't look like anything to do with dispatcher, but an issue with the commands themselves. Please verify all of your artisan commands are able to be run standalone, outside of |
The command runs perfectly as standalone, but throws error when I used this package. |
The stack trace indicates that it's trying to run |
Yes I was able to run it successfully by running artisan trusty:log The cron looks like this
When I replace the "scheduled:run 1>> /dev/null 2>&1" with "trusty:log" it works. Reverting back keeps throwing the error: " no commands defined in the "trusty" namespace" I'm not sure why. Perhaps it's the cron problem. Because when I ssh'd and run: php /home/trustywebapp/public_html/stagingtrusty/artisan scheduled:run 1>> /dev/null 2>&1 |
Got this to work by changing this
Notice the double quotes around "scheduled:run" |
That's pretty odd... glad to hear you got it working though! |
Have the same problem. Command runs without any problem standalone. Double quotes didn't fix anything for me. "InvalidArgumentExceptionvendor/symfony/console/Symfony/Component/Console/Application.php:516 Also changed the executable setting to be "/usr/bin/php5-cli" that is true in my case. Again no luck. |
I had this issue on a server earlier this week and using |
Thing is that is working ok without the dispacher. Anyway I'll try some things and let you know. |
Just starting testing out Dispatcher today, running into this same issue. Still get |
Any idea? Keep getting that, so basically I can't use it in my live server. |
The challenge I'm facing here is that I don't believe this is an issue with Dispatcher, it's an underlying issue with Laravel and/or Symfony (probably symfony). Dispatcher is simply generating a linux command and running that in a background process. Have you tried running the exact command that Dispatcher generates manually on the server? Whether this executable command is configured or not, it should produce consistent results manually as it does being run by Dispatcher. |
I am also having the same problem in production. Works find locally but can't get it to run on the production server |
php artisan notification:day php-cli artisan notification:day works fine. php artisan scheduled:run php-cli artisan scheduled:run |
@SparkEleven In 1.X commands don't inherit the php executable from |
OK, brilliant that works, thanks. |
Does this solve the issue for anyone else that hasn't tried this? |
Its ok now. I have changed the config in the local env by mistake. Changed that, worked fine. |
Setting the executable in config fixed it for me too, thanks. |
Awesome, Thanks. |
Fix: |
This has been solved? I'm trying to use Dispacher and I keep getting this error… I've already read all the comments as make all suggestion and still no luck. |
@caneco in my /app/config/packages/indatus/dispatcher/config.php I have 'executable' => '/usr/bin/php-cli' Does that help? |
@SparkEleven that really made the trick! Thank you! |
@SparkEleven Thank, it solved! |
if you dont find config files in app/config |
I'm getting this error:
[2014-08-24 20:19:02] staging.ERROR: exception 'InvalidArgumentException' with message 'There are no commands defined in the "trusty" namespace.' in /home/trustywebapp/public_html/stagingtrusty/vendor/symfony/console/Symfony/Component/Console/Application.php:516
Stack trace:
#0 /home/trustywebapp/public_html/stagingtrusty/vendor/symfony/console/Symfony/Component/Console/Application.php(550): Symfony\Component\Console\Application->findNamespace('trusty')
#1 /home/trustywebapp/public_html/stagingtrusty/vendor/symfony/console/Symfony/Component/Console/Application.php(190): Symfony\Component\Console\Application->find('trusty:log')
#2 /home/trustywebapp/public_html/stagingtrusty/vendor/symfony/console/Symfony/Component/Console/Application.php(124): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#3 /home/trustywebapp/public_html/stagingtrusty/artisan(58): Symfony\Component\Console\Application->run()
#4 {main} [] []
This is what I put in the cpanel cron job:
php /home/trustywebapp/public_html/stagingtrusty/artisan scheduled:run 1>> /dev/null 2>&1
Pls help.
The text was updated successfully, but these errors were encountered: