Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Call to a member function getFileInfo() on null in /var/www/nextcloud/lib/private/Metadata/FileEventListener.php:62 #32031

Closed
4 of 8 tasks
skjnldsv opened this issue Apr 21, 2022 · 0 comments · Fixed by #32033
Labels
1. to develop Accepted and waiting to be taken care of bug

Comments

@skjnldsv
Copy link
Member

skjnldsv commented Apr 21, 2022

⚠️ This issue respects the following points: ⚠️

  • This is a bug, not a question or a configuration/webserver/proxy issue.
  • This issue is not already reported on Github (I've searched it).
  • Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
  • I agree to follow Nextcloud's Code of Conduct.

Bug description

When scanning the appdata I get the following error:

Call to a member function getFileInfo() on null in /var/www/nextcloud/lib/private/Metadata/FileEventListener.php:62

Steps to reproduce

  1. Have an empty appdata folder
  2. Run an occ files:scan-app-data

Expected behavior

No errors

Installation method

Manual installation

Operating system

Other

PHP engine version

PHP 8.0

Web server

Apache (supported)

Database engine version

MariaDB

Is this bug present after an update or on a fresh install?

Fresh Nextcloud Server install

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

No response

List of activated Apps

-

Nextcloud Signing status

No response

Nextcloud Logs

Error: Call to a member function getFileInfo() on null in /var/www/nextcloud/lib/private/Metadata/FileEventListener.php:62
Stack trace:
#0 /var/www/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php(87): OC\Metadata\FileEventListener->handle(Object(OCP\Files\Events\NodeRemovedFromCache))
#1 /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php(251): OC\EventDispatcher\ServiceEventListener->__invoke(Object(OCP\Files\Events\NodeRemovedFromCache), 'OCP\\Files\\Event...', Object(Symfony\Component\EventDispatcher\EventDispatcher))
#2 /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php(73): Symfony\Component\EventDispatcher\EventDispatcher->callListeners(Array, 'OCP\\Files\\Event...', Object(OCP\Files\Events\NodeRemovedFromCache))
#3 /var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php(88): Symfony\Component\EventDispatcher\EventDispatcher->dispatch(Object(OCP\Files\Events\NodeRemovedFromCache), 'OCP\\Files\\Event...')
#4 /var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php(100): OC\EventDispatcher\EventDispatcher->dispatch('OCP\\Files\\Event...', Object(OCP\Files\Events\NodeRemovedFromCache))
#5 /var/www/nextcloud/lib/private/Files/Utils/Scanner.php(235): OC\EventDispatcher\EventDispatcher->dispatchTyped(Object(OCP\Files\Events\NodeRemovedFromCache))
#6 [internal function]: OC\Files\Utils\Scanner->OC\Files\Utils\{closure}('appdata_oc7t2oj...')
#7 /var/www/nextcloud/lib/private/Hooks/EmitterTrait.php(106): call_user_func_array(Object(Closure), Array)
#8 /var/www/nextcloud/lib/private/Files/Cache/Scanner.php(273): OC\Hooks\BasicEmitter->emit('\\OC\\Files\\Cache...', 'removeFromCache', Array)
#9 /var/www/nextcloud/lib/private/Files/Cache/Scanner.php(475): OC\Files\Cache\Scanner->removeFromCache('appdata_oc7t2oj...')
#10 /var/www/nextcloud/lib/private/Files/Cache/Scanner.php(390): OC\Files\Cache\Scanner->handleChildren('appdata_oc7t2oj...', true, 3, 114983, true, 0)
#11 /var/www/nextcloud/lib/private/Files/Cache/Scanner.php(342): OC\Files\Cache\Scanner->scanChildren('appdata_oc7t2oj...', true, 3, 114983, true)
#12 /var/www/nextcloud/lib/private/Files/Cache/LocalRootScanner.php(39): OC\Files\Cache\Scanner->scan('appdata_oc7t2oj...', true, 3, true)
#13 /var/www/nextcloud/lib/private/Files/Utils/Scanner.php(256): OC\Files\Cache\LocalRootScanner->scan('appdata_oc7t2oj...', true, 3)
#14 /var/www/nextcloud/apps/files/lib/Command/ScanAppData.php(124): OC\Files\Utils\Scanner->scan('/appdata_oc7t2o...')
#15 /var/www/nextcloud/apps/files/lib/Command/ScanAppData.php(159): OCA\Files\Command\ScanAppData->scanFiles(Object(Symfony\Component\Console\Output\ConsoleOutput), '')
#16 /var/www/nextcloud/3rdparty/symfony/console/Command/Command.php(255): OCA\Files\Command\ScanAppData->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#17 /var/www/nextcloud/core/Command/Base.php(168): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#18 /var/www/nextcloud/3rdparty/symfony/console/Application.php(1009): OC\Core\Command\Base->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#19 /var/www/nextcloud/3rdparty/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand(Object(OCA\Files\Command\ScanAppData), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#20 /var/www/nextcloud/3rdparty/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#21 /var/www/nextcloud/lib/private/Console/Application.php(211): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#22 /var/www/nextcloud/console.php(99): OC\Console\Application->run()
#23 /var/www/nextcloud/occ(11): require_once('/var/www/nextcl...')


### Additional info

_No response_
@skjnldsv skjnldsv added bug 0. Needs triage Pending check for reproducibility or if it fits our roadmap 24-feedback 1. to develop Accepted and waiting to be taken care of and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Apr 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Accepted and waiting to be taken care of bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant