Strange repeating errors in log, file sharing issues

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 (eg, 12.0.2): 16.0.5
Operating system and version (eg, Ubuntu 17.04): 16.04
Apache or nginx version (eg, Apache 2.4.25): nginx 1.10.3
PHP version (eg, 7.1): 7.0

The issue you are facing:
Our logs are being spammed with the same error messages.

“Error while trying to create shared mount”
and
“InvalidArgumentException: Invalid recipient”
InvalidArgumentException: Invalid recipient
/snap/nextcloud/16739/htdocs/apps/files_sharing/lib/SharedMount.php - line 129:
OC\Share20\Manager->moveShare(OC\Share20\Share {}, “NotMetaIvan”)
/snap/nextcloud/16739/htdocs/apps/files_sharing/lib/SharedMount.php - line 111:
OCA\Files_Sharing\SharedMount->updateFileTarget("*** sensiti … “)
/snap/nextcloud/16739/htdocs/apps/files_sharing/lib/SharedMount.php - line 77:
OCA\Files_Sharing\SharedMount->verifyMountPoint(”
** sensiti … *", { /NotMetaIv … }}, OC\Cache\CappedMemoryCache {})
/snap/nextcloud/16739/htdocs/apps/files_sharing/lib/MountProvider.php - line 115:
OCA\Files_Sharing\SharedMount->__construct("\OCA\File … e", { /NotMetaIv … }}, { user: “Not … e}, OC\Files\Sto … {}, OC\Files\View {}, OC\Cache\CappedMemoryCache {})
/snap/nextcloud/16739/htdocs/lib/private/Files/Config/MountProviderCollection.php - line 113:
OCA\Files_Sharing\MountProvider->getMountsForUser(OC\User\User {}, OC\Files\Sto … {})
/snap/nextcloud/16739/htdocs/lib/private/Files/Filesystem.php - line 447:
OC\Files\Config\MountProviderCollection->addMountForUser(OC\User\User {}, OC\Files\Mount\Manager {})
/snap/nextcloud/16739/htdocs/lib/private/Files/Filesystem.php - line 376:
OC\Files\Filesystem::initMountPoints(“NotMetaIvan”)
/snap/nextcloud/16739/htdocs/lib/private/legacy/util.php - line 309:
OC\Files\Filesystem::init(“NotMetaIvan”, “/NotMetaIvan/files”)
/snap/nextcloud/16739/htdocs/lib/private/Files/Utils/Scanner.php - line 106:
OC_Util::setupFS(“NotMetaIvan”)
/snap/nextcloud/16739/htdocs/lib/private/Files/Utils/Scanner.php - line 142:
OC\Files\Utils\Scanner->getMounts(”")
/snap/nextcloud/16739/htdocs/apps/files/lib/BackgroundJob/ScanFiles.php - line 88:
OC\Files\Utils\Scanner->backgroundScan("")
/snap/nextcloud/16739/htdocs/apps/files/lib/BackgroundJob/ScanFiles.php - line 112:
OCA\Files\BackgroundJob\ScanFiles->runScanner(OC\User\User {})
/snap/nextcloud/16739/htdocs/lib/private/BackgroundJob/Job.php - line 61:
OCA\Files\BackgroundJob\ScanFiles->run(null)
/snap/nextcloud/16739/htdocs/lib/private/BackgroundJob/TimedJob.php - line 55:
OC\BackgroundJob\Job->execute(OC\BackgroundJob\JobList {}, OC\Log {})
/snap/nextcloud/16739/htdocs/cron.php - line 123:
OC\BackgroundJob\TimedJob->execute(OC\BackgroundJob\JobList {}, OC\Log {})
Is this the first time you’ve seen this error? (Y/N): N

The user happens to be the last user created.

The log is repeating this message every 8 minutes. I need to archive the log every other day to keep the files down.

When I look around the internet I have seen that this issue was present in a previous nextcloud version but we are still experiencing it.

Any ideas are greatly appreciated, thanks!

The output of your Nextcloud log in Admin > Logging:

{"Exception":"InvalidArgumentException","Message":"Invalid recipient","Code":0,"Trace":[{"file":"\/snap\/nextcloud\/16739\/htdocs\/apps\/files_sharing\/lib\/SharedMount.php","line":129,"function":"moveShare","class":"OC\\Share20\\Manager","type":"->","args":[{"__class__":"OC\\Share20\\Share"},"NotMetaIvan"]},{"file":"\/snap\/nextcloud\/16739\/htdocs\/apps\/files_sharing\/lib\/SharedMount.php","line":111,"function":"updateFileTarget","class":"OCA\\Files_Sharing\\SharedMount","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"\/snap\/nextcloud\/16739\/htdocs\/apps\/files_sharing\/lib\/SharedMount.php","line":77,"function":"verifyMountPoint","class":"OCA\\Files_Sharing\\SharedMount","type":"->","args":["*** sensitive parameter replaced ***",{"\/NotMetaIvan\/files\/SSO_changes.md\/":{"__class__":"OCA\\Files_Sharing\\SharedMount"}},{"__class__":"OC\\Cache\\CappedMemoryCache"}]},{"file":"\/snap\/nextcloud\/16739\/htdocs\/apps\/files_sharing\/lib\/MountProvider.php","line":115,"function":"__construct","class":"OCA\\Files_Sharing\\SharedMount","type":"->","args":["\\OCA\\Files_Sharing\\SharedStorage",{"\/NotMetaIvan\/files\/SSO_changes.md\/":{"__class__":"OCA\\Files_Sharing\\SharedMount"}},{"user":"NotMetaIvan","superShare":{"__class__":"OC\\Share20\\Share"},"groupedShares":[{"__class__":"OC\\Share20\\Share"}],"ownerView":{"__class__":"OC\\Files\\View"},"sharingDisabledForUser":false},{"__class__":"OC\\Files\\Storage\\StorageFactory"},{"__class__":"OC\\Files\\View"},{"__class__":"OC\\Cache\\CappedMemoryCache"}]},{"file":"\/snap\/nextcloud\/16739\/htdocs\/lib\/private\/Files\/Config\/MountProviderCollection.php","line":113,"function":"getMountsForUser","class":"OCA\\Files_Sharing\\MountProvider","type":"->","args":[{"__class__":"OC\\User\\User"},{"__class__":"OC\\Files\\Storage\\StorageFactory"}]},{"file":"\/snap\/nextcloud\/16739\/htdocs\/lib\/private\/Files\/Filesystem.php","line":447,"function":"addMountForUser","class":"OC\\Files\\Config\\MountProviderCollection","type":"->","args":[{"__class__":"OC\\User\\User"},{"__class__":"OC\\Files\\Mount\\Manager"}]},{"file":"\/snap\/nextcloud\/16739\/htdocs\/lib\/private\/Files\/Filesystem.php","line":376,"function":"initMountPoints","class":"OC\\Files\\Filesystem","type":"::","args":["NotMetaIvan"]},{"file":"\/snap\/nextcloud\/16739\/htdocs\/lib\/private\/legacy\/util.php","line":309,"function":"init","class":"OC\\Files\\Filesystem","type":"::","args":["NotMetaIvan","\/NotMetaIvan\/files"]},{"file":"\/snap\/nextcloud\/16739\/htdocs\/lib\/private\/Files\/Utils\/Scanner.php","line":106,"function":"setupFS","class":"OC_Util","type":"::","args":["NotMetaIvan"]},{"file":"\/snap\/nextcloud\/16739\/htdocs\/lib\/private\/Files\/Utils\/Scanner.php","line":142,"function":"getMounts","class":"OC\\Files\\Utils\\Scanner","type":"->","args":[""]},{"file":"\/snap\/nextcloud\/16739\/htdocs\/apps\/files\/lib\/BackgroundJob\/ScanFiles.php","line":88,"function":"backgroundScan","class":"OC\\Files\\Utils\\Scanner","type":"->","args":[""]},{"file":"\/snap\/nextcloud\/16739\/htdocs\/apps\/files\/lib\/BackgroundJob\/ScanFiles.php","line":112,"function":"runScanner","class":"OCA\\Files\\BackgroundJob\\ScanFiles","type":"->","args":[{"__class__":"OC\\User\\User"}]},{"file":"\/snap\/nextcloud\/16739\/htdocs\/lib\/private\/BackgroundJob\/Job.php","line":61,"function":"run","class":"OCA\\Files\\BackgroundJob\\ScanFiles","type":"->","args":[null]},{"file":"\/snap\/nextcloud\/16739\/htdocs\/lib\/private\/BackgroundJob\/TimedJob.php","line":55,"function":"execute","class":"OC\\BackgroundJob\\Job","type":"->","args":[{"__class__":"OC\\BackgroundJob\\JobList"},{"__class__":"OC\\Log"}]},{"file":"\/snap\/nextcloud\/16739\/htdocs\/cron.php","line":123,"function":"execute","class":"OC\\BackgroundJob\\TimedJob","type":"->","args":[{"__class__":"OC\\BackgroundJob\\JobList"},{"__class__":"OC\\Log"}]}],"File":"\/snap\/nextcloud\/16739\/htdocs\/lib\/private\/Share20\/Manager.php","Line":1056,"CustomMessage":"--"},"userAgent":"--","version":"16.0.5.1"}
{"reqId":"TLSvq5aUwo819cklzPCF","level":3,"time":"2019-12-30T21:27:45+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"\/cloud\/cron.php","message":"Error while trying to create shared mount","userAgent":"--","version":"16.0.5.1"}

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

<?php
$CONFIG = array (
  'apps_paths' =>
  array (
    0 =>
    array (
      'path' => '/snap/nextcloud/current/htdocs/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 =>
    array (
      'path' => '/var/snap/nextcloud/current/nextcloud/extra-apps',
      'url' => '/extra-apps',
      'writable' => true,
    ),
  ),
  'supportedDatabases' =>
  array (
    0 => 'mysql',
  ),
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => '/tmp/sockets/redis.sock',
    'port' => 0,
  ),
  'passwordsalt' => 'X1SA5REYudTPm1LNrq2JLdOKfnjTuf',
  'secret' => 'S4ufj4Jrynfd4/LlfvvDepDgcumM2QagWqWa5vO5wYX/zvO6',
  'trusted_domains' =>
  array (
    0 => 'localhost',
    1 => '127.0.0.1',
    2 => 'rednowerton.tk',
    3 => 'rednowerton.tk/cloud',
  ),
  'datadirectory' => '/var/snap/nextcloud/common/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '16.0.5.1',
  'overwrite.cli.url' => 'https://rednowerton.tk/cloud',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost:/tmp/sockets/mysql.sock',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => 'CqZFn1W1s9m_9asdkljsdklajdkasldjsajsrg4ol73e2xgNbaHIbBvFsAx123123sbcnq4',
  'installed' => true,
  'instanceid' => 'oc8zc1omq8dj',
  'maintenance' => false,
  'ldapIgnoreNamingRules' => false,
  'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
  'loglevel' => 2,
  'overwritehost' => 'rednowerton.tk',
  'overwriteprotocol' => 'https',
  'overwritewebroot' => '/cloud',
);