SMB issue external files stuck on pending

happend one day idk what caused it

we have a windows server and on it we have a vitual machine that is running linux with nextcloud
the systems are connect with ACL.

the problem is that 4 of 12 the shared foleders are pending and inaccessible

I tried to run: sudo -u www-data ./occ files:scan --all

but got this error:

Exception during scan: Unknown error (34) for /Materia%C5%82y%20marketingowe/Logo
#0 /nextcloud/apps/files_external/3rdparty/icewind/smb/src/Exception/Exception.php(49): Icewind\SMB\Exception\Exception::unknown()
#1 /nextcloud/apps/files_external/3rdparty/icewind/smb/src/Native/NativeState.php(75): Icewind\SMB\Exception\Exception::fromMap()
#2 /nextcloud/apps/files_external/3rdparty/icewind/smb/src/Native/NativeState.php(92): Icewind\SMB\Native\NativeState->handleError()
#3 /nextcloud/apps/files_external/3rdparty/icewind/smb/src/Native/NativeState.php(351): Icewind\SMB\Native\NativeState->testResult()
#4 /nextcloud/apps/files_external/3rdparty/icewind/smb/src/Native/NativeShare.php(305): Icewind\SMB\Native\NativeState->getxattr()
#5 /nextcloud/apps/files_external/3rdparty/icewind/smb/src/Native/NativeFileInfo.php(149): Icewind\SMB\Native\NativeShare->getAttribute()
#6 /nextcloud/apps/files_external/lib/Lib/Storage/SMB.php(226): Icewind\SMB\Native\NativeFileInfo->getAcls()
#7 /nextcloud/apps/files_external/lib/Lib/Storage/SMB.php(263): OCA\Files_External\Lib\Storage\SMB->getACL()
#8 /nextcloud/apps/files_external/lib/Lib/Storage/SMB.php(633): OCA\Files_External\Lib\Storage\SMB->getFolderContents()
#9 /nextcloud/lib/private/Files/Storage/Wrapper/PermissionsMask.php(157): OCA\Files_External\Lib\Storage\SMB->getDirectoryContent()
#10 [internal function]: OC\Files\Storage\Wrapper\PermissionsMask->getDirectoryContent()
#11 /nextcloud/lib/private/Files/Cache/Scanner.php(410): iterator_to_array()
#12 /nextcloud/lib/private/Files/Cache/Scanner.php(390): OC\Files\Cache\Scanner->handleChildren()
#13 /nextcloud/lib/private/Files/Cache/Scanner.php(342): OC\Files\Cache\Scanner->scanChildren()
#14 /nextcloud/lib/private/Files/Utils/Scanner.php(256): OC\Files\Cache\Scanner->scan()
#15 /nextcloud/apps/files/lib/Command/Scan.php(144): OC\Files\Utils\Scanner->scan()
#16 /nextcloud/apps/files/lib/Command/Scan.php(200): OCA\Files\Command\Scan->scanFiles()
#17 /nextcloud/3rdparty/symfony/console/Command/Command.php(255): OCA\Files\Command\Scan->execute()
#18 /nextcloud/core/Command/Base.php(168): Symfony\Component\Console\Command\Command->run()
#19 /nextcloud/3rdparty/symfony/console/Application.php(1009): OC\Core\Command\Base->run()
#20 /nextcloud/3rdparty/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand()
#21 /nextcloud/3rdparty/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun()
#22 /nextcloud/lib/private/Console/Application.php(211): Symfony\Component\Console\Application->run()
#23 /nextcloud/console.php(100): OC\Console\Application->run()
#24 /nextcloud/occ(11): require_once(‘…’)
#25 {main}

all help is greatly appreciated.

I had the same Problem, my log looks like the following

Starting scan for user 1 out of 4 (brot)
Exception during scan: Unknown error (34) for /INFO
#0 /var/www/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Exception/Exception.php(49): Icewind\SMB\Exception\Exception::unknown()
#1 /var/www/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Native/NativeState.php(75): Icewind\SMB\Exception\Exception::fromMap()
#2 /var/www/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Native/NativeState.php(92): Icewind\SMB\Native\NativeState->handleError(
)
#3 /var/www/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Native/NativeState.php(351): Icewind\SMB\Native\NativeState->testResult(
)
#4 /var/www/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Native/NativeShare.php(305): Icewind\SMB\Native\NativeState->getxattr()
#5 /var/www/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Native/NativeFileInfo.php(149): Icewind\SMB\Native\NativeShare->getAttri
bute()
#6 /var/www/nextcloud/apps/files_external/lib/Lib/Storage/SMB.php(224): Icewind\SMB\Native\NativeFileInfo->getAcls()
#7 /var/www/nextcloud/apps/files_external/lib/Lib/Storage/SMB.php(261): OCA\Files_External\Lib\Storage\SMB->getACL()
#8 /var/www/nextcloud/apps/files_external/lib/Lib/Storage/SMB.php(631): OCA\Files_External\Lib\Storage\SMB->getFolderContents()
#9 [internal function]: OCA\Files_External\Lib\Storage\SMB->getDirectoryContent()
#10 /var/www/nextcloud/lib/private/Files/Cache/Scanner.php(412): iterator_to_array()
#11 /var/www/nextcloud/lib/private/Files/Cache/Scanner.php(391): OC\Files\Cache\Scanner->handleChildren()
#12 /var/www/nextcloud/lib/private/Files/Cache/Scanner.php(342): OC\Files\Cache\Scanner->scanChildren()
#13 /var/www/nextcloud/lib/private/Files/Utils/Scanner.php(256): OC\Files\Cache\Scanner->scan()
#14 /var/www/nextcloud/apps/files/lib/Command/Scan.php(161): OC\Files\Utils\Scanner->scan()
#15 /var/www/nextcloud/apps/files/lib/Command/Scan.php(217): OCA\Files\Command\Scan->scanFiles()
#16 /var/www/nextcloud/3rdparty/symfony/console/Command/Command.php(255): OCA\Files\Command\Scan->execute()
#17 /var/www/nextcloud/core/Command/Base.php(177): Symfony\Component\Console\Command\Command->run()
#18 /var/www/nextcloud/3rdparty/symfony/console/Application.php(1009): OC\Core\Command\Base->run()
#19 /var/www/nextcloud/3rdparty/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand()
#20 /var/www/nextcloud/3rdparty/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun()
#21 /var/www/nextcloud/lib/private/Console/Application.php(213): Symfony\Component\Console\Application->run()
#22 /var/www/nextcloud/console.php(100): OC\Console\Application->run()
#23 /var/www/nextcloud/occ(11): require_once('...')
#24 {main}

I managed to solve/workaround that Problem by disabling the “ACL check” in “external mount options” the Admin Panel. Since the users use the same password for the CIFS-Share and Nextcloud-Login, we do not need to check the ACL again because the “samba-file-access-process” does not see files that the user is not allowed so see.