Android App does not show all files

Hi,

I`m using the Android app to access file on 16.0.3.
A folder on my server is connected to NC as external FTP.
My Scanner uploads scans to this folder with ftp.

To see these files in nextcloud I`m running “occ files:scan user” every 5 minutes as a cronjob.

This worked like a charm but without having changed anything, neither on NC, Android App I can`t see this files. Tested on Smartphone and Tablet. Both Android. They are also not visible in the Web GUI

I can see the files in the FTP client. Everything fine.

Any ideas?

Thanks
Stefan

Hi hokaido!

There are some things that I would try.

Make sure that the folder is placed correctly in your nextcloud datafolder .../<your data folder>/<your user>/files/<the folder> and that you scan the right user.

Also you could try to scan all users: occ files:scan --all

Or try to scan the files manually (not as a cronjob); to see if it throws any errors.

I did not change anything before, just updated some apps in the web gui some days before.
Tried it manually in the occ web GUI:

Exception during scan: “files/886000956caf65548b216aa2a4522ac9” is locked

#0 /var/www/vhosts/domain.com/httpdocs/soft/nextcloud/lib/private/Files/Storage/Common.php(715): OC\Lock\DBLockingProvider->acquireLock('files/886000956…

.’, 1)

#1 /var/www/vhosts/domain.com/httpdocs/soft/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php(593): OC\Files\Storage\Common->acquireLock('files/Zeitun

gen…’, 1, Object(OC\Lock\DBLockingProvider))

#2 /var/www/vhosts/domain.com/httpdocs/soft/nextcloud/lib/private/Files/Cache/Scanner.php(145): OC\Files\Storage\Wrapper\Wrapper->acquireLock('files/Zeitung

en…’, 1, Object(OC\Lock\DBLockingProvider))

#3 /var/www/vhosts/domain.com/httpdocs/soft/nextcloud/lib/private/Files/Cache/Scanner.php(438): OC\Files\Cache\Scanner->scanFile(‘files/Zeitungen…’, 3, '2

472’, Object(OC\Files\Cache\CacheEntry), true)

#4 /var/www/vhosts/domain.com/httpdocs/soft/nextcloud/lib/private/Files/Cache/Scanner.php(406): OC\Files\Cache\Scanner->handleChildren(‘files/Zeitungen’, tr

ue, 3, ‘2472’, true, 1713194583)

#5 /var/www/vhosts/domain.com/httpdocs/soft/nextcloud/lib/private/Files/Cache/Scanner.php(409): OC\Files\Cache\Scanner->scanChildren(‘files/Zeitungen’, true

, 3, ‘2472’, true)

#6 /var/www/vhosts/domain.com/httpdocs/soft/nextcloud/lib/private/Files/Cache/Scanner.php(409): OC\Files\Cache\Scanner->scanChildren(‘files’, true, 3, ‘586’

, true)

#7 /var/www/vhosts/domain.com/httpdocs/soft/nextcloud/lib/private/Files/Cache/Scanner.php(338): OC\Files\Cache\Scanner->scanChildren(’’, true, 3, ‘584’, tru

e)

#8 /var/www/vhosts/domain.com/httpdocs/soft/nextcloud/lib/private/Files/Utils/Scanner.php(245): OC\Files\Cache\Scanner->scan(’’, true, 3)

#9 /var/www/vhosts/domain.com/httpdocs/soft/nextcloud/apps/files/lib/Command/Scan.php(145): OC\Files\Utils\Scanner->scan(’/SAMPLE-USER’, true, NULL)

#10 /var/www/vhosts/domain.com/httpdocs/soft/nextcloud/apps/files/lib/Command/Scan.php(201): OCA\Files\Command\Scan->scanFiles(‘SAMPLE-USER’, ‘/SAMPLE-USER’

, Object(OCA\OCCWeb\Controller\OccOutput), false, true, false)

#11 /var/www/vhosts/domain.com/httpdocs/soft/nextcloud/3rdparty/symfony/console/Command/Command.php(255): OCA\Files\Command\Scan->execute(Object(Symfony\Com

ponent\Console\Input\StringInput), Object(OCA\OCCWeb\Controller\OccOutput))

#12 /var/www/vhosts/domain.com/httpdocs/soft/nextcloud/core/Command/Base.php(166): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\C

onsole\Input\StringInput), Object(OCA\OCCWeb\Controller\OccOutput))

#13 /var/www/vhosts/domain.com/httpdocs/soft/nextcloud/3rdparty/symfony/console/Application.php(901): OC\Core\Command\Base->run(Object(Symfony\Component\Con

sole\Input\StringInput), Object(OCA\OCCWeb\Controller\OccOutput))

#14 /var/www/vhosts/domain.com/httpdocs/soft/nextcloud/3rdparty/symfony/console/Application.php(262): Symfony\Component\Console\Application->doRunCommand(Ob

ject(OCA\Files\Command\Scan), Object(Symfony\Component\Console\Input\StringInput), Object(OCA\OCCWeb\Controller\OccOutput))

#15 /var/www/vhosts/domain.com/httpdocs/soft/nextcloud/3rdparty/symfony/console/Application.php(145): Symfony\Component\Console\Application->doRun(Object(Sy

mfony\Component\Console\Input\StringInput), Object(OCA\OCCWeb\Controller\OccOutput))

#16 /var/www/vhosts/domain.com/httpdocs/soft/nextcloud/apps/occweb/lib/Controller/OCCApplication.php(207): Symfony\Component\Console\Application->run(Object

(Symfony\Component\Console\Input\StringInput), Object(OCA\OCCWeb\Controller\OccOutput))

#17 /var/www/vhosts/domain.com/httpdocs/soft/nextcloud/apps/occweb/lib/Controller/OccController.php(61): OCA\OCCWeb\Controller\OCCApplication->run(Object(Sy

mfony\Component\Console\Input\StringInput), Object(OCA\OCCWeb\Controller\OccOutput))

#18 /var/www/vhosts/domain.com/httpdocs/soft/nextcloud/apps/occweb/lib/Controller/OccController.php(81): OCA\OCCWeb\Controller\OccController->run(Object(Sym

fony\Component\Console\Input\StringInput))

#19 /var/www/vhosts/domain.com/httpdocs/soft/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(166): OCA\OCCWeb\Controller\OccController->cmd('files:sc

an chri…’)

#20 /var/www/vhosts/domain.com/httpdocs/soft/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(99): OC\AppFramework\Http\Dispatcher->executeController(

Object(OCA\OCCWeb\Controller\OccController), ‘cmd’)

#21 /var/www/vhosts/domain.com/httpdocs/soft/nextcloud/lib/private/AppFramework/App.php(126): OC\AppFramework\Http\Dispatcher->dispatch(Object(OCA\OCCWeb\Co

ntroller\OccController), ‘cmd’)

#22 /var/www/vhosts/domain.com/httpdocs/soft/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php(47): OC\AppFramework\App::main('OCA\OCCWeb\

Cont…’, ‘cmd’, Object(OC\AppFramework\DependencyInjection\DIContainer), Array)

#23 [internal function: OC\AppFramework\Routing\RouteActionHandler->__invoke(Array)

#24 /var/www/vhosts/domain.com/httpdocs/soft/nextcloud/lib/private/Route/Router.php(297): call_user_func(Object(OC\AppFramework\Routing\RouteActionHandler),

Array)

#25 /var/www/vhosts/domain.com/httpdocs/soft/nextcloud/lib/base.php(975): OC\Route\Router->match(’/apps/occweb/cm…’)

#26 /var/www/vhosts/domain.com/httpdocs/soft/nextcloud/index.php(42): OC::handleRequest()

#27 {main}]

How do you run occ?
I have understood that the proper way is to run occ in the root of nextcloud:
sudo -u www-data php occ files:scan --all

Could you show the server log here (settings => logging)?

And could you also run ls -lah in the “files” folder: sudo ls -lah .../<your datafolder>/<your user>/files to know if the permissions are right

Seems that the cron job is not running properly. If i start the cron manually it works. Will update Nextcloud the next day to see if the problem is till there