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

occ duplicates:find-all broken in NC23 #92

Open
jhakonen opened this issue Aug 3, 2022 · 4 comments
Open

occ duplicates:find-all broken in NC23 #92

jhakonen opened this issue Aug 3, 2022 · 4 comments

Comments

@jhakonen
Copy link

jhakonen commented Aug 3, 2022

Trying to run find-all command in Nextcloud 23.0.7 produces error:

$ docker-compose exec --user www-data app php occ duplicates:find-all -u jhakonen
Start searching files for jhakonen in path /jhakonen/files
An unhandled exception has been thrown:
TypeError: OC\Files\Utils\Scanner::__construct(): Argument #4 ($logger) must be of type OCP\ILogger, OC\AppFramework\ScopedPsrLogger given, called in /var/www/html/custom_apps/duplicatefinder/lib/Utils/ScannerUtil.php on line 73 and defined in /var/www/html/lib/private/Files/Utils/Scanner.php:97
Stack trace:
#0 /var/www/html/custom_apps/duplicatefinder/lib/Utils/ScannerUtil.php(73): OC\Files\Utils\Scanner->__construct('jhakonen', Object(OC\DB\ConnectionAdapter), Object(OC\EventDispatcher\EventDispatcher), Object(OC\AppFramework\ScopedPsrLogger))
#1 /var/www/html/custom_apps/duplicatefinder/lib/Utils/ScannerUtil.php(63): OCA\DuplicateFinder\Utils\ScannerUtil->initializeScanner('jhakonen', false)
#2 /var/www/html/custom_apps/duplicatefinder/lib/Service/FileInfoService.php(257): OCA\DuplicateFinder\Utils\ScannerUtil->scan('jhakonen', '/jhakonen/files')
#3 /var/www/html/custom_apps/duplicatefinder/lib/Command/FindDuplicates.php(152): OCA\DuplicateFinder\Service\FileInfoService->scanFiles('jhakonen', NULL, Object(Closure), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 /var/www/html/custom_apps/duplicatefinder/lib/Command/FindDuplicates.php(133): OCA\DuplicateFinder\Command\FindDuplicates->findDuplicates('jhakonen')
#5 /var/www/html/custom_apps/duplicatefinder/lib/Command/FindDuplicates.php(109): OCA\DuplicateFinder\Command\FindDuplicates->findDuplicatesForUsers(Array)
#6 /var/www/html/3rdparty/symfony/console/Command/Command.php(255): OCA\DuplicateFinder\Command\FindDuplicates->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 /var/www/html/core/Command/Base.php(168): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 /var/www/html/3rdparty/symfony/console/Application.php(1009): OC\Core\Command\Base->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 /var/www/html/3rdparty/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand(Object(OCA\DuplicateFinder\Command\FindDuplicates), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /var/www/html/3rdparty/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 /var/www/html/lib/private/Console/Application.php(211): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#12 /var/www/html/console.php(100): OC\Console\Application->run()
#13 /var/www/html/occ(11): require_once('/var/www/html/c...')

Looks like change #86 causes this error. If I revert the change then the command works fine.

I'm using latest 0.0.15 version of Duplicate Finder.

@reddy75
Copy link

reddy75 commented Aug 14, 2022

Hello, I am experiencing same issue in Nextcloud 23.0.8, duplicatefinder version 0.0.15.
nextcloud23_duplicates_issue.txt

# occ duplicates:find-all
sudo -u www-data php /var/www/nextcloud/occ
Start searching files for admin in path /admin/files
An unhandled exception has been thrown:
TypeError: Argument 4 passed to OC\Files\Utils\Scanner::__construct() must implement interface OCP\ILogger, instance of OC\AppFramework\ScopedPsrLogger given, called in /mvol-r1/www/nextcloud/apps/duplicatefinder/lib/Utils/ScannerUtil.php on line 73 and defined in /mvol-r1/www/nextcloud/lib/private/Files/Utils/Scanner.php:97
Stack trace:
#0 /mvol-r1/www/nextcloud/apps/duplicatefinder/lib/Utils/ScannerUtil.php(73): OC\Files\Utils\Scanner->__construct('admin', Object(OC\DB\ConnectionAdapter), Object(OC\EventDispatcher\EventDispatcher), Object(OC\AppFramework\ScopedPsrLogger))
#1 /mvol-r1/www/nextcloud/apps/duplicatefinder/lib/Utils/ScannerUtil.php(63): OCA\DuplicateFinder\Utils\ScannerUtil->initializeScanner('admin', false)
#2 /mvol-r1/www/nextcloud/apps/duplicatefinder/lib/Service/FileInfoService.php(257): OCA\DuplicateFinder\Utils\ScannerUtil->scan('admin', '/admin/files')
#3 /mvol-r1/www/nextcloud/apps/duplicatefinder/lib/Command/FindDuplicates.php(152): OCA\DuplicateFinder\Service\FileInfoService->scanFiles('admin', NULL, Object(Closure), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 /mvol-r1/www/nextcloud/apps/duplicatefinder/lib/Command/FindDuplicates.php(112): OCA\DuplicateFinder\Command\FindDuplicates->findDuplicates('admin')
#5 /mvol-r1/www/nextcloud/lib/private/User/Manager.php(551): OCA\DuplicateFinder\Command\FindDuplicates->OCA\DuplicateFinder\Command\{closure}(Object(OC\User\User))
#6 /mvol-r1/www/nextcloud/apps/duplicatefinder/lib/Command/FindDuplicates.php(113): OC\User\Manager->callForAllUsers(Object(Closure))
#7 /mvol-r1/www/nextcloud/3rdparty/symfony/console/Command/Command.php(255): OCA\DuplicateFinder\Command\FindDuplicates->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 /mvol-r1/www/nextcloud/core/Command/Base.php(168): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 /mvol-r1/www/nextcloud/3rdparty/symfony/console/Application.php(1009): OC\Core\Command\Base->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /mvol-r1/www/nextcloud/3rdparty/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand(Object(OCA\DuplicateFinder\Command\FindDuplicates), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 /mvol-r1/www/nextcloud/3rdparty/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#12 /mvol-r1/www/nextcloud/lib/private/Console/Application.php(211): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#13 /mvol-r1/www/nextcloud/console.php(100): OC\Console\Application->run()
#14 /mvol-r1/www/nextcloud/occ(11): require_once('/mvol-r1/www/ne...')

@b3nis
Copy link

b3nis commented Aug 27, 2022

Same issue for me.

@nielsson4711
Copy link

Hello, I am experiencing same issue in Nextcloud 21.0.0, duplicatefinder version 0.0.15.

@A1asd
Copy link

A1asd commented Jan 17, 2023

hey, same problem for me. running nextcloud 23.0.12, duplicatefinder on 0.0.15 and php 7.3
just upgraded to php 7.4, still the same issue. duplicates:list works fine and the app finds duplicates on file uploading. i just cannot run the command

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