Starting scan for user 1 out of 1 (massimo)
An unhandled exception has been thrown:
TypeError: OC\Files\Cache\Scanner::scanChildren(): Argument #6 ($oldSize) must be of type int, float given, called in /var/www/html/nextcloud/lib/private/Files/Cache/Scanner.php on line 347 and defined in /var/www/html/nextcloud/lib/private/Files/Cache/Scanner.php:391
Stack trace: #0 /var/www/html/nextcloud/lib/private/Files/Cache/Scanner.php(347): OC\Files\Cache\Scanner->scanChildren() #1 /var/www/html/nextcloud/lib/private/Files/Utils/Scanner.php(269): OC\Files\Cache\Scanner->scan() #2 /var/www/html/nextcloud/apps/files/lib/Command/Scan.php(164): OC\Files\Utils\Scanner->scan() #3 /var/www/html/nextcloud/apps/files/lib/Command/Scan.php(219): OCA\Files\Command\Scan->scanFiles() #4 /var/www/html/nextcloud/3rdparty/symfony/console/Command/Command.php(298): OCA\Files\Command\Scan->execute() #5 /var/www/html/nextcloud/core/Command/Base.php(177): Symfony\Component\Console\Command\Command->run() #6 /var/www/html/nextcloud/3rdparty/symfony/console/Application.php(1040): OC\Core\Command\Base->run() #7 /var/www/html/nextcloud/3rdparty/symfony/console/Application.php(301): Symfony\Component\Console\Application->doRunCommand() #8 /var/www/html/nextcloud/3rdparty/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun() #9 /var/www/html/nextcloud/lib/private/Console/Application.php(211): Symfony\Component\Console\Application->run() #10 /var/www/html/nextcloud/console.php(100): OC\Console\Application->run() #11 /var/www/html/nextcloud/occ(11): require_once(‘…’)
I have the same issue. 32-bit PHP 8.1 on Raspberry Pi 3. If you change the type of parameter 6 from int to float on line 391 the scanner runs. I have never looked at the nextcloud code nor do I have any knowledge of any of its workings. I am just letting people know the scanner completes if making this change. I am not sure of any of the other consequences this might bring.
Editing Nextclouds code is way out of my comfort zone. But since there seemed to other options, I did it anyway as suggested by sruckh and it worked. Thank you!
Scan is currently running for the last user and I will revert it to int as soon as that finishes because I am so scared of meddling inside NC code base.
From the error message this seems to be a plain bug in scanner.php: inconsistent data types within the same file. Or am I wrong, is there anything the user could do to avoid this?