owncloud / core

:cloud: ownCloud web server core (Files, DAV, etc.)
https://owncloud.com
GNU Affero General Public License v3.0
8.35k stars 2.06k forks source link

broken commands kill occ #33895

Open butonic opened 5 years ago

butonic commented 5 years ago

If an app ships with an incompatible command the occ command will be broken and unusable, eg:

An unhandled exception has been thrown:
ArgumentCountError: Too few arguments to function OCA\User_LDAP\Command\Search::__construct(), 0 passed in /var/www/owncloud/lib/private/Console/Application.php on line 170 and exactly 3 expected in /var/www/owncloud/apps/user_ldap/lib/Command/Search.php:50
Stack trace:
#0 /var/www/owncloud/lib/private/Console/Application.php(170): OCA\User_LDAP\Command\Search->__construct()
#1 /var/www/owncloud/lib/private/Console/Application.php(108): OC\Console\Application->loadCommandsFromInfoXml(Array)
#2 /var/www/owncloud/console.php(105): OC\Console\Application->loadCommands(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#3 /var/www/owncloud/occ(11): require_once('/var/www/ownclo...')
#4 {main}

https://github.com/owncloud/core/blob/3bff5c2aca12499972f285e0cf2ea467a473c6b5/lib/private/Console/Application.php#L164-L178

ownclouders commented 5 years ago

GitMate.io thinks possibly related issues are https://github.com/owncloud/core/issues/13402 (... broken), https://github.com/owncloud/core/issues/24494 (occ command to clear all locks), https://github.com/owncloud/core/issues/13976 (Kill OC_Request), https://github.com/owncloud/core/issues/25964 (occ-.htaccess generation breaks .htaccess), and https://github.com/owncloud/core/pull/30177 (Kill occ command maintenance:createjs).

Kanishksgithub commented 10 months ago

i want to work on this could you briefly define exactly what i have to do in this issue

DeepDiver1975 commented 10 months ago

i want to work on this could you briefly define exactly what i have to do in this issue

instead of throwing the exception write a log statement - this way the loop will finish and all other commands are available ....

Kanishksgithub commented 10 months ago

could you assign me i want to work on this issue

Kanishksgithub commented 10 months ago

i want to fix this bug

DeepDiver1975 commented 10 months ago

could you assign me i want to work on this issue

Just go for it an submit your pull request. THX a lot! :pray: