File upload failed and weird error in logs

Nextcloud version: 18.0.1.3
Operating system and version: Debian 9
Apache or nginx version: Nginx
PHP version: 7.2

Everytime I try to upload a file or create a folder, it throws an error, and when I check the logs, there’s an weird cache error thing.

Is this the first time you’ve seen this error?: Yes

Steps to replicate it:

  1. Open the files app
  2. Upload a file or create a folder

The output of your Nextcloud log in Admin > Logging:

[remote] Error: Error: Call to undefined method OCP\Files\Cache\CacheUpdateEvent::setPath() at <<closure>>

 0. /usr/share/nginx/html/cloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php line 247
    OCA\GroupFolders\CacheListener->onCacheEvent(OCP\Files\Cache\CacheUpdateEvent {}, "OCP\\Files\\Cache\\CacheUpdateEvent", Symfony\Componen ... {})
 1. /usr/share/nginx/html/cloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php line 73
    Symfony\Component\EventDispatcher\EventDispatcher->callListeners([Closure {}], "OCP\\Files\\Cache\\CacheUpdateEvent", OCP\Files\Cache\CacheUpdateEvent {})
 2. /usr/share/nginx/html/cloud/lib/private/EventDispatcher/EventDispatcher.php line 80
    Symfony\Component\EventDispatcher\EventDispatcher->dispatch(OCP\Files\Cache\CacheUpdateEvent {}, "OCP\\Files\\Cache\\CacheUpdateEvent")
 3. /usr/share/nginx/html/cloud/lib/private/EventDispatcher/SymfonyAdapter.php line 63
    OC\EventDispatcher\EventDispatcher->dispatch("OCP\\Files\\Cache\\CacheUpdateEvent", OCP\Files\Cache\CacheUpdateEvent {})
 4. /usr/share/nginx/html/cloud/lib/private/Files/Cache/Cache.php line 393
    OC\EventDispatcher\SymfonyAdapter->dispatch("OCP\\Files\\Cache\\CacheUpdateEvent", OCP\Files\Cache\CacheUpdateEvent {})
 5. /usr/share/nginx/html/cloud/lib/private/Files/Cache/Wrapper/CacheWrapper.php line 140
    OC\Files\Cache\Cache->update("*** sensitive parameters replaced ***")
 6. /usr/share/nginx/html/cloud/lib/private/Files/Cache/Wrapper/CacheWrapper.php line 140
    OC\Files\Cache\Wrapper\CacheWrapper->update("*** sensitive parameters replaced ***")
 7. /usr/share/nginx/html/cloud/lib/private/Files/Cache/Wrapper/CacheJail.php line 133
    OC\Files\Cache\Wrapper\CacheWrapper->update("*** sensitive parameters replaced ***")
 8. /usr/share/nginx/html/cloud/lib/private/Files/Cache/Wrapper/CacheWrapper.php line 140
    OC\Files\Cache\Wrapper\CacheJail->update("*** sensitive parameters replaced ***")
 9. /usr/share/nginx/html/cloud/apps/groupfolders/lib/Mount/RootEntryCache.php line 52
    OC\Files\Cache\Wrapper\CacheWrapper->update("*** sensitive parameters replaced ***")
10. /usr/share/nginx/html/cloud/lib/private/Files/Cache/Wrapper/CacheWrapper.php line 140
    OCA\GroupFolders\Mount\RootEntryCache->update("*** sensitive parameters replaced ***")
11. /usr/share/nginx/html/cloud/lib/private/Files/Cache/Wrapper/CacheWrapper.php line 140
    OC\Files\Cache\Wrapper\CacheWrapper->update("*** sensitive parameters replaced ***")
12. /usr/share/nginx/html/cloud/lib/private/Files/Cache/Wrapper/CacheWrapper.php line 140
    OC\Files\Cache\Wrapper\CacheWrapper->update("*** sensitive parameters replaced ***")
13. /usr/share/nginx/html/cloud/lib/private/Files/Cache/Updater.php line 247
    OC\Files\Cache\Wrapper\CacheWrapper->update("*** sensitive parameters replaced ***")
14. /usr/share/nginx/html/cloud/lib/private/Files/Cache/Updater.php line 160
    OC\Files\Cache\Updater->correctParentStorageMtime("FRANÇAIS/EL11/A")
15. /usr/share/nginx/html/cloud/lib/private/Files/View.php line 327
    OC\Files\Cache\Updater->remove("FRANÇAIS/EL11/A")
