After upgrade to 16.0.4 new user can no longer log on and group membership display problem

After the upgrade from 15.0.7 to 16.0.4 some groups do not display members.
The GUI shows no users in here and pop-up unable to proceed is shown.
It seems that only groups which contain members who previously worked with nextcloud are displayed fine.
If there is 1 member who never logged to the system member of the group is no longer displayed.
Remove the user from the group via occ command and the content of the group is displayed fine.
Add the user again via occ command and group shows no users in here.
A new user cannot log on anymore to nextcloud. (internal server error etc.)

nextcloud log shows when user wants to log on

{"reqId":"XWeasOnBPaaSxs1C0IdAVgAAAA8","level":3,"time":"2019-08-29T09:28:16+00:00","remoteAddr":"10.232.62.164","user":"aprpj","app":"no app in context","method":"GET","url":"\/owncloud\/index.php\/apps\/files\/","message":"$absolutePath must be relative to \"files\", value is \"%s\"","userAgent":"Mozilla\/5.0 (Windows NT 10.0; WOW64; Trident\/7.0; rv:11.0) like Gecko","version":"16.0.4.1"}
{"reqId":"XWeasOnBPaaSxs1C0IdAVgAAAA8","level":3,"time":"2019-08-29T09:28:16+00:00","remoteAddr":"10.232.62.164","user":"aprpj","app":"index","method":"GET","url":"\/owncloud\/index.php\/apps\/files\/","message":{"Exception":"OCP\\Lock\\LockedException","Message":"\"\/aprpj\" is locked","Code":0,"Trace":[{"file":"\/var\/www\/html\/owncloud\/lib\/private\/Files\/View.php","line":1149,"function":"changeLock","class":"OC\\Files\\View","type":"->","args":["\/aprpj",2]},{"file":"\/var\/www\/html\/owncloud\/lib\/private\/Files\/View.php","line":270,"function":"basicOperation","class":"OC\\Files\\View","type":"->","args":["mkdir","\/aprpj",["create","write"]]},{"file":"\/var\/www\/html\/owncloud\/lib\/private\/Files\/Node\/Folder.php","line":161,"function":"mkdir","class":"OC\\Files\\View","type":"->","args":["\/aprpj"]},{"file":"\/var\/www\/html\/owncloud\/lib\/private\/Files\/Node\/Root.php","line":381,"function":"newFolder","class":"OC\\Files\\Node\\Folder","type":"->","args":["\/aprpj"]},{"function":"getUserFolder","class":"OC\\Files\\Node\\Root","type":"->","args":["aprpj"]},{"file":"\/var\/www\/html\/owncloud\/lib\/private\/Files\/Node\/LazyRoot.php","line":64,"function":"call_user_func_array","args":[[{"__class__":"OC\\Files\\Node\\Root"},"getUserFolder"],["aprpj"]]},{"file":"\/var\/www\/html\/owncloud\/lib\/private\/Files\/Node\/LazyRoot.php","line":281,"function":"__call","class":"OC\\Files\\Node\\LazyRoot","type":"->","args":["getUserFolder",["aprpj"]]},{"file":"\/var\/www\/html\/owncloud\/apps\/groupfolders\/lib\/Mount\/MountProvider.php","line":90,"function":"getUserFolder","class":"OC\\Files\\Node\\LazyRoot","type":"->","args":["aprpj"]},{"file":"\/var\/www\/html\/owncloud\/lib\/private\/Files\/Config\/MountProviderCollection.php","line":103,"function":"getMountsForUser","class":"OCA\\GroupFolders\\Mount\\MountProvider","type":"->","args":[{"__class__":"OC\\User\\User"},{"__class__":"OC\\Files\\Storage\\StorageFactory"}]},{"file":"\/var\/www\/html\/owncloud\/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":"\/var\/www\/html\/owncloud\/lib\/private\/Files\/Filesystem.php","line":376,"function":"initMountPoints","class":"OC\\Files\\Filesystem","type":"::","args":["aprpj"]},{"file":"\/var\/www\/html\/owncloud\/lib\/private\/legacy\/util.php","line":309,"function":"init","class":"OC\\Files\\Filesystem","type":"::","args":["aprpj","\/aprpj\/files"]},{"file":"\/var\/www\/html\/owncloud\/lib\/base.php","line":974,"function":"setupFS","class":"OC_Util","type":"::","args":[]},{"file":"\/var\/www\/html\/owncloud\/index.php","line":42,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"\/var\/www\/html\/owncloud\/lib\/private\/Files\/View.php","Line":1992,"Previous":{"Exception":"InvalidArgumentException","Message":"$absolutePath must be relative to \"files\"","Code":0,"Trace":[{"file":"\/var\/www\/html\/owncloud\/lib\/private\/Files\/View.php","line":1988,"function":"getPathRelativeToFiles","class":"OC\\Files\\View","type":"->","args":["\/aprpj"]},{"file":"\/var\/www\/html\/owncloud\/lib\/private\/Files\/View.php","line":1149,"function":"changeLock","class":"OC\\Files\\View","type":"->","args":["\/aprpj",2]},{"file":"\/var\/www\/html\/owncloud\/lib\/private\/Files\/View.php","line":270,"function":"basicOperation","class":"OC\\Files\\View","type":"->","args":["mkdir","\/aprpj",["create","write"]]},{"file":"\/var\/www\/html\/owncloud\/lib\/private\/Files\/Node\/Folder.php","line":161,"function":"mkdir","class":"OC\\Files\\View","type":"->","args":["\/aprpj"]},{"file":"\/var\/www\/html\/owncloud\/lib\/private\/Files\/Node\/Root.php","line":381,"function":"newFolder","class":"OC\\Files\\Node\\Folder","type":"->","args":["\/aprpj"]},{"function":"getUserFolder","class":"OC\\Files\\Node\\Root","type":"->","args":["aprpj"]},{"file":"\/var\/www\/html\/owncloud\/lib\/private\/Files\/Node\/LazyRoot.php","line":64,"function":"call_user_func_array","args":[[{"__class__":"OC\\Files\\Node\\Root"},"getUserFolder"],["aprpj"]]},{"file":"\/var\/www\/html\/owncloud\/lib\/private\/Files\/Node\/LazyRoot.php","line":281,"function":"__call","class":"OC\\Files\\Node\\LazyRoot","type":"->","args":["getUserFolder",["aprpj"]]},{"file":"\/var\/www\/html\/owncloud\/apps\/groupfolders\/lib\/Mount\/MountProvider.php","line":90,"function":"getUserFolder","class":"OC\\Files\\Node\\LazyRoot","type":"->","args":["aprpj"]},{"file":"\/var\/www\/html\/owncloud\/lib\/private\/Files\/Config\/MountProviderCollection.php","line":103,"function":"getMountsForUser","class":"OCA\\GroupFolders\\Mount\\MountProvider","type":"->","args":[{"__class__":"OC\\User\\User"},{"__class__":"OC\\Files\\Storage\\StorageFactory"}]},{"file":"\/var\/www\/html\/owncloud\/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":"\/var\/www\/html\/owncloud\/lib\/private\/Files\/Filesystem.php","line":376,"function":"initMountPoints","class":"OC\\Files\\Filesystem","type":"::","args":["aprpj"]},{"file":"\/var\/www\/html\/owncloud\/lib\/private\/legacy\/util.php","line":309,"function":"init","class":"OC\\Files\\Filesystem","type":"::","args":["aprpj","\/aprpj\/files"]},{"file":"\/var\/www\/html\/owncloud\/lib\/base.php","line":974,"function":"setupFS","class":"OC_Util","type":"::","args":[]},{"file":"\/var\/www\/html\/owncloud\/index.php","line":42,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"\/var\/www\/html\/owncloud\/lib\/private\/Files\/View.php","Line":2127},"CustomMessage":"--"},"userAgent":"Mozilla\/5.0 (Windows NT 10.0; WOW64; Trident\/7.0; rv:11.0) like Gecko","version":"16.0.4.1"}

Workaround:
When I create an empty homefolder with file subfolder for a new user, then the content of the group is displayed fine and the new user can log in. Nextcloud runs as apache user and this user has needed rights on our data folder so create the folder.
The datadirectoy in our config is not modified and is ‘datadirectory’ => ‘/data’ in config.php

Nextcloud version 16.0.4
CentOS 7.4.1708
Apache 2.4.6
PHP 7.1.27

Hi,

I have the same problem. How did you create the empty homefolder with a subfolder for the problematic users? Thank you in advance!

Fix :
Get
all uids which are the home folders which should exist in the data folder
select
oc_accounts.uid FROM owncloud01.oc_accounts
;

export
SQL output to a file
save
this file in unix format so you will not get Carriage Retrun Line Feed
problems
Run
a script: - (our home folders are located at /data)
#!/bin/bash
input="/data/accounts_unixformat.txt"
while IFS= read -r line
do
# echo "$line"
cd /data
if [[ ! -e $line ]]; then
mkdir $line
cd $line
mkdir files
chown -R apache:apache
.

fi
done < "$input"
Kind Regards,