Autocompletion not working with partial (user|display)names

Details

Nextcloud version (eg, 20.0.5): 27.0.2
Operating system and version (eg, Ubuntu 20.04): Debian 11
Apache or nginx version (eg, Apache 2.4.25): nginx 1.25.1
PHP version (eg, 7.4): 8.2.8

Docker compose config:

version: "3.8"
services:
  nginx:
    restart: unless-stopped
    image: nginx
    depends_on:
      - php-fpm
    volumes:
      - ./config/nginx/nginx.conf:/etc/nginx/nginx.conf
      - ./data/php-fpm/www/:/var/www/html/:rw
      - /etc/localtime:/etc/localtime:ro
    networks:
      - default
      - traefik-nextcloud-network
  cron:
    restart: unless-stopped
    image: nextcloud:27-fpm
    depends_on: 
      - psql
    volumes:
      - ./config/cron/crontab_www-data:/var/spool/cron/crontabs/www-data
    volumes_from:
      - php-fpm
   # entrypoint: /cron.sh
    command: busybox crond -f -L /dev/stdout -l 4
  php-fpm:
    restart: unless-stopped
    image: nextcloud:27-fpm
    depends_on:
      - psql
    volumes:
      - ./data/php-fpm/www/:/var/www/html/:rw
      - /data/nextcloud-data:/var/www/html/data:rw
      - /etc/localtime:/etc/localtime:ro
  psql:
    restart: unless-stopped
    image: postgres:14
    environment:
      - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
      - POSTGRES_USER=${POSTGRES_USER?"POSTGRES_USER variable required"}
      - POSTGRES_DB=${POSTGRES_DB?"POSTGRES_DB variable required"}
    volumes:
      - ./data/psql/data:/var/lib/postgresql/data
  redis:
    restart: always
    image: redis:alpine
    volumes:
      - ./data/redis/data:/data
networks:
  default:
  traefik-nextcloud-network:
    external: true

The issue you are facing:

Hi

I have an issue with user autocompletion (tested in NC Talk and file sharing).

Network dev tools shows GET request to /ocs/v2.php/core/autocomplete/get?search={username)&itemType=call&itemId=new&shareTypes%5B%5D=0%2C1%2C7 with status 200 for all of the following scenarios :

  • Full username returns user
  • Partial username returns nothing
  • Full display name returns nothing

Taking the exact same docker-compose.yml file to deploy a brand new instance works correctly. This means it looks like the issue is on DB side. I’m ready to nuke my current install if there’s a clean way to keep the users configuration (I don’t want my users to be bothered by this issue).


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

Yup

Steps to replicate it:

Can't replicate

The output of your Nextcloud log in Admin > Logging:

Nothing relevant

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

<?php
$CONFIG = array (
  'overwritewebroot' => '/',
  'overwritehost' => '--------',
  'overwriteprotocol' => 'https',
  'htaccess.RewriteBase' => '/',
  'overwrite.cli.url' => '--------,
  'filelocking.enabled' => true,
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'redis' => 
  array (
    'host' => 'redis',
    'port' => 6379,
    'timeout' => 0.0,
    'password' => '',
  ),
  'trusted_proxies' => 
  array (
    0 => '127.0.0.0/24',
  ),
  'forwarded_for_headers' => 
  array (
    0 => 'HTTP_X_FORWARDED_FOR',
  ),
  'apps_paths' => 
  array (
    0 => 
    array (
      'path' => '/var/www/html/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 => 
    array (
      'path' => '/var/www/html/custom_apps',
      'url' => '/custom_apps',
      'writable' => true,
    ),
  ),
  'trusted_domains' => 
  array (
    1 => 'nc.maxd.fr',
  ),
  'instanceid' => 'ocvw17y3ofvn',
  'secret' => '-----------',
  'dbtype' => 'pgsql',
  'version' => '27.0.2.1',
  'dbname' => 'nextcloud_db',
  'dbhost' => 'psql',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'nextcloud_user',
  'dbpassword' => '------------------',
  'logtimezone' => 'Europe/Paris',
  'installed' => true,
  'theme' => '',
  'loglevel' => 4,
  'maintenance' => false,
  'updater.secret' => '$2y-------puFpAW',
  'mysql.utf8mb4' => true,
  'encryption.legacy_format_support' => false,
  'mail_from_address' => 'noreply',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => 'maxd.fr',
  'mail_smtphost' => 'mailer',
  'default_phone_region' => 'FR',
  'trashbin_retention_obligation' => 'auto, 30',
  'versions_retention_obligation' => 'auto, 30',
  'cron_log' => true,
  'passwordsalt' => 'mX--------9SrIhT',
  'skeletondirectory' => '',
  'twofactor_enforced' => 'false',
  'twofactor_enforced_groups' => 
  array (
  ),
  'twofactor_enforced_excluded_groups' => 
  array (
  ),
  'app_install_overwrite' => 
  array (
    0 => 'keeweb',
    1 => 'checksum',
    2 => 'duplicatefinder',
    3 => 'spreed',
  ),
  'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
);

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

Nothing relevant

Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

Nothing relevant

facing exactly the same issue …
also upgraded nextcloud from pre 20 up to latest (27)

maybe an indexing or permission issue?

we are using this together with groupfolders …

on a single file when an @ comment already exists, it will autofill from there

another query somewhat related to groupfolders / and user insight …