Skip to content

Sharing a folder through federation shows size "Pending" and mtime "Unkown date". files:scan throws exception. #60839

Open

Description

@blizzz

Repro

  1. As Alice on Instance One, have default folder for acceptes shares set to /Inbox in Personal Settings → Sharing (might be optional)
  2. As Bob on Instance Two share a folder through federation to Alice at Instance One
  3. As Alice accept the share and reload Files
  4. As admin run occ files:scan --verbose alice on Instance One3. As Alice accept reload Files once more

Observed:

  • The shared folder does not appear under /Inbox as configure, but within the user home
  • The Size is set as "Pending" and stays so
  • The Modified date is set as "Unknown date" and stays so
  • The occ command lists the received folder, but instead of the actual contents those files and uploads as content
  • The occ command crashes with a TypeError

Details

occ output as file list
        …
        Folder  /master/files/Five five five/
        Folder  /master/files/Five five five/files
        Folder  /master/files/Five five five/uploads
An unhandled exception has been thrown:
        …
Exception stacktrace
TypeError: OC\Files\Cache\CacheQueryBuilder::whereParent(): Argument #1 ($parent) must be of type int, null given, called in /srv/http/nextcloud/master/lib/private/Files/Cache/Cache.php on line 1050 and defined in /srv/http/nextcloud/master/lib/private/Files/Cache/CacheQueryBuilder.php:89
Stack trace:
#0 /srv/http/nextcloud/master/lib/private/Files/Cache/Cache.php(1050): OC\Files\Cache\CacheQueryBuilder->whereParent(NULL)
#1 /srv/http/nextcloud/master/lib/private/Files/Cache/Cache.php(1023): OC\Files\Cache\Cache->calculateFolderSizeInner('', Object(OC\Files\Cache\CacheEntry))
#2 /srv/http/nextcloud/master/lib/private/Files/Cache/Cache.php(969): OC\Files\Cache\Cache->calculateFolderSize('', NULL)
#3 /srv/http/nextcloud/master/lib/private/Files/Utils/Scanner.php(237): OC\Files\Cache\Cache->correctFolderSize('')
#4 /srv/http/nextcloud/master/apps/files/lib/Command/Scan.php(169): OC\Files\Utils\Scanner->scan('...', true, Object(Closure))
#5 /srv/http/nextcloud/master/apps/files/lib/Command/Scan.php(260): OCA\Files\Command\Scan->scanFiles('...', '...', NULL, Object(Symfony\Component\Console\Output\ConsoleOutput), Object(Closure), false, true)
#6 /srv/http/nextcloud/master/apps-repos/workflow_pdf_converter/vendor/symfony/console/Command/Command.php(341): OCA\Files\Command\Scan->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 /srv/http/nextcloud/master/core/Command/Base.php(222): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 /srv/http/nextcloud/master/apps-repos/workflow_pdf_converter/vendor/symfony/console/Application.php(1079): OC\Core\Command\Base->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 /srv/http/nextcloud/master/apps-repos/workflow_pdf_converter/vendor/symfony/console/Application.php(356): Symfony\Component\Console\Application->doRunCommand(Object(OCA\Files\Command\Scan), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /srv/http/nextcloud/master/apps-repos/workflow_pdf_converter/vendor/symfony/console/Application.php(195): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 /srv/http/nextcloud/master/lib/private/Console/Application.php(188): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#12 /srv/http/nextcloud/master/console.php(92): OC\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput))
#13 /srv/http/nextcloud/master/occ(33): require_once('...')
#14 {main}

The problem with the code is that

$id = $entry['fileid'];
expects the fileid to be set, but in this case, the field does not exist, is not checked, and is later unconditionally passed to whereParent() which expects an int.

Activity

  1. blizzz commented on Jun 2, 2026

    @blizzz
    MemberAuthor

    Same on 32, and also when default folder for acceptes shares is left at / (default).

  2. blizzz commented on Jun 4, 2026

    @blizzz
    MemberAuthor

    Also, I cannot visit the incoming folder in the web ui.

  3. sorbaugh commented on Jun 16, 2026

    @sorbaugh
    Contributor

    Assigning @leftybournes

  4. moved this from To triage to Triaged in 🧑‍🤝‍🧑 Community triageon Aug 20, 2026
  5. added theissue type on Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions