Nextcloud 12 Clean install OCP\Files\NotFoundException

Nextcloud version (eg, 10.0.2): 12.0.0
Operating system and version (eg, Ubuntu 16.04): Ubuntu 16.04
Apache or nginx version (eg, Apache 2.4.25): Nginx nginx/1.10.3 (Ubuntu)
PHP version (eg, 5.6): PHP 7.0
Is this the first time you’ve seen this error?: yes

Can you reliably replicate it? (If so, please outline steps):

The issue you are facing:

When accessing a shared folder via Link, I get error: “This directory is unavailable, please check the logs or contact the administrator.” The logs show a missing fileid.

In the Postgres database, when searching for the fileid in postgres oc_filescache table it is there. Also manually locating the file on the server finds it.

Note: We use file encryption and LDAP/AD authentication.

The output of your Nextcloud log in Admin > Logging:

{"reqId":"Yg4qGAyI30KKFsB67jiA","level":4,"time":"2017-07-23T08:44:00+00:00","remoteAddr":"","user":"--","app":"webdav","method":"PROPFIND","url":"\/public.php\/webdav\/","message":"Exception: {\"Message\":\"File with id \\\"243\\\" has not been found.\",\"Exception\":\"OCP\\\\Files\\\\NotFoundException\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/nextcloud\\\/apps\\\/dav\\\/appinfo\\\/v1\\\/publicwebdav.php(86): OC\\\\Files\\\\View->getPath(243)\\n#1 \\\/var\\\/www\\\/nextcloud\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/ServerFactory.php(139): {closure}(Object(OCA\\\\DAV\\\\Connector\\\\Sabre\\\\Server))\\n#2 [internal function]: OCA\\\\DAV\\\\Connector\\\\Sabre\\\\ServerFactory->OCA\\\\DAV\\\\Connector\\\\Sabre\\\\{closure}(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#3 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Object(Closure), Array)\\n#4 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(466): Sabre\\\\Event\\\\EventEmitter->emit('beforeMethod', Array)\\n#5 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(254): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#6 \\\/var\\\/www\\\/nextcloud\\\/apps\\\/dav\\\/appinfo\\\/v1\\\/publicwebdav.php(105): Sabre\\\\DAV\\\\Server->exec()\\n#7 \\\/var\\\/www\\\/nextcloud\\\/public.php(76): require_once('\\\/var\\\/www\\\/nextcl...')\\n#8 {main}\",\"File\":\"\\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Files\\\/View.php\",\"Line\":1706,\"User\":false}","userAgent":"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit\/603.2.4 (KHTML, like Gecko) Version\/10.1.1 Safari\/603.2.4","version":""}

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

$CONFIG = array (
  'instanceid' => '',
  'passwordsalt' => '',
  'secret' => '',
  'trusted_domains' =>
  array (
    0 => '',
  'datadirectory' => '/mnt/drive/nextcloud-data/',
  'overwrite.cli.url' => '',
  'dbtype' => 'pgsql',
  'version' => '',
  'dbname' => 'nextclouddb',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => '',
  'dbpassword' => '',
  'installed' => true,
  'mail_from_address' => 'no-reply',
  'mail_smtpmode' => 'smtp',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_domain' => '',
  'mail_smtphost' => '',
  'mail_smtpport' => '25',
  'ldapIgnoreNamingRules' => false,
  'ldapProviderFactory' => '\\OCA\\User_LDAP\\LDAPProviderFactory',
  'memcache.local' => '\OC\Memcache\APCu',

The output of your Apache/nginx/system log in /var/log/____:


Do you find an entry with this id in your oc_filecache table? Is this a new setup or updated from previous versions, migrated from owncloud?

It is a clean install of Nextcloud.

select * from oc_filecache where fileid=243;

reveals the location of the file. When manually changing directory to that path, the file is there.

Perhaps an issue with the encryption app @bjoern

You can also report this to the bugtracker:

Thanks for this, just what I needed.

Also experiencing this, but deleted the files in question from trashbin. Let’s see if it pops up again.