Weird Log Message - Related to Text app: OCP\Files\NotFoundException: Node for share not found

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version: 18
Operating system and version: Ubuntu 18.04
Apache or nginx version: Apache 2.4.41
PHP version: PHP 7.3.14

The issue you are facing:

The log is reporting an error with the text app (I think?) every second. The error does not appear to affect the instance, which is running and working fine for all users.

OCP\Files\NotFoundException: Node for share not found, fileid: 840790

No idea why it started it, but about the same time when the error started, I created a text file from the web interface, created a share link, downloaded it, and then deleted it. That´s the only clue I have.

Other files have been created, shared and downloaded around the same time, but no other “text” file.

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. Create Text File on web interface
  2. Share link and download
  3. Delete Text file from web interface

The output of your Nextcloud log in Admin > Logging:
Every second one of this:

OCP\Files\NotFoundException: Node for share not found, fileid: 840790

Full output from the nextcloud.log file

{"reqId":"biZ7RrzNeSU8PFX8BBVd","level":3,"time":"2020-02-12T15:26:00+00:00","remoteAddr":"xx.xx.xx.xxx","user":"admin","app":"text","method":"POST","url":"/index.php/apps/text/public/session/sync","message":{"Exception":"OCP\\Files\\NotFoundException","Message":"Node for share not found, fileid: 840790","Code":0,"Trace":[{"file":"/var/www/html/nextcloud/apps/text/lib/Service/DocumentService.php","line":332,"function":"getNode","class":"OC\\Share20\\Share","type":"->","args":[]},{"file":"/var/www/html/nextcloud/apps/text/lib/Service/ApiService.php","line":160,"function":"getFileForSession","class":"OCA\\Text\\Service\\DocumentService","type":"->","args":[{"id":28,"__class__":"OCA\\Text\\Db\\Session"},"HxpdfPQPf2Jton2"]},{"file":"/var/www/html/nextcloud/apps/text/lib/Controller/PublicSessionController.php","line":108,"function":"sync","class":"OCA\\Text\\Service\\ApiService","type":"->","args":[840790,28,"uAzBI7YHNHBgmBE9bxo2Lp2yOwBumnGFE11NtVFLxzNNANpBHPHsHOXNmgt+1LmK",0,null,false,false,"HxpdfPQPf2Jton2"]},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":170,"function":"sync","class":"OCA\\Text\\Controller\\PublicSessionController","type":"->","args":["HxpdfPQPf2Jton2",840790,28,"uAzBI7YHNHBgmBE9bxo2Lp2yOwBumnGFE11NtVFLxzNNANpBHPHsHOXNmgt+1LmK",0,null,false,false]},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":99,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Text\\Controller\\PublicSessionController"},"sync"]},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/App.php","line":125,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Text\\Controller\\PublicSessionController"},"sync"]},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php","line":47,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Text\\Controller\\PublicSessionController","sync",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"_route":"text.PublicSession.sync"}]},{"function":"__invoke","class":"OC\\AppFramework\\Routing\\RouteActionHandler","type":"->","args":[{"_route":"text.PublicSession.sync"}]},{"file":"/var/www/html/nextcloud/lib/private/Route/Router.php","line":299,"function":"call_user_func","args":[{"__class__":"OC\\AppFramework\\Routing\\RouteActionHandler"},{"_route":"text.PublicSession.sync"}]},{"file":"/var/www/html/nextcloud/lib/base.php","line":1008,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/text/public/session/sync"]},{"file":"/var/www/html/nextcloud/index.php","line":38,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/nextcloud/lib/private/Share20/Share.php","Line":190,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:72.0) Gecko/20100101 Firefox/72.0","version":"18.0.0.10"}

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

<?php
$CONFIG = array (
  'instanceid' => 'xxxxxxxxxxxx',
  'passwordsalt' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxx',
  'secret' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
  'trusted_domains' =>
  array (
    0 => 'xxxxxxxxxxxxxx',
    1 => 'xxxxxxxxxxxxxx',
  ),
  'datadirectory' => '/DATA_SSD',
  'dbtype' => 'mysql',
  'version' => '18.0.0.10',
  'overwrite.cli.url' => 'xxxxxxxxxxxxxxx',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'xxxxxxx',
  'dbpassword' => 'xxxxxxxxxxxxxxxx',
  'installed' => true,
  'skeletondirectory' => '',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 2,
  'ldapIgnoreNamingRules' => false,
  'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
  'lost_password_link' => 'disabled',
  'simpleSignUpLink.shown' => false,
  'updater.release.channel' => 'stable',
);

UPDATE: Definitely is the text app. Disabling it stops the continuous messages in the log. Scaning the files with occ didn´t help.

UDATE 2: Found this entries in the database
-oc_text_documents

+--------+-----------------+--------------------+-------------------------+----------------------------------+----------------------------------+
| id     | current_version | last_saved_version | last_saved_version_time | last_saved_version_etag          | base_version_etag                |
+--------+-----------------+--------------------+-------------------------+----------------------------------+----------------------------------+
| 840790 |               0 |                  0 |              1581511219 | 301897b1cfbc922e2b7bcf40e3a95c99 | 301897b1cfbc922e2b7bcf40e3a95c99 |
+--------+-----------------+--------------------+-------------------------+----------------------------------+----------------------------------+
-oc_text_sessions
+----+---------+------------+---------+------------------------------------------------------------------+-------------+--------------+
| id | user_id | guest_name | color   | token                                                            | document_id | last_contact |
+----+---------+------------+---------+------------------------------------------------------------------+-------------+--------------+
| 28 | admin   | NULL       | #d09e6d | uAzBI7YHNHBgmBE9bxo2Lp2yOwBumnGFE11NtVFLxzNNANpBHPHsHOXNmgt+1LmK |      840790 |   1581575427 |
+----+---------+------------+---------+------------------------------------------------------------------+-------------+--------------+

I´m pretty much sure that file does not exist anymore. Is it safe to delete the entries in the database?

Well, it went as it came. I updated to beta 18.01, and the message has not appeared again. Those entries in the database are still there, so maybe they were unrelated?

I´ll investigate a little bit more, just for curiosity sake; but, well, thait´s it I guess.

I still have this issue after migrating nextcloud into docker. I have no idea what to do. tried severeal different docker setups but the issue persists:

[no app in context] Error: OCP\Files\NotFoundException: Node for share not found, fileid: 131165 at <>

  1. /var/www/html/lib/private/Share20/Share.php line 236
    OC\Share20\Share->getNode()
  2. /var/www/html/apps/files_sharing/lib/SharedStorage.php line 367
    OC\Share20\Share->getNodeType()
  3. <>
    OCA\Files_Sharing\SharedStorage->getItemType()
  4. /var/www/html/lib/private/Files/Storage/Wrapper/Wrapper.php line 507
    call_user_func_array([OCA\Files_Shari … "], [])
  5. /var/www/html/apps/files_sharing/lib/Cache.php line 183
    OC\Files\Storage\Wrapper\Wrapper->__call(“getItemType”, [])
  6. <>
    OCA\Files_Sharing\Cache->search("%sd%")
  7. /var/www/html/lib/private/Files/View.php line 1667
    call_user_func_array([OCA\Files_Sharing\Cache {},“search”], ["%sd%"])
  8. /var/www/html/lib/private/Files/View.php line 1599
    OC\Files\View->searchCommon(“search”, ["%sd%"])
  9. /var/www/html/lib/private/Files/Filesystem.php line 763
    OC\Files\View->search(“sd”)
  10. /var/www/html/lib/private/Search/Provider/File.php line 47
    OC\Files\Filesystem::search(“sd”)
  11. /var/www/html/apps/files/lib/Search/FilesSearchProvider.php line 120
    OC\Search\Provider\File->search(“sd”)
  12. /var/www/html/lib/private/Search/SearchComposer.php line 162
    OCA\Files\Search\FilesSearchProvider->search(OC\User\User {}, OC\Search\SearchQuery {})
  13. /var/www/html/core/Controller/UnifiedSearchController.php line 110
    OC\Search\SearchComposer->search(OC\User\User {}, “files”, OC\Search\SearchQuery {})
  14. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 169
    OC\Core\Controller\UnifiedSearchController->search(“files”, “sd”, null, null, null, “/apps/files/?dir=/&view=trashbin”)
  15. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 100
    OC\AppFramework\Http\Dispatcher->executeController(OC\Core\Controll … {}, “search”)
  16. /var/www/html/lib/private/AppFramework/App.php line 152
    OC\AppFramework\Http\Dispatcher->dispatch(OC\Core\Controll … {}, “search”)
  17. /var/www/html/lib/private/Route/Router.php line 309
    OC\AppFramework\App::main(“OC\Core\Contr … r”, “search”, OC\AppFramework\ … {}, {providerId: "fi … "})
  18. /var/www/html/ocs/v1.php line 88
    OC\Route\Router->match("/ocsapp/search/providers/files/search")
  19. /var/www/html/ocs/v2.php line 24
    require_once("/var/www/html/ocs/v1.php")

GET /ocs/v2.php/search/providers/files/search?term=sd&from=%2Fapps%2Ffiles%2F%3Fdir%3D%2F%26view%3Dtrashbin
from 37.201.226.113 by der_spotter at 2021-02-21T21:30:29+00:00

There is a bug report (Node for share not found error · Issue #24891 · nextcloud/server · GitHub) with a possible fix:
https://github.com/nextcloud/server/pull/26411

I had a similar issue with some entries in the filecache table that were linked to a storage id that wasn’t active any more. I just deleted all the entries of this storage id from the filecache table (it was an old external storage that doesn’t exist any more). For more recent, you can also use the occ files_external:list -a to show all mounted ones, and if it is in that list, it is probably better to use the occ commands to remove this properly.

hi
can you explain a bit more your solution please?

I’m getting this:

root@nextcloud:/var/www/nextcloud# ls
3rdparty  COPYING  config       core      data  index.html  info.php  occ           ocs           public.php  resources   status.php  updater
AUTHORS   apps     console.php  cron.php  dist  index.php   lib       ocm-provider  ocs-provider  remote.php  robots.txt  themes      version.php

root@nextcloud:/var/www/nextcloud# occ files_external:list -a
Command 'occ' not found, but there are 21 similar ones.