16. /usr/share/nginx/html/cloud/lib/private/Files/View.php line 1174
    OC\Files\View->removeUpdate(OCA\TermsOfServi ... }}, "FRANÇAIS/EL11/A")
17. /usr/share/nginx/html/cloud/lib/private/Files/View.php line 348
    OC\Files\View->basicOperation("rmdir", "/CLASSE ENTIÈRE/FRANÇAIS/EL11/A", ["delete"])
18. /usr/share/nginx/html/cloud/apps/dav/lib/Connector/Sabre/Directory.php line 312
    OC\Files\View->rmdir("/CLASSE ENTIÈRE/FRANÇAIS/EL11/A")
19. /usr/share/nginx/html/cloud/3rdparty/sabre/dav/lib/DAV/Tree.php line 179
    OCA\DAV\Connector\Sabre\Directory->delete()
20. /usr/share/nginx/html/cloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 287
    Sabre\DAV\Tree->delete("files/admin/CLA ... A")
21. <<closure>>
    Sabre\DAV\CorePlugin->httpDelete(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {})
22. /usr/share/nginx/html/cloud/3rdparty/sabre/event/lib/EventEmitterTrait.php line 105
    call_user_func_array([Sabre\DAV\CorePlugin {},"httpDelete"], [Sabre\HTTP\Requ ... }])
23. /usr/share/nginx/html/cloud/3rdparty/sabre/dav/lib/DAV/Server.php line 479
    Sabre\Event\EventEmitter->emit("method:DELETE", [Sabre\HTTP\Requ ... }])
24. /usr/share/nginx/html/cloud/3rdparty/sabre/dav/lib/DAV/Server.php line 254
    Sabre\DAV\Server->invokeMethod(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {})
25. /usr/share/nginx/html/cloud/apps/dav/lib/Server.php line 319
    Sabre\DAV\Server->exec()
26. /usr/share/nginx/html/cloud/apps/dav/appinfo/v2/remote.php line 35
    OCA\DAV\Server->exec()
27. /usr/share/nginx/html/cloud/remote.php line 165
    require_once("/usr/share/ngin ... p")

DELETE /remote.php/dav/files/admin/CLASSE%20ENTI%C3%88RE/FRAN%C3%87AIS/EL11/A
from XX.XXX.XXX.XX by admin at 2020-03-19T11:42:08+00:00

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => 'ocq04zt70zjp',
  'passwordsalt' => 'NOPE',
  'secret' => 'NOPE',
  'trusted_domains' => 
  array (
    0 => 'cloud.nope.nope',
  ),
  'datadirectory' => '/usr/share/nginx/html/cloud/data/',
  'dbtype' => 'mysql',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => 'localhost',
    'port' => 6379,
    'dbindex' => 0,
    'password' => '',
    'timeout' => 1.5,
  ),
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'version' => '18.0.1.3',
  'overwrite.cli.url' => 'https://cloud.nope.nope',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'nextcloud',
  'dbpassword' => 'NOPE',
  'installed' => true,
  'maintenance' => false,
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'tls',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'cloud',
  'mail_domain' => 'nope.nope',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'ssl0.ovh.net',
  'mail_smtpport' => '587',
  'mail_smtpname' => 'maxouxax@nope.nope',
  'mail_smtppassword' => 'nope',
  'default_language' => 'fr',
  'force_language' => 'fr',
  'default_locale' => 'fr_FR',
  'force_locale' => 'fr_FR',
  'theme' => '',
  'loglevel' => 2,
  'mysql.utf8mb4' => true,
  'skeletondirectory' => '/usr/share/nginx/html/cloud_defaults_files/',
  'trashbin_retention_obligation' => 'auto, 15',
  'allow_user_to_change_display_name' => false,
);

+1, I got the same error logs, too.

Hey @Mat_Lee !
I managed to fix it by making sure the whole directory was owned by www-data and did a chmod of 775 just to make sure.

Just checked. It’s owned by “www-data” and mode is “755”. I chmod it to “775” but the problem is still there.

Uhh… :thinking:
Did you make it recursively ?

I didn’t make it recursively, but I believe I granted whole file permission for those directories. Target directory was created, but the system show error messages as above.

Try to make it recursively. Btw, which version are you running ? 18.0.1.3 ? Because all I did is chown www-data, chmod 775 and updated to the latest version, 18.0.2 I believe.

What folder are you talking about exactly? …cloud/data or another?

Every folder in your nextcloud directory.