Fileshare error : Error creating the share

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face: is for home/non-enterprise users. If you’re running a business, paid support can be accessed via 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:


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


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:

Hello everyone!

There is error when I try to share file and I can’t figure out what might cause it. When I go Files → share icon → Share file, then there will be error at the up right corner “Error creating the share”. After I refresh browser it shows that actually file were shared and I can get share link. Anyone know how to fix it ?

Nextcloud version (eg, 20.0.5):
Operating system and version (eg, Ubuntu 20.04): Rocky Linux release 8.6 (Green Obsidian)
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.37 (rocky)
PHP version (eg, 7.4): 8.0.13

The issue you are facing:

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

Steps to replicate it:

  1. Click share file button

The output of your Nextcloud log in Admin > Logging:

[no app in context] Error: Exception: Call to undefined method OCA\RelatedResources\Service\RelatedService::flushCache() in file '/data/web/nextcloud/apps/related_resources/lib/Listener/FileShareUpdate.php' line 55 at <<closure>>

0. /data/web/nextcloud/lib/private/AppFramework/App.php line 172
1. /data/web/nextcloud/lib/private/Route/Router.php line 298
2. /data/web/nextcloud/ocs/v1.php line 63
3. /data/web/nextcloud/ocs/v2.php line 23

POST /ocs/v2.php/apps/files_sharing/api/v1/shares
from by 1C8BF94F-0977-44DB-89DF-E333A50272DF at 2022-11-02T09:37:11+00:00

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

$CONFIG = array (
  'instanceid' => 'ocqf8mtg2',
  'passwordsalt' => '<removed>',
  'secret' => '<removed>',
  'trusted_proxies' => 
  array (
    0 => '',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'trusted_domains' => 
  array (
    0 => '<removed>',
    1 => '<removed>',
  'default_phone_region' => 'EE',
  'datadirectory' => '/data/web/nextcloud/data',
  'dbtype' => 'pgsql',
  'version' => '',
  'overwrite.cli.url' => '<removed>',
  'dbname' => 'ncdb',
  'dbhost' => '<removed>',
  'dbport' => '5432',
  'dbtableprefix' => 'oc_',
  'dbuser' => '<removed>',
  'dbpassword' => '<removed>',
  'installed' => true,
  'mail_from_address' => '<removed',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => '<removed>',
  'maintenance' => false,
  'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',