"Error creating the share: Please specify a valid user" when sharing with a specific email address

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, 20.0.5): 20.0.7.1
Operating system and version (eg, Ubuntu 20.04): Debian 9.13
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.25
PHP version (eg, 7.4): 7.4

The issue you are facing: When I try to share a folder with “example@domain.com” I get the error mentionned in the post title, but any other address is working.

I’ve found the address in these tables :

oc_accounts

oc_activity

oc_addressbookchanges

oc_cards

oc_cards_properties

oc_zimbradrive_users

I could simple delete the rows where the email is present but idk the side effect of this.
I also do not understand why the address is in “oc_accounts” because there’s no account with this email address.

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

Steps to replicate it:

Idk

The output of your Nextcloud log in Admin > Logging: Sadly there’s no log at all of this error

PASTE HERE

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

<?php
$CONFIG = array (
  'instanceid' => '',
  'passwordsalt' => '',
  'secret' => ',
  'installed' => true,
  'trusted_domains' => 
  array (
    0 => 'mycloud.mydomain.net',
  ),
  'overwrite.cli.url' => 'https://mycloud.mydomain.net',
  'datadirectory' => '/data/webs/cloud/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '20.0.7.1',
  'dbname' => 'cloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => '',
  'dbpassword' => '',
  'mysql.utf8mb4' => true,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'maintenance' => false,
  'mail_from_address' => 'cloud',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => 'mydomain.net',
  'mail_smtphost' => 'smtp.mydomain.net',
  'mail_smtpport' => '25',
  'default_language' => 'fr',
  'default_locale' => 'fr_FR',
  'theme' => '',
  'loglevel' => '0',
  'onlyoffice' => 
  array (
    'verify_peer_off' => true,
  ),
  'log_type' => 'file',
  'logfile' => '/var/log/nextcloud/nextcloud.log',
  'logfilemode' => 416,
  'logdateformat' => 'F d, Y H:i:s',
  'trashbin_retention_obligation' => '10, 90',
  'skeletondirectory' => '',
);

The output of your Apache/nginx/system log in /var/log/____: No log for this error in that file

PASTE HERE

So I seems that the tables where the email is present are used with Sabre and is stored like a VCARD, still don’t know why I can share with that user and if I can simply erase the value from the DB…

After more digging i’ve found that it the remain of a previous LDAP connexion with Zimbra,

I will try to remove the database entry manually and hope that it will not break anything