HELP! Unable to share with group or User

[details=“Support intro”]Unable
16.0.0
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:

[/details]

Nextcloud version (eg, 12.0.2): 16.0.0
Operating system and version (eg, Ubuntu 17.04): Unbuntu 18.04
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.29
PHP version (eg, 7.1): 7.1

The issue you are facing: Unable to share with user or group

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

Steps to replicate it:

  1. Click on share icon
  2. Start typing user or group name.
  3. Then I receive error at top of screen:
    An error occurred ("Invalid query, please check the syntax. API specifications are here: http://www.freedesktop.org/wiki/Specifications/open-collaboration-services. "). Please try again

The output of your Nextcloud log in Admin > Logging:

[no app in context] Error: Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'SELECT `uid`, `displayname` FROM `oc_users` `u` LEFT JOIN `oc_preferences` `p` ON (`userid` = `uid`) AND (`appid` = 'settings') AND (`configkey` = 'email') WHERE (`uid`  COLLATE utf8mb4_general_ci LIKE ?) OR (`displayname`  COLLATE utf8mb4_general_ci LIKE ?) OR (`configvalue`  COLLATE utf8mb4_general_ci LIKE ?) ORDER BY `uid_lower` ASC LIMIT 200 OFFSET 0' with params ["%LL%", "%LL%", "%LL%"]:

SQLSTATE[42000]: Syntax error or access violation: 1253 COLLATION 'utf8mb4_general_ci' is not valid for CHARACTER SET 'utf8' at <<closure>>

 0. /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php line 184
    Doctrine\DBAL\Driver\AbstractMySQLDriver->convertException("An exception oc ... '", Doctrine\DBAL\Dr ... ]})
 1. /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php line 158
    Doctrine\DBAL\DBALException::wrapException(Doctrine\DBAL\Driver\PDOMySql\Driver {}, Doctrine\DBAL\Dr ... ]}, "An exception oc ... '")
 2. /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php line 938
    Doctrine\DBAL\DBALException::driverExceptionDuringQuery(Doctrine\DBAL\Driver\PDOMySql\Driver {}, Doctrine\DBAL\Dr ... ]}, "SELECT `uid`, ` ... 0", {1: "%LL%",2: "%LL%",3: "%LL%"})
 3. /var/www/nextcloud/lib/private/DB/Connection.php line 195
    Doctrine\DBAL\Connection->executeQuery("SELECT `uid`, ` ... 0", {1: "%LL%",2: "%LL%",3: "%LL%"}, {1: 2,2: 2,3: 2}, null)
 4. /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php line 219
    OC\DB\Connection->executeQuery("SELECT `uid`, ` ... 0", {1: "%LL%",2: "%LL%",3: "%LL%"}, {1: 2,2: 2,3: 2})
 5. /var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php line 214
    Doctrine\DBAL\Query\QueryBuilder->execute()
 6. /var/www/nextcloud/lib/private/User/Database.php line 280
    OC\DB\QueryBuilder\QueryBuilder->execute()
 7. /var/www/nextcloud/lib/private/User/Manager.php line 257
    OC\User\Database->getDisplayNames("LL", 200, 0)
 8. /var/www/nextcloud/lib/private/Collaboration/Collaborators/UserPlugin.php line 79
    OC\User\Manager->searchDisplayName("LL", 200, 0)
 9. /var/www/nextcloud/lib/private/Collaboration/Collaborators/Search.php line 65
    OC\Collaboration\Collaborators\UserPlugin->search("LL", 200, 0, OC\Collaboration ... {})
10. /var/www/nextcloud/apps/files_sharing/lib/Controller/ShareesAPIController.php line 209
    OC\Collaboration\Collaborators\Search->search("LL", [0,1,4], false, 200, 0)
11. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 166
    OCA\Files_Sharing\Controller\ShareesAPIController->search("LL", "folder", 1, 200, null, false)
12. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 99
    OC\AppFramework\Http\Dispatcher->executeController(OCA\Files_Sharin ... {}, "search")
13. /var/www/nextcloud/lib/private/AppFramework/App.php line 126
    OC\AppFramework\Http\Dispatcher->dispatch(OCA\Files_Sharin ... {}, "search")
14. /var/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php line 47
    OC\AppFramework\App::main("OCA\\Files_Shar ... r", "search", OC\AppFramework\ ... {}, {_route: "ocs.fi ... "})
15. <<closure>>
    OC\AppFramework\Routing\RouteActionHandler->__invoke({_route: "ocs.fi ... "})
16. /var/www/nextcloud/lib/private/Route/Router.php line 297
    undefinedundefinedcall_user_func(OC\AppFramework\ ... {}, {_route: "ocs.fi ... "})
17. /var/www/nextcloud/ocs/v1.php line 82
    OC\Route\Router->match("/ocsapp/apps/fi ... s")

GET /ocs/v1.php/apps/files_sharing/api/v1/sharees?format=json&search=LL&lookup=false&perPage=200&itemType=folder
from 70.91.164.52 by cloudadmin at 2019-05-23T20:21:37+00:00

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

<?php
$CONFIG = array (
  'instanceid' => 'oc9ll4esd2a9',
  'passwordsalt' => 'Bn+j3UieIVnVEpJ/TcuPVAb3mGXLnn',
  'secret' => 'Ty3SV0OOFatpvKZZunYBf6bjVNzPcVCRcHSKuDi1lKqXgFQu',
  'trusted_domains' => 
  array (
    0 => '127.0.0.1',
    1 => 'xxx.xxx.xxx',
    2 => 'cloud.xxx.com',
  ),
  'datadirectory' => '/var/www/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '16.0.0.9',
  'overwrite.cli.url' => 'http://127.0.0.1/nextcloud',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'nextclouduser',
  'dbpassword' => 'password',
  'installed' => true,
  'mail_smtpmode' => 'smtp',
  'mail_smtphost' => 'mail.XXX.com',
  'mail_smtpport' => '587',
  'mail_domain' => 'XXX.com',
  'mail_from_address' => 'cloud',
  'maintenance' => false,
  'mysql.utf8mb4' => true,
  'theme' => '',
  'loglevel' => 2,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => 'localhost',
    'port' => 6379,
  ),
  'updater.release.channel' => 'stable',
  'mail_smtpauth' => 1,
  'mail_smtpname' => 'cloud@lli.com',
  'mail_smtppassword' => 'bat5EWr?cha4',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpsecure' => 'tls',
);

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

PASTE HERE

Problem was solved with Upgrade to 16.0.1