Nextcloud upgrade 11.07 -> 12.05 Sharing app not showing deleted ldap user content

Hello,

after upgrading from 11.07 to 12.05 the Sharing app is not showing any files/folder of a deleted ldap user.
The same behaviour also in Version 13.
When i enter the “Shared” folder in web gui iam getting the following error:

This directory is unavailable, please check the logs or contact the administrator

nextcloud.log:

{“reqId”:“lUJNqVnIXlWugtGjZOHQ”,“level”:3,“time”:“2018-02-26T11:51:32+00:00”,“remoteAddr”:“XXXXXXX”,“user”:“2AC9A57D-536F-4EF7-952D-95B81373A1A2”,“app”:“core”,“method”:“PROPFIND”,“url”:“/remote.php/webdav/Shared”,“message”:“E2CF5E6A-3073-42C9-AE57-BA84C55286FA is not a valid user anymore”,“userAgent”:“Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:58.0) Gecko/20100101 Firefox/58.0”,“version”:“12.0.5.3”}
{“reqId”:“lUJNqVnIXlWugtGjZOHQ”,“level”:3,“time”:“2018-02-26T11:51:32+00:00”,“remoteAddr”:“XXXXXXXXX”,“user”:“2AC9A57D-536F-4EF7-952D-95B81373A1A2”,“app”:“PHP”,“method”:“PROPFIND”,“url”:“/remote.php/webdav/Shared”,“message”:“Call to a member function instanceOfStorage() on null at /var/www/tmpnextcloud/nextcloud/lib/private/Files/View.php#1927”,“userAgent”:“Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:58.0) Gecko/20100101 Firefox/58.0”,“version”:“12.0.5.3”}

When i do a filescan with my userid, following error:

Starting scan for user 1 out of 1 (2AC9A57D-536F-4EF7-952D-95B81373A1A2)
An unhandled exception has been thrown:
Error: Call to a member function instanceOfStorage() on null in /var/www/tmpnextcloud/nextcloud/lib/private/Files/View.php:1927
Stack trace:
#0 /var/www/tmpnextcloud/nextcloud/lib/private/Files/View.php(2041): OC\Files\View->lockPath(‘/Shared’, 1, false)
#1 /var/www/tmpnextcloud/nextcloud/lib/private/Files/View.php(1145): OC\Files\View->lockFile(‘/Shared’, 1)
#2 /var/www/tmpnextcloud/nextcloud/lib/private/Files/View.php(269): OC\Files\View->basicOperation(‘mkdir’, ‘/Shared’, Array)
#3 /var/www/tmpnextcloud/nextcloud/apps/files_sharing/lib/Helper.php(259): OC\Files\View->mkdir(‘//Shared’)
#4 /var/www/tmpnextcloud/nextcloud/apps/files_sharing/lib/SharedMount.php(92): OCA\Files_Sharing\Helper::getShareFolder(Object(OC\Files\View))
#5 /var/www/tmpnextcloud/nextcloud/apps/files_sharing/lib/SharedMount.php(73): OCA\Files_Sharing\SharedMount->verifyMountPoint(Object(OC\Share20\Share), Array)
#6 /var/www/tmpnextcloud/nextcloud/apps/files_sharing/lib/MountProvider.php(96): OCA\Files_Sharing\SharedMount->__construct(‘\OCA\Files_Shar…’, Array, Array, Object(OC\Files\Storage\StorageFactory))
#7 /var/www/tmpnextcloud/nextcloud/lib/private/Files/Config/MountProviderCollection.php(108): OCA\Files_Sharing\MountProvider->getMountsForUser(Object(OC\User\User), Object(OC\Files\Storage\StorageFactory))
#8 /var/www/tmpnextcloud/nextcloud/lib/private/Files/Filesystem.php(445): OC\Files\Config\MountProviderCollection->addMountForUser(Object(OC\User\User), Object(OC\Files\Mount\Manager))
#9 /var/www/tmpnextcloud/nextcloud/apps/files_sharing/lib/SharedStorage.php(117): OC\Files\Filesystem::initMountPoints(‘CA985F05-1D25-4…’)
#10 /var/www/tmpnextcloud/nextcloud/apps/files_sharing/lib/SharedStorage.php(458): OCA\Files_Sharing\SharedStorage->init()
#11 [internal function]: OCA\Files_Sharing\SharedStorage->getSourceStorage()
#12 /var/www/tmpnextcloud/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php(501): call_user_func_array(Array, Array)
#13 /var/www/tmpnextcloud/nextcloud/apps/files_sharing/lib/Cache.php(91): OC\Files\Storage\Wrapper\Wrapper->__call(‘getSourceStorag…’, Array)
#14 /var/www/tmpnextcloud/nextcloud/lib/private/Files/Cache/Wrapper/CacheJail.php(313): OCA\Files_Sharing\Cache->getCache()
#15 /var/www/tmpnextcloud/nextcloud/lib/private/Files/View.php(1724): OC\Files\Cache\Wrapper\CacheJail->getPathById(578722)
#16 /var/www/tmpnextcloud/nextcloud/apps/files_sharing/lib/SharedStorage.php(118): OC\Files\View->getPath(578722)
#17 /var/www/tmpnextcloud/nextcloud/apps/files_sharing/lib/SharedStorage.php(463): OCA\Files_Sharing\SharedStorage->init()
#18 /var/www/tmpnextcloud/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php(490): OCA\Files_Sharing\SharedStorage->getWrapperStorage()
#19 /var/www/tmpnextcloud/nextcloud/apps/files_sharing/lib/SharedStorage.php(156): OC\Files\Storage\Wrapper\Wrapper->instanceOfStorage(‘OC\Files\Storag…’)
#20 /var/www/tmpnextcloud/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php(490): OCA\Files_Sharing\SharedStorage->instanceOfStorage(‘OC\Files\Storag…’)
#21 /var/www/tmpnextcloud/nextcloud/lib/private/Files/Utils/Scanner.php(197): OC\Files\Storage\Wrapper\Wrapper->instanceOfStorage(‘OC\Files\Storag…’)
#22 /var/www/tmpnextcloud/nextcloud/apps/files/lib/Command/Scan.php(161): OC\Files\Utils\Scanner->scan(‘/2AC9A57D-536F-…’)
#23 /var/www/tmpnextcloud/nextcloud/apps/files/lib/Command/Scan.php(234): OCA\Files\Command\Scan->scanFiles(‘2AC9A57D-536F-4…’, ‘/2AC9A57D-536F-…’, false, Object(Symfony\Component\Console\Output\ConsoleOutput), false)
#24 /var/www/tmpnextcloud/nextcloud/3rdparty/symfony/console/Command/Command.php(256): OCA\Files\Command\Scan->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#25 /var/www/tmpnextcloud/nextcloud/core/Command/Base.php(161): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#26 /var/www/tmpnextcloud/nextcloud/3rdparty/symfony/console/Application.php(818): OC\Core\Command\Base->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#27 /var/www/tmpnextcloud/nextcloud/3rdparty/symfony/console/Application.php(186): Symfony\Component\Console\Application->doRunCommand(Object(OCA\Files\Command\Scan), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#28 /var/www/tmpnextcloud/nextcloud/3rdparty/symfony/console/Application.php(117): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#29 /var/www/tmpnextcloud/nextcloud/lib/private/Console/Application.php(170): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#30 /var/www/tmpnextcloud/nextcloud/console.php(100): OC\Console\Application->run()
#31 /var/www/tmpnextcloud/nextcloud/occ(11): require_once(‘/var/www/tmpnex…’)

Thanks,
Nitha

Please help :frowning: